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

sf org resume sandbox command returns error when the target org (user) language is not in English #2428

Open
ninoish opened this issue Aug 25, 2023 · 12 comments
Labels
area:signups bug Issue or pull request that identifies or fixes a bug owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. validated Version information for this issue has been validated

Comments

@ninoish
Copy link

ninoish commented Aug 25, 2023

Summary

sf org resume sandbox command always returns error if the target sandbox language is in Japanese (in non-English languages) regardless of the sandbox status.

Steps To Reproduce

  • Setup DevHub org login user language to Japanese.
  • Run sf command to create a Sandbox : sf org create sandbox -o devhub@username -l Developer -n test202308 --no-prompt --async
  • Then run sf org resume sandbox --name test202308
  • It returns Error (1): The sandbox test202308 cannot resume with status of 処理中..
    • "処理中" is "In Progress" in Japanese
    • It also returns Error (1): The sandbox test202308 cannot resume with status of 有効化中. after a while. "有効化中" is "Activating" in Japanese.
    • It also return Error (1): The sandbox test202308 cannot resume with status of 完了. after a while. "完了" is "Completed" in Japanese.

Expected result

Check the status of a sandbox creation, and log in to it if it's ready without error.

Actual result

Error (1): The sandbox test202308 cannot resume with status of 完了.

System Information

sf version --verbose --json

{
  "cliVersion": "@salesforce/cli/2.5.8",
  "architecture": "darwin-x64",
  "nodeVersion": "node-v18.16.0",
  "osVersion": "Darwin 22.6.0",
  "shell": "zsh",
  "rootPath": "/Users/ninoish/.volta/tools/image/packages/@salesforce/cli/lib/node_modules/@salesforce/cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.6 (core)",
    "@oclif/plugin-commands 2.2.22 (core)",
    "@oclif/plugin-help 5.2.17 (core)",
    "@oclif/plugin-not-found 2.3.37 (core)",
    "@oclif/plugin-plugins 3.2.6 (core)",
    "@oclif/plugin-search 0.0.22 (core)",
    "@oclif/plugin-update 3.1.32 (core)",
    "@oclif/plugin-version 1.3.8 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.48 (core)",
    "@oclif/plugin-which 2.2.30 (core)",
    "@salesforce/cli 2.5.8 (core)",
    "apex 2.3.10 (core)",
    "auth 2.8.12 (core)",
    "data 2.5.6 (core)",
    "deploy-retrieve 1.17.5 (core)",
    "functions 1.21.10 (user)",
    "info 2.6.39 (core)",
    "limits 2.3.30 (core)",
    "login 1.2.26 (core)",
    "org 2.10.0 (core)",
    "schema 2.3.23 (core)",
    "settings 1.4.25 (core)",
    "sobject 0.2.4 (core)",
    "source 2.10.31 (core)",
    "telemetry 2.3.0 (core)",
    "templates 55.5.10 (core)",
    "trust 2.6.1 (core)",
    "user 2.3.28 (core)"
  ]
}
@ninoish ninoish added the investigating We're actively investigating this issue label Aug 25, 2023
@github-actions
Copy link

Hello @ninoish 👋 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 and removed investigating We're actively investigating this issue labels Aug 25, 2023
@github-actions
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.

@github-actions
Copy link

Hello @ninoish 👋 None of the versions of sf you shared match the latest release.

Shared: 2.1.7
Latest: 2.5.8

Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue.
You can also try the rc and nightly releases! (docs)

After updating, share the full output of sf version --verbose --json

@github-actions
Copy link

Hello @ninoish 👋 None of the versions of sf you shared match the latest release.

Shared: 2.5.7
Latest: 2.5.8

Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue.
You can also try the rc and nightly releases! (docs)

After updating, share the full output of sf version --verbose --json

@github-actions github-actions bot added investigating We're actively investigating this issue validated Version information for this issue has been validated and removed more information required Issue requires more information or a response from the customer labels Aug 25, 2023
@AllanOricil
Copy link

Call saitama

@AllanOricil
Copy link

AllanOricil commented Aug 26, 2023

Started the creation with english
image

then, while the sandbox was beeing created, I changed my user language to Japonese (easter egg)
image

and finally tried to get its status again, which gave me the error mentioned above
image

then I changed my language to english once again and the issue was gone
image

finally I changed it to spanish and verified the same issue happens, proving it is not a problem with japonese, but with all other languages different than english.

image image

This is a problem with the sandbox creation api and not with the cli. The API return responses with i18n (daf) and the CLI expects english only.

I would not fix or improve this because:

1 - it does not break the sandbox creation.
image

Screenshot 2023-08-26 at 16 59 40

2 - it would be necessary to invest some effort to enable i18n

  • transform API responses to english after pooling the sandbox creation response
  • or apply i18n to the whole cli

@AllanOricil
Copy link

@ninoish (saitama) just use english and stop training because you are already too OP

@ninoish
Copy link
Author

ninoish commented Aug 31, 2023

Thank you @AllanOricil for kind repro steps!
I would go with switching user language before Sandbox creation in my automation process.

To fetch instance url, access token and user id

sfdx force:user:display --json -o SANDBOX_TARGET_ORG

to change use language

curl --location --request PATCH 'https://{INSTANCE_URL}/services/data/v58.0/sobjects/User/{USER_ID}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data '{
	"LanguageLocaleKey": "en_US"
}'
sf org create sandbox -o SANDBOX_TARGET_ORG -l Developer -n test202308 --no-prompt --async

Then run

sf org resume sandbox --name test202308

Then switch the source org language back.

curl --location --request PATCH 'https://{INSTANCE_URL}/services/data/v58.0/sobjects/User/{USER_ID}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data '{
	"LanguageLocaleKey": "ja"
}'

Of course Saitama wouldn't take such a workaround, he just smash it for sure.

@AllanOricil
Copy link

@ninoish u are a hero 👏
Saitama would be proud of u

@mshanemc mshanemc added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Sep 7, 2023
@git2gus
Copy link

git2gus bot commented Sep 7, 2023

This issue has been linked to a new work item: W-14085156

@mshanemc
Copy link
Contributor

mshanemc commented Sep 7, 2023

I'm calling this a bug and am going to ask the Sandbox team to have their API follow the docs and only return the enumerated values for Status which are all in English
https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_sandboxprocess.htm

@mshanemc mshanemc added the owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. label Sep 7, 2023
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.

@mshanemc mshanemc changed the title sf org resume command returns error when the target org (user) language is not in English sf org resume sandbox command returns error when the target org (user) language is not in English Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:signups bug Issue or pull request that identifies or fixes a bug owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

4 participants