Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can no longer deploy files to developer org #488

Closed
julesx opened this issue Jul 15, 2020 · 11 comments
Closed

Can no longer deploy files to developer org #488

julesx opened this issue Jul 15, 2020 · 11 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@julesx
Copy link

julesx commented Jul 15, 2020

Summary

sfdx force:source:deploy -p "c:\my stuff\code\MyProject\sfdc\classes\SidebarController.cls"
ERROR running force:source:deploy: Cannot read property 'path' of undefined

Steps To Reproduce:

Run the command line

Expected result

File should deploy

Actual result

ERROR running force:source:deploy: Cannot read property 'path' of undefined

Additional information

sfdx-cli/7.65.4-c99e705754 win32-x64 node-v12.13.0

@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.0.1 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.7.10 (core)
@oclif/plugin-update 1.3.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-diff 0.0.6
@salesforce/sfdx-trust 3.0.7 (core)
analytics 1.12.0 (core)
generator 1.1.3 (core)
salesforcedx 48.22.8 (core)
├─ salesforcedx-templates 48.18.0 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
├─ salesforce-alm 48.24.1 (core)
└─ custom-metadata 1.0.4 (core)
sfdx-cli 7.65.4 (core)

image

@JonnyPower
Copy link

Seeing the same issue here, seems to be inconsistent as well. --verbose --loglevel=debug not giving away anything interesting either.

@JonnyPower
Copy link

JonnyPower commented Jul 16, 2020

Actually I think this is an issue with the logic used to find the project's sfdx-project.json file. If I run the deploy command from the directory the sfdx-project.json file is in, it will deploy, but if I'm in a subdirectory of my project and run the command it fails with ERROR running force:source:deploy: Cannot read property 'path' of undefined.

This used to work fine when running deploys with full paths in a project subdirectory.

@sjurgis
Copy link

sjurgis commented Jul 16, 2020

What @JonnyPower said. Our script used to push from subfolder of sfdx project, now that fails.

@vyasp
Copy link

vyasp commented Jul 21, 2020

force:mdapi:convert is also broken with same issue. Was working perfectly fine 2 weeks ago.

@shetzel shetzel added the bug Issue or pull request that identifies or fixes a bug label Jul 22, 2020
@imTachu
Copy link

imTachu commented Jul 24, 2020

We're getting the same when running sfdx force:source:push -f -g --loglevel DEBUG --dev-debug

  sfdx:SourcePushCommand ERROR [
  sfdx:SourcePushCommand   '\u001b[1mERROR running force:source:push: \u001b[22m',
  sfdx:SourcePushCommand   "\u001b[31mCannot read property 'path' of undefined\u001b[39m",
  sfdx:SourcePushCommand   '\u001b[31m\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m*** Internal Diagnostic ***\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m\u001b[39m\n' +
  sfdx:SourcePushCommand     "\u001b[31mTypeError: Cannot read property 'path' of undefined\u001b[39m\n" +
  sfdx:SourcePushCommand     '\u001b[31m    at /home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/dist/lib/source/packageInfoCache.js:49:33\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at Array.map (<anonymous>)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at PackageInfoCache.buildPackageList (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/dist/lib/source/packageInfoCache.js:44:38)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at PackageInfoCache.init (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/dist/lib/source/packageInfoCache.js:22:36)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at Function.create (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/dist/lib/source/packageInfoCache.js:18:18)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at Function.getInstance (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/dist/lib/source/packageInfoCache.js:35:58)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at SourceWorkspaceAdapter.init (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/dist/lib/source/sourceWorkspaceAdapter.js:60:69)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async Function.create (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/@salesforce/kit/lib/creatable.js:20:9)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async MdapiPushApi.init (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/dist/lib/source/sourcePushApi.js:29:20)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async Function.create (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/@salesforce/kit/lib/creatable.js:20:9)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31mFrom previous event:\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at processImmediate (internal/timers.js:439:21)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31mFrom previous event:\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at SourceApiCommand.execute (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/dist/lib/source/sourceApiCommand.js:47:14)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at SourcePushCommand.execLegacyCommand (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/dist/ToolbeltCommand.js:148:43)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async SourcePushCommand.run (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/dist/commands/force/source/push.js:25:16)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async SourcePushCommand._run (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/node_modules/@salesforce/command/lib/sfdxCommand.js:93:40)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async Config.runCommand (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/@oclif/config/lib/config.js:172:9)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async Main.run (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/@oclif/command/lib/main.js:22:9)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async Main._run (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/@oclif/command/lib/command.js:43:20)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async Object.run (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/dist/cli.js:32:20)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31mOuter stack:\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at Function.wrap (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/@salesforce/core/lib/sfdxError.js:151:27)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at SourcePushCommand.catch (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/dist/ToolbeltCommand.js:247:46)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async SourcePushCommand._run (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/salesforce-alm/node_modules/@salesforce/command/lib/sfdxCommand.js:97:13)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async Config.runCommand (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/@oclif/config/lib/config.js:172:9)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async Main.run (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/@oclif/command/lib/main.js:22:9)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async Main._run (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/node_modules/@oclif/command/lib/command.js:43:20)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m    at async Object.run (/home/lorena/.local/share/sfdx/client/7.66.2-4f159a1d07/dist/cli.js:32:20)\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m******\u001b[39m\n' +
  sfdx:SourcePushCommand     '\u001b[31m\u001b[39m'
  sfdx:SourcePushCommand ] +678ms

I do confirm that the workaround that @JonnyPower mentioned (pushing from the root and not a sub directory) also works for us. Was working fine ~2 weeks ago.

@mwannamaker41
Copy link

mwannamaker41 commented Jul 28, 2020

Yes deploying from root is fine, but not from sub directories. This is really messing with our CI and needs to be fixed ASAP.

@ghost
Copy link

ghost commented Jul 30, 2020

Same issue here.

I'm using sfdx-cli on Windows 10 installed via NPM on NodeJs installed via Scoop package manager.

Source commands invoked from project sub-directories fail, whilst commands invoked from project root work just fine.
This needs to be fixed ASAP, especially since older versions of the CLI did not have this problem IIRC.

Log output:

status: 1
name: TypeError
message: Cannot read property 'path' of undefined
exitCode: 1
commandName: SourceDeployCommand

stack: TypeError: Cannot read property 'path' of undefined
at C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\salesforce-alm\dist\lib\source\packageInfoCache.js:49:33
at Array.map (<anonymous>)
at PackageInfoCache.buildPackageList (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\salesforce-alm\dist\lib\source\packageInfoCache.js:44:38)
at PackageInfoCache.init (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\salesforce-alm\dist\lib\source\packageInfoCache.js:22:36)
at Function.create (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\salesforce-alm\dist\lib\source\packageInfoCache.js:18:18)
at Function.getInstance (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\salesforce-alm\dist\lib\source\packageInfoCache.js:35:58)
at SourceWorkspaceAdapter.init (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\salesforce-alm\dist\lib\source\sourceWorkspaceAdapter.js:60:69)
at async Function.create (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\@salesforce\kit\lib\creatable.js:20:9)
at async SourceDeployApi.doDeploy (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\salesforce-alm\dist\lib\source\sourceDeployApi.js:50:20)\nOuter stack:
at Function.wrap (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\salesforce-alm\node_modules\@salesforce\core\lib\sfdxError.js:151:27)
at SourceDeployCommand.catch (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\salesforce-alm\dist\ToolbeltCommand.js:247:46)
at async SourceDeployCommand._run (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\salesforce-alm\node_modules\@salesforce\command\lib\sfdxCommand.js:97:13)
at async Config.runCommand (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\@oclif\config\lib\config.js:172:9)
at async Main.run (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\@oclif\command\lib\main.js:22:9)
at async Main._run (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\node_modules\@oclif\command\lib\command.js:43:20)
at async Object.run (C:\Users\gerar\scoop\persist\nodejs\bin\node_modules\sfdx-cli\dist\cli.js:32:20),
warnings: []

I'm no expert on NodeJS-based apps, but maybe fixing some of those deprecation warnings that pop up when installing/upgrading the sfdx-cli could help?
image

@shetzel
Copy link
Contributor

shetzel commented Jul 30, 2020

The fix will be in this week's release, scheduled for today. Thanks for your patience.

@gvkempen The deprecation warnings have nothing to do with the error during deploy. None of them are direct plugin dependencies but rather transitive deps which require fixing in other projects. That said, we definitely want to address them as soon as we can. Version bumps are easier to deal with than switching modules entirely, but it all requires investigation, implementation, and testing. It's a matter of priorities, and the bug listed here is just one of many with much higher priority.

@mwannamaker41
Copy link

mwannamaker41 commented Jul 30, 2020

FYI: The new build has solved the issue for me. Thanks

@shetzel
Copy link
Contributor

shetzel commented Jul 30, 2020

Thank you for confirming.

@shetzel shetzel closed this as completed Jul 30, 2020
@sjurgis
Copy link

sjurgis commented Jul 31, 2020

Seems working fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug
Projects
None yet
Development

No branches or pull requests

8 participants