Closed tophertoy closed 5 years ago
Same here, this happens also when pushing to default scratch org:
10:34:33.423 sfdx force:source:push --json --loglevel fatal ended with exit code 1
DeployFailed: Push failed.
VSCode 1.35.1
sfdx-cli/7.11.2-4a5bf6aa97 win32-x64 node-v10.15.3
Windows 10 1809 (Build 17763.557)
SF Extension Pack version: 46.1.0
For reference, this appears to be the same issue I posted yesterday https://github.com/forcedotcom/salesforcedx-vscode/issues/1408
The extensions rely on the JSON output of the CLI to show the failures and successes of this command. Even when I run the CLI command outside of the extensions I'm not getting any failure results, so we'll take a look on the CLI side of things.
This seems to be a bug in the CLI (sfdx-cli/7.11.2 darwin-x64 node-v10.15.3). When passed the --json
flag, it doesn't return the error but encounters an error. Works fine without the --json
flag. Our VS Code extensions rely on the output of --json
thus we can't show any errors.
dreamhouse-sfdx on master [!] via ⬢ v10.15.3
[I] ➜ sfdx force:source:push --json
{
"status": 1,
"name": "DeployFailed",
"message": "Push failed.",
"exitCode": 1,
"commandName": "SourcePushCommand",
"stack": "DeployFailed: Push failed.\n at MetadataRegistry.initializeMetadataTypeInfos.then.catch.e (/Users/nchen/.nvm/versions/node/v10.15.3/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/source/sourceApiCommand.js:63:31)\n at tryCatcher (/Users/nchen/.nvm/versions/node/v10.15.3/lib/node_modules/sfdx-cli/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/Users/nchen/.nvm/versions/node/v10.15.3/lib/node_modules/sfdx-cli/node_modules/bluebird/js/release/promise.js:510:31)\n at Promise._settlePromise (/Users/nchen/.nvm/versions/node/v10.15.3/lib/node_modules/sfdx-cli/node_modules/bluebird/js/release/promise.js:567:18)\n at Promise._settlePromise0 (/Users/nchen/.nvm/versions/node/v10.15.3/lib/node_modules/sfdx-cli/node_modules/bluebird/js/release/promise.js:612:10)\n at Promise._settlePromises (/Users/nchen/.nvm/versions/node/v10.15.3/lib/node_modules/sfdx-cli/node_modules/bluebird/js/release/promise.js:687:18)\n at Async._drainQueue (/Users/nchen/.nvm/versions/node/v10.15.3/lib/node_modules/sfdx-cli/node_modules/bluebird/js/release/async.js:138:16)\n at Async._drainQueues (/Users/nchen/.nvm/versions/node/v10.15.3/lib/node_modules/sfdx-cli/node_modules/bluebird/js/release/async.js:148:10)\n at Immediate.Async.drainQueues [as _onImmediate] (/Users/nchen/.nvm/versions/node/v10.15.3/lib/node_modules/sfdx-cli/node_modules/bluebird/js/release/async.js:17:14)\n at runCallback (timers.js:705:18)\n at tryOnImmediate (timers.js:676:5)\n at processImmediate (timers.js:658:5)",
"warnings": []
}
dreamhouse-sfdx on master [!] via ⬢ v10.15.3 took 4s
[I] ➜ sfdx force:source:push
PROJECT PATH ERROR
──────────────────────────────────────────────── ─────────────────────────────────────────────────────────────────────────────────────────────
force-app/main/default/classes/BotController.cls Unexpected token ','. (9:47)
force-app/main/default/classes/BotController.cls Invalid character in identifier: , (9:47)
force-app/main/default/classes/BotController.cls Unexpected token ','. (9:47)
force-app/main/default/classes/BotController.cls Constructor not defined: [BotController.HandlerMapping].<Constructor>(String, String) (23:17)
force-app/main/default/classes/BotController.cls Invalid type: handlerClassName (9:47)
ERROR running force:source:push: Push failed.
In addition with https://github.com/forcedotcom/cli/issues/108 this bug impacts our team greatly.
This issue is fixed in 7.12.3 of the toolbelt. Just run sfdx update...
I’m still having the issue even with the latest release. And it looks like I’m not the only one: https://salesforce.stackexchange.com/questions/267070/sfdx-wont-push-to-scratch-org-no-error-detail
@FabienTaillon just to clarify, it looks like that thread is specific to executing the command without the --json
flag which would be specific to doing deploys outside of the vscode extensions experience. Are you missing the error info when running SFDX: Deploy Source ...
or SFDX: Push Source ..
?
Btw, I've been able to replicate the error in the thread and will work on a fix but want to make sure it's exclusive to running the source commands outside of the vscode extensions.
My bad, I was using source:push -f directly in the VS Code terminal because of conflicts in the Scratch Org, not the VS Code command palette.
No worries, just wanted to confirm that at least we didn't miss something when using --json
. We're working on the fix for the other scenario and we'll update on its progress in this new issue https://github.com/forcedotcom/cli/issues/123
Still not working for me, Using VSCode extensions v 46.11.0 CLI - 7.21.0 dx - 46.11.0.
Works for a specific file using Deploy this source. But when using Push Source to Default Org, no errors are coming even though the command failed
@amitkumarj1979 I think what you are seeing is unrelated to this original issue, which was on the cli. Do you get an error output if you run the deploy directly in the terminal and using the --json
flag?
We have a fix (PR #1597) which I think might address the issue you are seeing but would like to confirm.
the issue is not coming this morning, so I am able to see the errors in the output panel and also the Problems window. Will come back if i see it back. Thanks @lcampos
Anyone else still seeing this issue?
Starting SFDX: Deploy Source to Org
09:33:18.669 sfdx force:source:deploy --sourcepath /Users/nickthurston/Documents/DocumentsNick’sMacBookPro/BookNow Software Dev Org/BookNow-Software-Dev-Org/force-app/main/default/classes/MembershipHandler.cls --json --loglevel fatal 09:33:23.845 sfdx force:source:deploy --sourcepath /Users/nickthurston/Documents/DocumentsNick’sMacBookPro/BookNow Software Dev Org/BookNow-Software-Dev-Org/force-app/main/default/classes/MembershipHandler.cls --json --loglevel fatal ended with exit code 1
Also still seeing this error, I think the issue is with the VSCode extensions as running the sfdx command directly from the command line does return errors.
VSCode Output Window: 15:50:53.997 sfdx force:source:deploy --sourcepath [redacted path to source] --json --loglevel fatal 15:51:08.16 sfdx force:source:deploy --sourcepath [redacted path to source] --json --loglevel fatal ended with exit code 1
Command Line: sfdx force:source:deploy --sourcepath [redacted path to source] --json --loglevel fatal ... "lineNumber": "4", "problem": "Method does not exist or incorrect signature: void triggerHandler(String) from the type fflib_SObjectDomain", "problemType": "Error", "success": "false" }, ...
@gussamer I resolved by changing the following setting to true:
@gussamer did you resolve this? I'm experiencing exactly what you describe. Works via the CLI but not through the vscode extension.
i'm having same issue how did you resolve the issue
14:31:42.595 Starting SFDX: Deploy Source to Org
=== Deploy Errors
PROJECT PATH ERRORS
──────────── ──────────────────────────────────────────────────────────────────────────────
duplicate value found:
Cannot find Lightning Component Bundle helloWorld.
14:31:52.346 ended SFDX: Deploy Source to Org
Summary
When I "deploy this source to org" and the deploy fails it no longer shows the errors in the panel.
Steps To Reproduce:
Expected result
Actual result
Additional information
Feel free to attach a screenshot.
VS Code Version:
Version 1.35.1 (1.35.1)
SFDX CLI Version:
sfdx-cli/7.11.2-4a5bf6aa97 darwin-x64 node-v10.15.3
OS and version:
macOS High Sierra Version 10.13.6