Closed bdovh closed 1 year ago
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.
local version where everything works good is 7.194.1
sfdx version --verbose --json
{
"cliVersion": "sfdx-cli/7.197.8",
"architecture": "darwin-x64",
"nodeVersion": "node-v18.15.0",
"osVersion": "Darwin 22.3.0",
"shell": "zsh",
"rootPath": "/Users/bdovh/.local/share/sfdx/client/7.197.8-077a68b",
"pluginVersions": [
"@mshanemc/plugin-streaming 1.1.7 (user)",
"@mshanemc/sfdx-sosl 1.1.0 (user)",
"@oclif/plugin-autocomplete 2.1.8 (core)",
"@oclif/plugin-commands 2.2.13 (core)",
"@oclif/plugin-help 5.2.9 (core)",
"@oclif/plugin-not-found 2.3.23 (core)",
"@oclif/plugin-plugins 2.4.4 (core)",
"@oclif/plugin-search 0.0.15 (core)",
"@oclif/plugin-update 3.1.10 (core)",
"@oclif/plugin-version 1.3.2 (core)",
"@oclif/plugin-warn-if-update-available 2.0.33 (core)",
"@oclif/plugin-which 2.2.18 (core)",
"apex 2.2.12 (core)",
"auth 2.7.12 (core)",
"community 2.2.9 (core)",
"custom-metadata 2.1.12 (core)",
"data 2.3.10 (core)",
"deploy-retrieve 1.8.12 (core)",
"evergreen 0.34.0 (user)",
"evergreen-build 0.20.2 (user)",
"info 2.6.6 (core)",
"limits 2.3.12 (core)",
"org 2.6.12 (core)",
"packaging 1.16.5 (core)",
"schema 2.3.7 (core)",
"settings 1.4.4 (core)",
"signups 1.4.12 (core)",
"source 2.10.2 (core)",
"telemetry 2.1.3 (core)",
"templates 55.4.7 (core)",
"trust 2.4.7 (core)",
"user 2.3.8 (core)",
"@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
"@salesforce/sfdx-scanner 3.11.0 (user)",
"sfdx-cli 7.197.8 (core)",
"shane-sfdx-plugins 4.43.0 (user)"
]
}
when I updated sfdx cli locally, issue is not reproduced on local computer
This also happens about 30% of the time on our CI runs. It started last Friday (4/21) and still persists.
; sfdx --version
sfdx-cli/7.198.6 darwin-x64 node-v18.15.0
This also happens about 30% of the time on our CI runs. It started last Friday (4/21) and still persists.
; sfdx --version sfdx-cli/7.198.6 darwin-x64 node-v18.15.0
for me it happens in 100% on the Github Actions flow, but 0% on the local machine
Tried to downgrade the sfdx cli version on github actions but this didn't help
switching runners from runs-on: ubuntu-latest to runs-on: macOS-latest didn't help
@bdovh - I can't reproduce this locally when running (e.g.) echo $(sfdx package version create -p DreamhouseLWC_-x -w 20 --json) > json.txt
. This isn't surprising since it also works for you locally. I don't know why it wouldn't work in GHA. Maybe redirect stdout and stderr? Does the command run successfully when run without --json
? Do you have any environment variables set in GHA that would cause output to behave differently such as SFDX_JSON_TO_STDOUT
or maybe SFDX_CONTENT_TYPE
? Does this happen with all commands or just package version create?
@shetzel
yes, command runs successfully without --json, but in such case it is hard to grab the package version id or error message in CI/CD scripts.
I don't have neither SFDX_JSON_TO_STDOUT
nor SFDX_CONTENT_TYPE
. It had suddenly broken without any change from our side
Can you redirect stderr and see if it's going there? Or maybe rather than the echo redirect do:
sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json $branchSwitch > out.txt
@shetzel well, I do have redirect to a file and the file is empty
how can I redirect strerr? if I can do that for sfdx command run on github actions?
The default shell for non-Windows GHA runner is bash, so you can try:
sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json $branchSwitch &> out.txt
or sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json $branchSwitch > out.txt 2>&1
@shetzel When we add the --dev-debug
flag to sfdx package version create
we see the following in the logs right at the end:
2023-05-04T22:57:02.946Z sfdx:telemetry@2.2.0 Unable to get oclif performance metrics Error: Perf results not available. Did you forget to call await Performance.collect()?
at get highlights [as highlights] (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/performance.js:50:15)
at process.<anonymous> (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-telemetry/lib/hooks/telemetryPrerun.js:72:55)
at Object.onceWrapper (node:events:628:26)
at process.emit (node:events:525:35)
2023-05-04T22:57:02.949Z sfdx:telemetry@2.2.0 Spawning "/usr/local/bin/node /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-telemetry/processes/upload /home/runner/.cache/sfdx /tmp/sfdx-telemetry/telemetry-b39a88d768d6f49ec9d18852eb28da9fabe41bd1.log"
note: this is on the release candidate version of sfdx
. One of our devs was running a slightly older version of sfdx that uses sfdx:telemetry@2.1.3
and they don't get the above error.
This also just started happening for us in Circle CI today. Same use case as above, CI script creates package version, parses JSON output to save package id. This was on sfdx-cli 7.199.7.
We were able to resolve for now by downgrading to 7.198.
We were able to resolve for now by downgrading to 7.198.
Downgrade didn't help to me
The default shell for non-Windows GHA runner is bash, so you can try:
sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json $branchSwitch &> out.txt
orsfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json $branchSwitch > out.txt 2>&1
I am going to try both the options
sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json $branchSwitch &> out.txt
and
sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json $branchSwitch > out.txt 2>&1
Also I tried to remove --post-install-script PostInstall switch (since I believe I have it duplicated in both sfdx-project.json and here) but that didn't help to resolve the issue
We were able to resolve for now by downgrading to 7.198.
which exact version of sfdx cli did you use which worked for you?
2023-05-05T09:02:02.984Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli
2023-05-05T09:02:02.985Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/package.json
2023-05-05T09:02:03.004Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/oclif.manifest.json
2023-05-05T09:02:03.005Z config:sfdx-cli using manifest from /usr/local/lib/node_modules/sfdx-cli/oclif.manifest.json
2023-05-05T09:02:03.016Z config reading user plugins pjson /home/runner/.local/share/sfdx/package.json
2023-05-05T09:02:03.016Z config loadJSON /home/runner/.local/share/sfdx/package.json
2023-05-05T09:02:03.016Z config loading plugins [
'@oclif/plugin-command-snapshot',
'@salesforce/plugin-release-management'
]
2023-05-05T09:02:03.019Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/package.json
2023-05-05T09:02:03.019Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/package.json
2023-05-05T09:02:03.019Z config loadJSON /usr/local/lib/node_modules/package.json
2023-05-05T09:02:03.019Z config loadJSON /usr/local/lib/node_modules/package.json
2023-05-05T09:02:03.020Z config loadJSON /usr/local/lib/package.json
2023-05-05T09:02:03.020Z config loadJSON /usr/local/lib/package.json
2023-05-05T09:02:03.020Z config loadJSON /usr/local/package.json
2023-05-05T09:02:03.020Z config loadJSON /usr/local/package.json
2023-05-05T09:02:03.020Z config loadJSON /usr/package.json
2023-05-05T09:02:03.021Z config loadJSON /usr/package.json
2023-05-05T09:02:03.021Z config loadJSON /package.json
2023-05-05T09:02:03.021Z config loadJSON /package.json
(node:2195) Error Plugin: sfdx-cli: could not find package.json with {
type: 'dev',
root: '/usr/local/lib/node_modules/sfdx-cli',
name: '@oclif/plugin-command-snapshot'
}
module: @oclif/core@2.7.1
task: loadPlugins
plugin: sfdx-cli
root: /usr/local/lib/node_modules/sfdx-cli
See more details with DEBUG=
(Use node --trace-warnings ...
to show where the warning was created)
Error Plugin: sfdx-cli: could not find package.json with {
type: 'dev',
root: '/usr/local/lib/node_modules/sfdx-cli',
name: '@oclif/plugin-command-snapshot'
}
at Plugin.load (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/plugin.js:108:19)
at async /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:511:17
at async Promise.all (index 0)
at async Config.loadPlugins (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:498:9)
at async Config.loadDevPlugins (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:179:21)
at async Config.loadPluginsAndCommands (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:158:9)
at async Config.load (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:145:9)
at async Object.run (/usr/local/lib/node_modules/sfdx-cli/dist/cli.js:105:13)
module: @oclif/core@2.7.1
task: loadPlugins
plugin: sfdx-cli
root: /usr/local/lib/node_modules/sfdx-cli
See more details with DEBUG=
2023-05-05T09:02:03.023Z config loading plugins [
'@oclif/plugin-autocomplete',
'@oclif/plugin-commands',
'@oclif/plugin-help',
'@oclif/plugin-version',
'@oclif/plugin-not-found',
'@oclif/plugin-plugins',
'@oclif/plugin-search',
'@oclif/plugin-update',
'@oclif/plugin-warn-if-update-available',
'@oclif/plugin-which',
'@salesforce/plugin-apex',
'@salesforce/plugin-auth',
'@salesforce/plugin-community',
'@salesforce/plugin-custom-metadata',
'@salesforce/plugin-data',
'@salesforce/plugin-info',
'@salesforce/plugin-limits',
'@salesforce/plugin-org',
'@salesforce/plugin-packaging',
'@salesforce/plugin-settings',
'@salesforce/plugin-signups',
'@salesforce/plugin-source',
'@salesforce/plugin-schema',
'@salesforce/plugin-telemetry',
'@salesforce/plugin-templates',
'@salesforce/plugin-trust',
'@salesforce/plugin-user',
'@salesforce/sfdx-plugin-lwc-test'
]
2023-05-05T09:02:03.031Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-autocomplete
2023-05-05T09:02:03.031Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-autocomplete/package.json
2023-05-05T09:02:03.032Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-commands
2023-05-05T09:02:03.032Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-commands/package.json
2023-05-05T09:02:03.032Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-update
2023-05-05T09:02:03.032Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-update/package.json
2023-05-05T09:02:03.032Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-community
2023-05-05T09:02:03.032Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-community/package.json
2023-05-05T09:02:03.032Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-custom-metadata
2023-05-05T09:02:03.032Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-custom-metadata/package.json
2023-05-05T09:02:03.032Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-telemetry
2023-05-05T09:02:03.032Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-telemetry/package.json
2023-05-05T09:02:03.032Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-help
2023-05-05T09:02:03.032Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-help/package.json
2023-05-05T09:02:03.032Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-version
2023-05-05T09:02:03.032Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-version/package.json
2023-05-05T09:02:03.032Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-not-found
2023-05-05T09:02:03.032Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-not-found/package.json
2023-05-05T09:02:03.032Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-plugins
2023-05-05T09:02:03.032Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-plugins/package.json
2023-05-05T09:02:03.032Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-search
2023-05-05T09:02:03.032Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-search/package.json
2023-05-05T09:02:03.032Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-warn-if-update-available
2023-05-05T09:02:03.032Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-warn-if-update-available/package.json
2023-05-05T09:02:03.032Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-which
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-which/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-apex
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-apex/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-auth
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-auth/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-data
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-data/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-info
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-info/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-limits
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-limits/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-org
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-org/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-packaging
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-packaging/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-settings
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-settings/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-signups
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-signups/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-source
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-source/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-schema
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-schema/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-templates
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-templates/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-trust
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-trust/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-user
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-user/package.json
2023-05-05T09:02:03.033Z config reading core plugin /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/sfdx-plugin-lwc-test
2023-05-05T09:02:03.033Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/sfdx-plugin-lwc-test/package.json
(node:2195) Error Plugin: sfdx-cli: could not find package.json with {
type: 'dev',
root: '/usr/local/lib/node_modules/sfdx-cli',
name: '@salesforce/plugin-release-management'
}
module: @oclif/core@2.7.1
task: loadPlugins
plugin: sfdx-cli
root: /usr/local/lib/node_modules/sfdx-cli
See more details with DEBUG=
Error Plugin: sfdx-cli: could not find package.json with {
type: 'dev',
root: '/usr/local/lib/node_modules/sfdx-cli',
name: '@salesforce/plugin-release-management'
}
at Plugin.load (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/plugin.js:108:19)
at async /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:511:17
at async Promise.all (index 1)
at async Config.loadPlugins (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:498:9)
at async Config.loadDevPlugins (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:179:21)
at async Config.loadPluginsAndCommands (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:158:9)
at async Config.load (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:145:9)
at async Object.run (/usr/local/lib/node_modules/sfdx-cli/dist/cli.js:105:13)
module: @oclif/core@2.7.1
task: loadPlugins
plugin: sfdx-cli
root: /usr/local/lib/node_modules/sfdx-cli
See more details with DEBUG=
2023-05-05T09:02:03.035Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-autocomplete/oclif.manifest.json
2023-05-05T09:02:03.035Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-commands/oclif.manifest.json
2023-05-05T09:02:03.035Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-update/oclif.manifest.json
2023-05-05T09:02:03.035Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-community/oclif.manifest.json
2023-05-05T09:02:03.036Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-custom-metadata/oclif.manifest.json
2023-05-05T09:02:03.036Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-telemetry/oclif.manifest.json
2023-05-05T09:02:03.036Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-help/oclif.manifest.json
2023-05-05T09:02:03.036Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-version/oclif.manifest.json
2023-05-05T09:02:03.036Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-not-found/oclif.manifest.json
2023-05-05T09:02:03.036Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-plugins/oclif.manifest.json
2023-05-05T09:02:03.037Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-search/oclif.manifest.json
2023-05-05T09:02:03.037Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-warn-if-update-available/oclif.manifest.json
2023-05-05T09:02:03.037Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-which/oclif.manifest.json
2023-05-05T09:02:03.037Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-apex/oclif.manifest.json
2023-05-05T09:02:03.037Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-auth/oclif.manifest.json
2023-05-05T09:02:03.037Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-data/oclif.manifest.json
2023-05-05T09:02:03.038Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-info/oclif.manifest.json
2023-05-05T09:02:03.038Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-limits/oclif.manifest.json
2023-05-05T09:02:03.038Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-org/oclif.manifest.json
2023-05-05T09:02:03.038Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-packaging/oclif.manifest.json
2023-05-05T09:02:03.038Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-settings/oclif.manifest.json
2023-05-05T09:02:03.038Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-signups/oclif.manifest.json
2023-05-05T09:02:03.039Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-source/oclif.manifest.json
2023-05-05T09:02:03.039Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-schema/oclif.manifest.json
2023-05-05T09:02:03.039Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-templates/oclif.manifest.json
2023-05-05T09:02:03.039Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-trust/oclif.manifest.json
2023-05-05T09:02:03.039Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-user/oclif.manifest.json
2023-05-05T09:02:03.040Z config loadJSON /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/sfdx-plugin-lwc-test/oclif.manifest.json
2023-05-05T09:02:03.041Z config:@oclif/plugin-autocomplete using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-autocomplete/oclif.manifest.json
2023-05-05T09:02:03.041Z config:@oclif/plugin-commands using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-commands/oclif.manifest.json
2023-05-05T09:02:03.041Z config:@oclif/plugin-update using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-update/oclif.manifest.json
2023-05-05T09:02:03.042Z config:@salesforce/plugin-community using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-community/oclif.manifest.json
2023-05-05T09:02:03.042Z config:@salesforce/plugin-custom-metadata using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-custom-metadata/oclif.manifest.json
2023-05-05T09:02:03.042Z config:@salesforce/plugin-telemetry using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-telemetry/oclif.manifest.json
2023-05-05T09:02:03.042Z config:@oclif/plugin-help using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-help/oclif.manifest.json
2023-05-05T09:02:03.042Z config:@oclif/plugin-version using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-version/oclif.manifest.json
2023-05-05T09:02:03.043Z config:@oclif/plugin-not-found using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-not-found/oclif.manifest.json
2023-05-05T09:02:03.043Z config:@oclif/plugin-plugins using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-plugins/oclif.manifest.json
2023-05-05T09:02:03.043Z config:@oclif/plugin-search using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-search/oclif.manifest.json
2023-05-05T09:02:03.043Z config:@oclif/plugin-warn-if-update-available using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-warn-if-update-available/oclif.manifest.json
2023-05-05T09:02:03.043Z config:@oclif/plugin-which using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/plugin-which/oclif.manifest.json
2023-05-05T09:02:03.043Z config:@salesforce/plugin-apex using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-apex/oclif.manifest.json
2023-05-05T09:02:03.044Z config:@salesforce/plugin-auth using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-auth/oclif.manifest.json
2023-05-05T09:02:03.044Z config:@salesforce/plugin-data using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-data/oclif.manifest.json
2023-05-05T09:02:03.045Z config:@salesforce/plugin-info using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-info/oclif.manifest.json
2023-05-05T09:02:03.045Z config:@salesforce/plugin-limits using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-limits/oclif.manifest.json
2023-05-05T09:02:03.046Z config:@salesforce/plugin-org using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-org/oclif.manifest.json
2023-05-05T09:02:03.047Z config:@salesforce/plugin-packaging using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-packaging/oclif.manifest.json
2023-05-05T09:02:03.047Z config:@salesforce/plugin-settings using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-settings/oclif.manifest.json
2023-05-05T09:02:03.047Z config:@salesforce/plugin-signups using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-signups/oclif.manifest.json
2023-05-05T09:02:03.049Z config:@salesforce/plugin-source using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-source/oclif.manifest.json
2023-05-05T09:02:03.050Z config:@salesforce/plugin-schema using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-schema/oclif.manifest.json
2023-05-05T09:02:03.052Z config:@salesforce/plugin-templates using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-templates/oclif.manifest.json
2023-05-05T09:02:03.052Z config:@salesforce/plugin-trust using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-trust/oclif.manifest.json
2023-05-05T09:02:03.053Z config:@salesforce/plugin-user using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-user/oclif.manifest.json
2023-05-05T09:02:03.053Z config:@salesforce/sfdx-plugin-lwc-test using manifest from /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/sfdx-plugin-lwc-test/oclif.manifest.json
2023-05-05T09:02:03.131Z config config done
2023-05-05T09:02:03.131Z sfdx OS:
2023-05-05T09:02:03.131Z sfdx platform: linux
2023-05-05T09:02:03.131Z sfdx architecture: x64
2023-05-05T09:02:03.131Z sfdx release: 5.15.0-1036-azure
2023-05-05T09:02:03.131Z sfdx shell: bash
2023-05-05T09:02:03.131Z sfdx NODE:
2023-05-05T09:02:03.132Z sfdx version: 18.16.0
2023-05-05T09:02:03.132Z sfdx CLI:
2023-05-05T09:02:03.132Z sfdx version: 7.194.1
2023-05-05T09:02:03.132Z sfdx channel: stable
2023-05-05T09:02:03.132Z sfdx bin: sfdx
2023-05-05T09:02:03.132Z sfdx data: /home/runner/.local/share/sfdx
2023-05-05T09:02:03.132Z sfdx cache: /home/runner/.cache/sfdx
2023-05-05T09:02:03.132Z sfdx config: /home/runner/.config/sfdx
2023-05-05T09:02:03.132Z sfdx ENV:
2023-05-05T09:02:03.132Z sfdx NODE_OPTIONS:
The default shell for non-Windows GHA runner is bash, so you can try:
sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json $branchSwitch &> out.txt
orsfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json $branchSwitch > out.txt 2>&1
I run all, and received a lot of output but none of it explains why there is no JSON output
Downgrading to 7.182.1
solved the problem for me.
We were able to resolve for now by downgrading to 7.198.
which exact version of sfdx cli did you use which worked for you?
sfdx-v7.198.3-1a39201-linux-x64
I should add, I also disabled telemetry because of the (likely unrelated) errors in the posted debugs above. But just this alone did not solve the issue when running 7.199.7.
To disable, I used sfdx config:set disableTelemetry=true --global
The telemetry thing may be a red herring, but I'm not in a position to be messing with my CI and possibly breaking it again right now. May try removing it later.
There could be multiple bugs. I'm not sure if telemetry is a red herring either.
I just tried to downgrade to 7.182.1 and received an error Error: command package:version:create not found
even when I reverted to sfdx force:package:version:create, it didn't help
@bdovh - CLI v7.182.1 did not have the command alias setup yet for using package version create
. With the version of the plugin in that CLI, you'd need to use force:package:version:create
. I'm puzzled why downgrading to 7.182.1 and using force:package:version:create
doesn't work for you but it works for others.
This issue has been linked to a new work item: W-13169031
CLI v7.182.1 did not have the command alias setup yet for using
package version create
. With the version of the plugin in that CLI, you'd need to useforce:package:version:create
. I'm puzzled why downgrading to 7.182.1 and usingforce:package:version:create
doesn't work for you but it works for others.
maybe there are some additional errors, I don't know. But when I downgrade and use force:package:version:create, I don't receive any debugs, it just fails and drops.
Just wanted to confirm I am running into the same issue with the current stable version: sfdx-cli/7.199.7 linux-x64 node-v18.16.0
Thanks for creating the work-item!
This could be an issue with nodejs versions. I am not able to reproduce it with v18.14.2 but I can with v18.16.0. Can people test this theory by trying different nodejs versions with npm installs of the CLI and retesting?
FYI I tried to downgrade to sfdx-cli 7.182.1 as suggested and now I get the following error message within a few seconds where it used to hang and return no result with higher versions:
{ "status": 1, "name": "", "message": "An unexpected error occurred. Please contact Salesforce Support and provide the following error code: 885348693-311119 (-629443337)", "exitCode": 1, "context": "PackageVersionCreateCommand", "stack": "An unexpected error occurred. Please contact Salesforce Support and provide the following error code: 885348693-311119 (-629443337)\n at SfError.wrap (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/core/lib/sfError.js:84:25)\n at PackageVersionCreateCommand.catch (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/ToolbeltCommand.js:255:44)\n at async PackageVersionCreateCommand._run (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/command/lib/sfdxCommand.js:106:13)\n at async Config.runCommand (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:272:25)\n at async run (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/core/lib/main.js:74:5)\nCaused by: Error: An unexpected error occurred. Please contact Salesforce Support and provide the following error code: 885348693-311119 (-629443337)\n at /usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/package/packageUtils.js:712:27\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)", "warnings": [], "commandName": "PackageVersionCreateCommand" }
I'll try downgrading node and report on that.
Worked like a charm with node 18.14.2 as suggested @shetzel
Thanks for that @eschweitzer78! I am getting the same issue as all of you. Adding the config below to the GHA solved the issue for me as you have suggested.
- name: Install Node.js 18.14.2
uses: actions/setup-node@v2
with:
node-version: '18.14.2'
Hopefully this issue will get resolved soon. I have tried almost everything that people have suggested here, like downgrading SFDX, adding a --json, etc. The command works fine locally, but for sure I am not using the latest node version.
There appears to be a handful of projects having issues with the LTS version of nodejs, 18.16.0. Please refer to this pinned notification: https://github.com/forcedotcom/cli/issues/2125
@bdovh and others experiencing this in CI, note that GitHub Actions is using nodejs v18.16.0 in Ubuntu 20 / 22 (latest) if the Node version is specified just as 18 so you'll need to provide a specific minor version, e.g., 18.15.
We've got some workarounds and a fixed RC available. I'd love to know that this is working for you. https://github.com/forcedotcom/cli/issues/2125
This could be an issue with nodejs versions. I am not able to reproduce it with v18.14.2 but I can with v18.16.0. Can people test this theory by trying different nodejs versions with npm installs of the CLI and retesting?
Do we even control which nodejs version is used? We just use the script to install sfdx cli and in that script we can select the SFDX CLI version but not the nodejs version
node --version
npm install -g sfdx-cli@7.194.1
export SFDX_DISABLE_DNS_CHECK=true
echo "Version of SFDX CLI is: $(sfdx --version)"
We've got some workarounds and a fixed RC available. I'd love to know that this is working for you.
2125
how can we check that?
Tried to amend my current github action setup script
node --version
npm install -g sfdx-cli
with the following version
node --version
npm install -g sfdx-cli
sfdx update --version 7.200.7
sfdx update stable-rc
sfdx version
sfdx update --version 7.198.6
However, this didn't help
Summary
SFDX Force package version create command doesn't return any output.
Steps To Reproduce:
Repository to reproduce: dreamhouse-lwc
NOTE: If your issue is not reproducable by dreamhouse-lwc, i.e. requires specific metadata or files, we require a link to a simple Salesforce project repository with a script to setup a scratch org that reproduces your problem.
Create github action yaml script to create package version like following: echo "Creating new version without validation (skipping validation): sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json $branchSwitch" echo "Running --json command:" sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json $branchSwitch echo "Running command without json:" sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation $branchSwitch echo "Running > create package version:" echo $(sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json $branchSwitch) > createPackageVersion.txt echo "Created package version JSON: $(cat createPackageVersion.txt)" status=$(cat createPackageVersion.txt | jq '.status' -r ) echo "Status: $status" message=$(jq '.warnings | join("\r\n")' -r createPackageVersion.txt)$(jq '.result.Error | join("\r\n")' -r createPackageVersion.txt) echo "Message: $message"
Run manually the github action workflow to build a package version
Creating new version without validation (skipping validation): sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json -b test Running --json command: Running command without json: Version create.... Version create.... ⣾ Version create.... ⣽ Version create.... ⣻ Version create.... ⢿ Version create.... ⡿ Version create.... ⣟ Version create.... ⣯ Version create.... ⣷ Version create.... ⣾ Version create.... ⣽ Version create.... ⣻ Version create.... ⢿ Version create.... done Running > create package version: Created package version JSON: Status: Message:
Expected result
Describe what should have happened.
I expect non-empty JSON result to be returned, similar to results when run on local machine, either failed one
{ "code": 1, "message": "No package ID was found in Dev Hub for package ID: 0Ho.", "name": "ErrorNoIdInHubError", "status": 1, "stack": "ErrorNoIdInHubError: No package ID was found in Dev Hub for package ID: 0Ho1n000000PAusCAG. at Messages.createError", "exitCode": 1, "warnings": [] }
or successful
{ "status": 0, "result": { "Id": "08c5Y000000CdUiQAK", "Status": "Success", "Package2Id": "0Ho", "Package2VersionId": "05i", "SubscriberPackageVersionId": "04t", "Tag": null, "Branch": null, "Error": [], "CreatedDate": "2023-04-25 15:29", "HasMetadataRemoved": false, "CreatedBy": "0055Y00000Fse6NQAR" }, "warnings": [] }
Actual result
Describe what actually happened.
Empty json result is returned.
Creating new version without validation (skipping validation): sfdx package version create -d force-app --post-install-script PostInstall -x -w 60 --skip-validation --json -b test Running --json command: Running command without json: Version create.... Version create.... ⣾ Version create.... ⣽ Version create.... ⣻ Version create.... ⢿ Version create.... ⡿ Version create.... ⣟ Version create.... ⣯ Version create.... ⣷ Version create.... ⣾ Version create.... ⣽ Version create.... ⣻ Version create.... ⢿ Version create.... done Running > create package version: Created package version JSON: Status: Message:
System Information
Which shell/terminal are you using? (e.g. bash, zsh, powershell 5, powershell 7, cmd.exe, etc.)
If you are using
sfdx
sfdx version --verbose --json
If you are using
sf
sf version --verbose --json
Paste the output here
Version of SFDX CLI is: sfdx-cli/7.197.8 linux-x64 node-v18.16.0
Additional information
Feel free to attach a screenshot.