cli
cli copied to clipboard
(7.163.0) sfdx force:source:deploy throwing UNKNOWN_EXCEPTION
Summary
When trying to deploy our source metadata using sfdx force:source:deploy it throws UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1556838228-417394 (-1488516052). Full command is sfdx force:source:deploy -p "/builds/services/dcms/financialforce/thunder/force-app/" -w 0 -u TARGET_ORG -l NoTestRun --json | ConvertFrom-Json It is erroring in v7.164.1 as well. No error on v7.162.0
Steps To Reproduce:
Run sfdx force:source:deploy -p "/builds/services/dcms/financialforce/thunder/force-app/" -w 0 -u TARGET_ORG -l NoTestRun --json | ConvertFrom-Json
Expected result
Create a deploy on TARGET_ORG
Actual result
No deploy created and sfdx command returns UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1556838228-417394 (-1488516052)
System Information
- Tested on cmd and powershell on docker CMD: { "cliVersion": "sfdx-cli/7.162.0", "architecture": "win32-x64", "nodeVersion": "node-v16.17.0", "pluginVersions": [ "@oclif/plugin-autocomplete 0.3.0 (core)", "@oclif/plugin-commands 1.3.0 (core)", "@oclif/plugin-help 3.3.1 (core)", "@oclif/plugin-not-found 1.2.6 (core)", "@oclif/plugin-plugins 1.10.11 (core)", "@oclif/plugin-update 1.5.0 (core)", "@oclif/plugin-warn-if-update-available 1.7.3 (core)", "@oclif/plugin-which 1.0.4 (core)", "@salesforce/sfdx-plugin-lwc-test 1.0.0 (core)", "alias 2.1.0 (core)", "apex 1.1.0 (core)", "auth 2.2.3 (core)", "community 2.0.0 (core)", "config 1.4.14 (core)", "custom-metadata 2.0.0 (core)", "data 2.1.1 (core)", "generator 2.0.2 (core)", "info 2.0.1 (core)", "limits 2.0.1 (core)", "org 2.0.7 (core)", "salesforce-alm 54.6.4 (core)", "schema 2.1.1 (core)", "sfdx-cli 7.162.0 (core)", "signups 1.2.0 (core)", "source 2.0.11 (core)", "telemetry 2.0.0 (core)", "templates 55.0.0 (core)", "trust 2.0.3 (core)", "user 2.1.0 (core)" ], "osVersion": "Windows_NT 10.0.19042" }
Docker: { "cliVersion": "sfdx-cli/7.160.0", "architecture": "linux-x64", "nodeVersion": "node-v14.20.0", "pluginVersions": [ "@oclif/plugin-autocomplete 0.3.0 (core)", "@oclif/plugin-commands 1.3.0 (core)", "@oclif/plugin-help 3.3.1 (core)", "@oclif/plugin-not-found 1.2.6 (core)", "@oclif/plugin-plugins 1.10.11 (core)", "@oclif/plugin-update 1.5.0 (core)", "@oclif/plugin-warn-if-update-available 1.7.3 (core)", "@oclif/plugin-which 1.0.4 (core)", "@salesforce/sfdx-plugin-lwc-test 1.0.0 (core)", "alias 2.1.0 (core)", "apex 1.1.0 (core)", "auth 2.2.2 (core)", "community 2.0.0 (core)", "config 1.4.14 (core)", "custom-metadata 2.0.0 (core)", "data 2.0.4 (core)", "generator 2.0.2 (core)", "info 2.0.1 (core)", "limits 2.0.1 (core)", "org 2.0.3 (core)", "salesforce-alm 54.6.2 (core)", "schema 2.1.1 (core)", "sfdx-cli 7.160.0 (core)", "signups 1.2.0 (core)", "source 2.0.7 (core)", "telemetry 2.0.0 (core)", "templates 55.0.0 (core)", "trust 2.0.1 (core)", "user 2.1.0 (core)" ], "osVersion": "Linux 5.4.0-1085-azure" }
Additional information
Feel free to attach a screenshot.
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
@Renan-Mastropaolo are you able to provide a project that replicates the issue? Thanks!
Hello @mdonnalley , Sorry but I can not provide you the project our company uses, it is private. But I can perform tests myself and report you the results. I will start by cleaning up the project and adding one metadata type at a time to see if I found anything, if you have any other test in mind please let me know so I try it as well. Thanks.
I have just found one thing, both my test were done using sfdx installed using npm install -g sfdx-cli@latest command. On my Windows machine, I uninstalled sfdx using npm uninstall -g sfdx-cli and installed using the EXE file on official website and it is now deploying with the same command, maybe it is something related to that?
@Renan-Mastropaolo Thanks for the update. You should be getting the same version regardless of if you're installing from npm or using the installer. The only difference between the two is that the installer has locked dependencies whereas the npm one doesn't.
I wonder if the issue would come back if you tried reinstalling with npm? If not, that would indicate that there was something off in your original npm installation
I do not think that's the case, during my tests I've been uninstalling and reinstalling the same version and other versions multiple times with the same behavior all the time. And on the docker side, every time we run a deploy a new docker instance is created, uninstalling and installing v7.163.0 version all the time. Anyway, I will uninstall the standalone version and reinstall the npm one right now, just give me a sec. Thanks
@mdonnalley Same issue after uninstalling EXE version and installing npm again
@Renan-Mastropaolo thanks for testing that out for me. At this point I'll need to investigate that error id you provided in the original description to see if there are any clues there. I'll let you know if I learn anything
Thank you. I will keep testing some more scenarios in the meantime.
Obter o Outlook para Androidhttps://aka.ms/AAb9ysg
From: Mike Donnalley @.> Sent: Wednesday, August 17, 2022 5:27:26 PM To: forcedotcom/cli @.> Cc: Mastropaolo, Renan @.>; Mention @.> Subject: Re: [forcedotcom/cli] (7.163.0) sfdx force:source:deploy throwing UNKNOWN_EXCEPTION (Issue #1673)
[EXTERNAL EMAIL]
@Renan-Mastropaolo [github.com]https://urldefense.com/v3/__https://github.com/Renan-Mastropaolo__;!!LpKI!gPuRhpfGGOSgJ281U3oJs6f31GrQgvD_Bix0P0O8NjUVHxripUUq_ePNugMf0ZNDiuuv8klm76pTpJdWMbpOdfbqiPaPCQ$ thanks for testing that out for me. At this point I'll need to investigate that error id you provided in the original description to see if there are any clues there. I'll let you know if I learn anything
— Reply to this email directly, view it on GitHub [github.com]https://urldefense.com/v3/__https://github.com/forcedotcom/cli/issues/1673*issuecomment-1218458939__;Iw!!LpKI!gPuRhpfGGOSgJ281U3oJs6f31GrQgvD_Bix0P0O8NjUVHxripUUq_ePNugMf0ZNDiuuv8klm76pTpJdWMbpOdfYsnXYpeA$, or unsubscribe [github.com]https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/A2R2TJ3367GBAEN3QW2Y7Z3VZVDK5ANCNFSM56XD7RDA__;!!LpKI!gPuRhpfGGOSgJ281U3oJs6f31GrQgvD_Bix0P0O8NjUVHxripUUq_ePNugMf0ZNDiuuv8klm76pTpJdWMbpOdfaiMgWJgg$. You are receiving this because you were mentioned.Message ID: @.***>
Internal Use - Confidential
Hey @mdonnalley, On our docker image, I've uninstalled the npm version and used the one on this tutorial (https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm#sfdx_setup_install_cli_linux) using the .tar.xz file and it worked as well. Looks like it is something related to the npm installation.
Hello,
Had a similar issue one week ago and the same as @Renan-Mastropaolo after changing the CLI installation file from npm to tar file error has been solved. But today, I am getting a similar UNKNOWN_ERROR issue with the npm and tar file both with the 7.164.2 version. After downgrading to the 7.163.0 version everything works well.
I opened the case to Salesforce Support, they provided me the server log as below: Thrown: java.util.zip.ZipException: only DEFLATED entries can have EXT descriptor Date: Fri, 19 Aug 2022 01:39:19 +0000 (GMT)
And log message does not give me any insight or tips on how to solve the issue. Maybe it's related to how CLI converts sources to metadata zip archive at force:source:deploy command.
Hello everyone, confirmed on my side that 7.164.2 indeed cause the same error (UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1801400831-592134 (-1488516052)), with both npm and tar.xz/.exe versions.
Hello, there is definitely something odd with 7.164.2, for a bit more input: we are using exclusively Github Actions, and our workflow didn't work with 7.164.2 either from npm or tar files. For now, we are sticking with 7.163.0 tar and it works fine.
*** Deploying with SOAP API v55.0 ***
ERROR running force:source:deploy: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1671461828-106631 (-1488516052)
@isaiassilva-osf @Renan-Mastropaolo @LeoCordiuS A couple of follow up questions:
- Can you try deploying with v7.164.1?
- Can you share the output of
sfdx plugins:inspect @salesforce/plugin-source?
Thanks!
@mdonnalley
- Tested on 7.164.1 and 7.164.0, both npm and .tar.xz failed to deploy with the same error message.
- 7.164.2 --> npm version
└─ @salesforce/plugin-source
├─ version 2.0.12
├─ homepage https://github.com/salesforcecli/plugin-source
├─ location C:\Users\Renan_Mastropaolo\AppData\Roaming\npm\node_modules\sfdx-cli\node_modules\@salesforce\plugin-source
├─ commands
│ ├─ force
│ ├─ force:mdapi:convert
│ ├─ force:mdapi:deploy
│ ├─ force:mdapi:deploy:cancel
│ ├─ force:mdapi:deploy:report
│ ├─ force:mdapi:describemetadata
│ ├─ force:mdapi:listmetadata
│ ├─ force:mdapi:retrieve
│ ├─ force:mdapi:retrieve:report
│ ├─ force:source:convert
│ ├─ force:source:delete
│ ├─ force:source:deploy
│ ├─ force:source:deploy:cancel
│ ├─ force:source:deploy:report
│ ├─ force:source:ignored:list
│ ├─ force:source:manifest:create
│ ├─ force:source:open
│ ├─ force:source:pull
│ ├─ force:source:push
│ ├─ force:source:retrieve
│ ├─ force:source:status
│ ├─ force:source:tracking:clear
│ └─ force:source:tracking:reset
└─ dependencies
├─ @oclif/core ^1.9.5 => 1.13.10
├─ @oclif/plugin-help ^3.3.1 => 3.3.1
├─ @salesforce/apex-node ^1.0.0 => 1.1.0
├─ @salesforce/command ^5.2.1 => 5.2.4
├─ @salesforce/core ^3.21.5 => 3.26.2
├─ @salesforce/kit ^1.5.41 => 1.5.45
├─ @salesforce/source-deploy-retrieve ^6.2.6 => 6.3.0
├─ @salesforce/source-tracking ^2.1.2 => 2.2.2
├─ chalk ^4.1.2 => 4.1.2
├─ got ^11.8.3 => 11.8.5
├─ jsforce ^2.0.0-beta.16 => 2.0.0-beta.18
├─ open ^8.4.0 => 8.4.0
├─ proxy-agent ^5.0.0 => 5.0.0
├─ proxy-from-env ^1.1.0 => 1.1.0
└─ tslib ^2 => 2.4.0
7.164.2 --> .tar.xz version
└─ @salesforce/plugin-source
├─ version 2.0.12
├─ homepage https://github.com/salesforcecli/plugin-source
├─ location /root/sfdx/node_modules/@salesforce/plugin-source
├─ commands
│ ├─ force
│ ├─ force:mdapi:convert
│ ├─ force:mdapi:deploy
│ ├─ force:mdapi:deploy:cancel
│ ├─ force:mdapi:deploy:report
│ ├─ force:mdapi:describemetadata
│ ├─ force:mdapi:listmetadata
│ ├─ force:mdapi:retrieve
│ ├─ force:mdapi:retrieve:report
│ ├─ force:source:convert
│ ├─ force:source:delete
│ ├─ force:source:deploy
│ ├─ force:source:deploy:cancel
│ ├─ force:source:deploy:report
│ ├─ force:source:ignored:list
│ ├─ force:source:manifest:create
│ ├─ force:source:open
│ ├─ force:source:pull
│ ├─ force:source:push
│ ├─ force:source:retrieve
│ ├─ force:source:status
│ ├─ force:source:tracking:clear
│ └─ force:source:tracking:reset
└─ dependencies
├─ @oclif/core ^1.9.5 => 1.13.10
├─ @oclif/plugin-help ^3.3.1 => 3.3.1
├─ @salesforce/apex-node ^1.0.0 => 1.1.0
├─ @salesforce/command ^5.2.1 => 5.2.4
├─ @salesforce/core ^3.21.5 => 3.26.2
├─ @salesforce/kit ^1.5.41 => 1.5.45
├─ @salesforce/source-deploy-retrieve ^6.2.6 => 6.3.0
├─ @salesforce/source-tracking ^2.1.2 => 2.2.2
├─ chalk ^4.1.2 => 4.1.2
├─ got ^11.8.3 => 11.8.5
├─ jsforce ^2.0.0-beta.16 => 2.0.0-beta.18
├─ open ^8.4.0 => 8.4.0
├─ proxy-agent ^5.0.0 => 5.0.0
├─ proxy-from-env ^1.1.0 => 1.1.0
└─ tslib ^2 => 2.4.0
This issue has been linked to a new work item: W-11624472
I am witnessing the same issue on multiple versions of the CLI:
Versions with error codes:
- 7.163.0 - 1256550982-117127 (-1488516052)
- 7.162.0 - 2063887122-299599 (-1488516052)
- 7.159.0 - 1334184225-265985 (-1488516052)
- 7.158.0 - 125231351-244937 (-1488516052)
- 7.157.0 - 219879244-5650 (-1488516052)
@rob-baillie-ortoo maybe if you install 7.163.0 with .tar.xz or .exe file this issue will not happen again.
Same error with v7.165.0 installed thru .exe file UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 256389163-55367 (-1488516052)
@mdonnalley I just saw that I've never posted the full json response I got, with stack. Here you go (v7.165.0) { "status": 1, "name": "sf:UNKNOWN_EXCEPTION", "message": "UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 256389163-55367 (-1488516052)", "exitCode": 1, "context": "Deploy", "stack": "sf:UNKNOWN_EXCEPTION: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 256389163-55367 (-1488516052)\n at Function.wrap (C:\Users\Renan_Mastropaolo\AppData\Local\sfdx\client\7.165.0-65b4bb0\node_modules\@salesforce\core\lib\sfError.js:61:25)\n at Deploy.catch (C:\Users\Renan_Mastropaolo\AppData\Local\sfdx\client\7.165.0-65b4bb0\node_modules\@salesforce\command\lib\sfdxCommand.js:267:38)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async Deploy._run (C:\Users\Renan_Mastropaolo\AppData\Local\sfdx\client\7.165.0-65b4bb0\node_modules\@salesforce\command\lib\sfdxCommand.js:93:13)\n at async Config.runCommand (C:\Users\Renan_Mastropaolo\AppData\Local\sfdx\client\7.165.0-65b4bb0\node_modules\@oclif\core\lib\config\config.js:272:25)\n at async run (C:\Users\Renan_Mastropaolo\AppData\Local\sfdx\client\7.165.0-65b4bb0\node_modules\@oclif\core\lib\main.js:76:5)", "warnings": [], "commandName": "Deploy" }
a.) Issue seen in sfdx-cli/7.165.0 linux-x64 node-v16.13.2
ERROR running force:source:deploy: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 363786184-312086 (-1488516052)
b.) Works fine with sfdx-cli/7.159.0 linux-x64 node-v16.13.2
Hello all, just wanted to follow up to let you know that we've got a ticket created and will be looking into this soon. Feel free to post any additional details you come across. Thanks!
@Renan-Mastropaolo - Have witnessed it when downloading 7.165.0 as a tar.xz
Have also seen it on:
- Windows Server 2022
- Ubuntu 22.04
- Ubuntu 20.04
- macOS Monterey 12
Have also seen it when performing both a push and a deploy.
@iowillhoit - thanks for taking a look
It looks like this GACK is reproducable with a .bin extension static resource of zero size and the following meta file:
<?xml version="1.0" encoding="UTF-8"?>
<StaticResource xmlns="http://soap.sforce.com/2006/04/metadata">
<cacheControl>Public</cacheControl>
<contentType>application/octet-stream</contentType>
</StaticResource>
Hey @rob-baillie-ortoo, thanks for that .zip, I was able to replicate the issue with it!
As you mentioned the crux of the issue seems to revolve around the pleasewait.bin in that .zip which is just an empty file. But if you add any content to it at all, like just the letter a or a random string, then the deploy proceeds without throwing a GACK.
Is anybody in this thread that's encountering this issue purposefully trying to deploy an empty file with their metadata?
If not, could you please try the following?
- Set the
SFDX_MDAPI_TEMP_DIRenv var to a valid directory - Run the deploy again
- Compare the metadata files in your project to the ones in the
SFDX_MDAPI_TEMP_DIRdir - Post here with your results
- I'm particularly interested to see if any files show up as size 0 in the
SFDX_MDAPI_TEMP_DIRthat weren't size 0 in your project dir.
- I'm particularly interested to see if any files show up as size 0 in the
I'm wondering if for some reason the CLI is accidentally deleting file contents when zipping them up for some metadata types. I haven't been able to find any instances of that happening in my testing so far though.
We were purposefully deploying an empty file since we're in ISV using 1st generation packaging and cannot delete a defunct static resource - the ideal is that any deprecated binary files are empty. We have had to work around by putting contents into the file, which we would prefer not to have to do.
I have also now witnessed the problem with an empty css file in an LWC bundle
I had one empty file on staticResources, after I deleted that file the error is fixed. Thank you for the workaround.
Thanks for the extra context @rob-baillie-ortoo, I don't want you to have to put meaningless content in your files either but I'm not sure why these deploys work with versions lower than 7.163.0 of the CLI but not with newer versions.
I'll dig into that a little more but if I were to hazard a guess I'd say maybe earlier versions of the CLI didn't bundle empty files into the .zip sent to the org. Would that be acceptable for your use case?