-
Notifications
You must be signed in to change notification settings - Fork 79
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
Unsettled top-level await at sf force data bulk upsert
#3180
Comments
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. |
@pawel-id thanks for posting this. I was able to replicate it so I'll mark it as a bug |
This issue has been linked to a new work item: W-17606312 |
@pawel-id we got a fix for this currently in review ⬆ If you don't really need insertions to be in serial we suggest using the |
@cristiand391 Thank you! We need For our particular case, it looks like there is a better option. It turns out we actually don't need |
cool! |
This bug is fixed in 2.75.5 (Feb 5, 2025). |
Summary
Salesforce CLI upsert command is failing on node.js v22 due to unsettled top-level await. Problem is not happening on node.js v20 or lower.
Steps To Reproduce
The problem can be replicated on any scratch org or sandbox. The simplest way is to use empty scratch org as provided below.
Clone repository https://github.com/pawel-id/unsettled and use its content in replication steps
Check prerequisites:
Create scratch
sf org create scratch -f config/project-scratch-def.json -v devhub -w 10 -a scratch
Deploy the custom object
sf project deploy start -o scratch
Upsert some data
sf force data bulk upsert -f data/ProductExternalData.csv -s ProductExternalData__c -i MaterialCode__c -w 15 -r -o scratch
Expected result
Graceful exit returning code 0
Actual result
On node.js 22 or later the upsert command finishes with an error and returns code 13:
The error will not happen when using node.js v20 or lower instead of v22.
Additional information
The object and upserted data represent anonymised data from environment where this issue was originally encountered. It might be possible to create simpler replicable scenario.
Similar problem has been reported here #3112
System Information
Problem has been replicated on macos with bash and linux. Windows wasn't tested however it is expected to behave the same.
The text was updated successfully, but these errors were encountered: