Skip to content
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

Javascript await error from sfdx force:data:bulk:upsert --serial #3112

Open
JamesHaugheySlalom opened this issue Nov 14, 2024 · 3 comments
Open
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@JamesHaugheySlalom
Copy link

JamesHaugheySlalom commented Nov 14, 2024

Summary

As per https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_mig_bulk_data.htm we are continuing to use the sfdx commands to upsert file serially.
Running sfdx force:data:bulk:upsert --file $1 --sobject $2 --external-id ExternalId__c --target-org $targetOrg --serial --wait 60 - this command now gives the javascript error below

Bulk Upsert...Warning: Detected unsettled top-level await at file:///usr/local/lib/nodejs/lib/node_modules/@salesforce/cli/bin/run.js:15
await cli.run();

This is running in the latest container version of docker.io/salesforce/cli:2.68.0-full but seems to have been introduced in the 2.66.5 version as the 2.66.4 version does not error.

Steps To Reproduce

Run sfdx force:data:bulk:upsert --file $file --sobject $sobject --external-id $external_id --target-org $target_org --serial --wait 60 in the Salesforce cli container docker.io/salesforce/cli:2.68.0-full

Expected result

sfdx cli should have uploaded a file serially to Salesforce

Actual result

Javascript errored on a unsettled await command

System Information

{
  "architecture": "linux-x64",
  "cliVersion": "@salesforce/cli/2.68.0",
  "nodeVersion": "node-v22.10.0",
  "osVersion": "Linux 5.15.78-0-virt",
  "rootPath": "/usr/local/lib/nodejs/lib/node_modules/@salesforce/cli",
  "shell": "bash",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.8 (core)",
    "@oclif/plugin-commands 4.1.8 (core)",
    "@oclif/plugin-help 6.2.16 (core)",
    "@oclif/plugin-not-found 3.2.25 (core)",
    "@oclif/plugin-plugins 5.4.15 (core)",
    "@oclif/plugin-search 1.2.14 (core)",
    "@oclif/plugin-update 4.6.10 (core)",
    "@oclif/plugin-version 2.2.15 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.21 (core)",
    "@oclif/plugin-which 3.2.17 (core)",
    "@salesforce/cli 2.68.0 (core)",
    "apex 3.6.2 (core)",
    "api 1.3.2 (core)",
    "auth 3.6.73 (core)",
    "data 3.11.3 (core)",
    "deploy-retrieve 3.15.11 (core)",
    "info 3.4.18 (core)",
    "limits 3.3.39 (core)",
    "marketplace 1.3.4 (core)",
    "org 5.1.5 (core)",
    "packaging 2.9.0 (core)",
    "schema 3.3.40 (core)",
    "settings 2.4.4 (core)",
    "sobject 1.4.45 (core)",
    "telemetry 3.6.20 (core)",
    "templates 56.3.29 (core)",
    "trust 3.7.41 (core)",
    "user 3.6.2 (core)"
  ]
}
@JamesHaugheySlalom JamesHaugheySlalom added the investigating We're actively investigating this issue label Nov 14, 2024
Copy link

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.

Copy link

Hello @JamesHaugheySlalom 👋 It looks like you didn't include the full Salesforce CLI version information in your issue.
Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

A few more things to check:

  • Make sure you've provided detailed steps to reproduce your issue.
    • A repository that clearly demonstrates the bug is ideal.
  • Make sure you've installed the latest version of Salesforce CLI. (docs)
    • Better yet, try the rc or nightly versions. (docs)
  • Try running the doctor command to diagnose common issues.
  • Search GitHub for existing related issues.

Thank you!

@github-actions github-actions bot added more information required Issue requires more information or a response from the customer validated Version information for this issue has been validated investigating We're actively investigating this issue and removed investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer labels Nov 14, 2024
@WillieRuemmele
Copy link
Member

Hi @JamesHaugheySlalom - I've been testing this with the same version of the CLI/plugin/node and have yet to reproduce it ☹️

➜  sf version --verbose
 CLI Version:
	@salesforce/cli/2.68.0 published 0 days ago (Wed Nov 13 2024) (latest is 2.66.7)

 Architecture:
	darwin-arm64

 Node Version:
	node-v22.10.0

 Plugin Version:
	data 3.11.3 (core)


 OS and Version:
	Darwin 23.6.0

 Shell:
	zsh

 Root Path:
	/Users/william.ruemmele/.nvm/versions/node/v22.10.0/lib/node_modules/@salesforce/cli

➜  dreamhouse-lwc git:(main) ✗  hub:(GLOBAL - DevHub) scratch:(test-xvbapsbkzfgy@example.com)
 ➜  sf force data bulk upsert --file account.csv --sobject Account --external-id Id --wait 30 --target-org target --serial

Will poll the batch statuses every 5 seconds.
To fetch the status on your own, press CTRL+C and use the command:
...

Even looking at the 2.66.5 release. I don't see any changes that would obviously have that affect. It's still requiring the same minimum node version (18). I'll keep looking 💪 , just wanted to post an update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants