When I "deploy this source to org" and the deploy fails it no longer shows the errors in the panel.
Starting SFDX: Deploy Source to Org
11:08:31.439 sfdx force:source:deploy --sourcepath /Users/chris/Code/XeroAPI/force-app/main/default/classes/SaveXeroReponseData.cls --json --loglevel fatal
11:08:39.548 sfdx force:source:deploy --sourcepath /Users/chris/Code/XeroAPI/force-app/main/default/classes/SaveXeroReponseData.cls --json --loglevel fatal ended with exit code 1
Method does not exist or incorrect signature: void new(GLxero__XeroInvoice__c) from the type GLxero.InvoiceLockManager
Starting SFDX: Deploy Source to Org
11:08:31.439 sfdx force:source:deploy --sourcepath /Users/chris/Code/XeroAPI/force-app/main/default/classes/SaveXeroReponseData.cls --json --loglevel fatal
11:08:39.548 sfdx force:source:deploy --sourcepath /Users/chris/Code/XeroAPI/force-app/main/default/classes/SaveXeroReponseData.cls --json --loglevel fatal ended with exit code 1
DeployFailed: Deploy failed.
_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
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
Still not working for me:
19:42:09.247 sfdx force:source:push --json --loglevel fatal
19:42:40.350 sfdx force:source:push --json --loglevel fatal
ended with exit code 0
Most helpful comment
This issue is fixed in 7.12.3 of the toolbelt. Just run sfdx update...