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 package version create - Language code not valid Winter '24 #2518

Closed
marsh-mellow opened this issue Oct 10, 2023 · 25 comments
Closed

sf package version create - Language code not valid Winter '24 #2518

marsh-mellow opened this issue Oct 10, 2023 · 25 comments
Labels
area:packaging more information required Issue requires more information or a response from the customer owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. tracked elsewhere The work is being tracked internally by Salesforce validated Version information for this issue has been validated

Comments

@marsh-mellow
Copy link

marsh-mellow commented Oct 10, 2023

Summary

This issue appears to have started when Salesforce version was updated. Error message says this language isn't available when everything was packaging before the upgrade.

sf package version create -w 100 -x -c -v -p 0Hxxx
» Warning: Plugin @salesforce/plugin-packaging (1.16.2) differs from the version specified by sf (1.26.1)
Version create.... -
Error (1): Can’t create package version. en_CA isn’t a valid language code. Review the language codes listed on this Salesforce Help page: https://help.salesforce.com/s/articleView?id=sf.faq_getstart_what_languages_does.htm&type=5. Then update the language code, and try creating the package

Steps To Reproduce

image

Expected result

Package was built without error

Actual result

Error (1): Can’t create package version. en_CA isn’t a valid language code. Review the language codes listed on this Salesforce Help page: https://help.salesforce.com/s/articleView?id=sf.faq_getstart_what_languages_does.htm&type=5. Then update the language code, and try creating the package

System Information

Windows Bash MINGW64

{
  "cliVersion": "@salesforce/cli/2.11.8",
  "architecture": "win32-x64",
  "nodeVersion": "node-v16.15.1",
  "osVersion": "Windows_NT 10.0.19045",
  "shell": "C:\\Program Files\\Git\\usr\\bin\\bash.exe",
  "rootPath": "C:\\Users\\marsham1\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.8 (core)",
    "@oclif/plugin-commands 2.2.26 (core)",
    "@oclif/plugin-help 5.2.19 (core)",
    "@oclif/plugin-not-found 2.4.1 (core)",
    "@oclif/plugin-plugins 3.8.2 (core)",
    "@oclif/plugin-search 0.0.22 (core)",
    "@oclif/plugin-update 3.2.3 (core)",
    "@oclif/plugin-version 1.3.10 (core)",
    "@oclif/plugin-warn-if-update-available 2.1.0 (core)",
    "@oclif/plugin-which 2.2.32 (core)",
    "@salesforce/cli 2.11.8 (core)",
    "apex 2.3.15 (core)",
    "auth 2.8.17 (core)",
    "community 2.2.8 (user)",
    "data 2.5.12 (core)",
    "deploy-retrieve 1.18.3 (core)",
    "info 2.6.45 (core)",
    "limits 2.3.35 (core)",
    "login 1.2.31 (core)",
    "marketplace 0.2.2 (core)",
    "org 2.10.8 (core)",
    "packaging 1.16.2 (user)",
    "schema 2.3.28 (core)",
    "settings 1.4.30 (core)",
    "sobject 0.2.7 (core)",
    "source 2.10.36 (core)",
    "telemetry 2.3.4 (core)",
    "templates 55.5.13 (core)",
    "trust 2.6.15 (core)",
    "user 2.3.32 (core)"
  ]
}
@marsh-mellow marsh-mellow added the investigating We're actively investigating this issue label Oct 10, 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 @marsh-mellow 👋 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 Oct 10, 2023
@marsh-mellow
Copy link
Author

CLI Version:
@salesforce/cli/2.11.8

Architecture:
win32-x64

Node Version:
node-v16.15.1

Plugin Version:
@oclif/plugin-autocomplete 2.3.8 (core)
@oclif/plugin-commands 2.2.26 (core)
@oclif/plugin-help 5.2.19 (core)
@oclif/plugin-not-found 2.4.1 (core)
@oclif/plugin-plugins 3.8.2 (core)
@oclif/plugin-search 0.0.22 (core)
@oclif/plugin-update 3.2.3 (core)
@oclif/plugin-version 1.3.10 (core)
@oclif/plugin-warn-if-update-available 2.1.0 (core)
@oclif/plugin-which 2.2.32 (core)
@salesforce/cli 2.11.8 (core)
apex 2.3.15 (core)
auth 2.8.17 (core)
community 2.2.8 (user)
data 2.5.12 (core)
deploy-retrieve 1.18.3 (core)
info 2.6.45 (core)
limits 2.3.35 (core)
login 1.2.31 (core)
marketplace 0.2.2 (core)
org 2.10.8 (core)
packaging 1.16.2 (user)
schema 2.3.28 (core)
settings 1.4.30 (core)
sobject 0.2.7 (core)
source 2.10.36 (core)
telemetry 2.3.4 (core)
templates 55.5.13 (core)
trust 2.6.15 (core)
user 2.3.32 (core)

OS and Version:
Windows_NT 10.0.19045

Shell:
C:\Program Files\Git\usr\bin\bash.exe

Root Path:
C:\Users\marsham1\AppData\Roaming\npm\node_modules@salesforce\cli

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

Updated 3 plugins

  • @salesforce/plugin-packaging
  • @salesforce/plugin-community
  • @salesforce/plugin-signups

using npm install --global @salesforce/plugin-packaging

Same Error

Error (1): Can’t create package version. en_CA isn’t a valid language code. Review the language codes listed on this Salesforce Help page: https://help.salesforce.com/s/articleView?id=sf.faq_getstart_what_languages_does.htm&type=5. Then update the language code, and tryVersion create.... done

@marsh-mellow
Copy link
Author

Confirmed scratches are still working

@marsh-mellow
Copy link
Author

{ "code": 1, "message": "Can’t create package version. en_CA isn’t a valid language code. Review the language codes listed on this Salesforce Help page: https://help.salesforce.com/s/articleView?id=sf.faq_getstart_what_languages_does.htm&type=5. Then update the language code, and try creating the package version again.", "name": "INVALID_INPUT", "status": 1, "stack": "INVALID_INPUT: Can’t create package version. en_CA isn’t a valid language code. Review the language codes listed on this Salesforce Help page: https://help.salesforce.com/s/articleView?id=sf.faq_getstart_what_languages_does.htm&type=5. Then update the language code, and try creating the package version again.\n at HttpApi.getError (C:\\Users\\marsham1\\AppData\\Local\\sf\\node_modules\\@salesforce\\sf-plugins-core\\node_modules\\jsforce\\lib\\http-api.js:307:12)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async C:\\Users\\marsham1\\AppData\\Local\\sf\\node_modules\\@salesforce\\sf-plugins-core\\node_modules\\jsforce\\lib\\http-api.js:154:23\n at async Tooling.create (C:\\Users\\marsham1\\AppData\\Local\\sf\\node_modules\\@salesforce\\sf-plugins-core\\node_modules\\jsforce\\lib\\connection.js:929:133)\n at async PackageVersionCreate.packageVersionCreate (C:\\Users\\marsham1\\AppData\\Local\\sf\\node_modules\\@salesforce\\packaging\\lib\\package\\packageVersionCreate.js:486:30)\n at async Function.create (C:\\Users\\marsham1\\AppData\\Local\\sf\\node_modules\\@salesforce\\packaging\\lib\\package\\packageVersion.js:92:30)\n at async PackageVersionCreateCommand.run (C:\\Users\\marsham1\\AppData\\Local\\sf\\node_modules\\@salesforce\\plugin-packaging\\lib\\commands\\package\\version\\create.js:60:24)\n at async PackageVersionCreateCommand._run (C:\\Users\\marsham1\\AppData\\Local\\sf\\node_modules\\@salesforce\\sf-plugins-core\\node_modules\\@oclif\\core\\lib\\command.js:108:22)\n at async Config.runCommand (C:\\Users\\marsham1\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli\\node_modules\\@oclif\\core\\lib\\config\\config.js:314:25)\n at async run (C:\\Users\\marsham1\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli\\node_modules\\@oclif\\core\\lib\\main.js:89:16)", "exitCode": 1, "warnings": [] }

@mshanemc
Copy link
Contributor

@marsh-mellow FYI you can update that plugin to latest by saying

sf plugins uninstall packaging
sf plugins install packaging@latest

not npm -g.

I doubt it'll solve your problem because this looks like a server/release issue.

@iowillhoit
Copy link
Contributor

I agree with Shane. This does not look like a CLI issue. Can you try uninstalling these plugins with
npm uninstall @salesforce/plugin-packaging @salesforce/plugin-community @salesforce/plugin-signups --global

And installing them with the CLI itself:
sf plugins install @salesforce/plugin-packaging @salesforce/plugin-community @salesforce/plugin-signups

Do you have any other languages in your project?

@iowillhoit iowillhoit added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Oct 11, 2023
@marsh-mellow
Copy link
Author

Just the en_CA, fr_Ca and of course the default en_US

@marsh-mellow
Copy link
Author

Tried the uninstall in npm and install with SF. Same error. I also have a ticket open with salesforce.

@marsh-mellow
Copy link
Author

marsh-mellow commented Oct 13, 2023

FYI Here is the new version output after plugin install

  "cliVersion": "@salesforce/cli/2.11.8",
  "architecture": "win32-x64",
  "nodeVersion": "node-v16.15.1",
  "osVersion": "Windows_NT 10.0.19045",
  "shell": "C:\\Program Files\\Git\\usr\\bin\\bash.exe",
  "rootPath": "C:\\Users\\marsham1\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.8 (core)",
    "@oclif/plugin-commands 2.2.26 (core)",
    "@oclif/plugin-help 5.2.19 (core)",
    "@oclif/plugin-not-found 2.4.1 (core)",
    "@oclif/plugin-plugins 3.8.2 (core)",
    "@oclif/plugin-search 0.0.22 (core)",
    "@oclif/plugin-update 3.2.3 (core)",
    "@oclif/plugin-version 1.3.10 (core)",
    "@oclif/plugin-warn-if-update-available 2.1.0 (core)",
    "@oclif/plugin-which 2.2.32 (core)",
    "@salesforce/cli 2.11.8 (core)",
    "apex 2.3.15 (core)",
    "auth 2.8.17 (core)",
    "community 2.4.5 (user)",
    "data 2.5.12 (core)",
    "deploy-retrieve 1.18.3 (core)",
    "info 2.6.45 (core)",
    "limits 2.3.35 (core)",
    "login 1.2.31 (core)",
    "marketplace 0.2.2 (core)",
    "org 2.10.8 (core)",
    "packaging 1.26.3 (user)",
    "schema 2.3.28 (core)",
    "settings 1.4.30 (core)",
    "signups 1.5.5 (user)",
    "sobject 0.2.7 (core)",
    "source 2.10.36 (core)",
    "telemetry 2.3.4 (core)",
    "templates 55.5.13 (core)",
    "trust 2.6.15 (core)",
    "user 2.3.32 (core)"
  ]
}```

@iowillhoit
Copy link
Contributor

Interesting, I am assuming you are not having any issues with fr_Ca? Let us know what you find out on the Case, it may help someone else out 👍

@BMTBalazsBiro
Copy link

I have experienced the same with 'hu'.

"Can’t create package version. hu isn’t a valid language code."

@marsh-mellow
Copy link
Author

Still waiting on Case with Salesforce. Will update here once I know more.

@paulhxcd
Copy link

Does anyone have any updates on this? We've also logged a case with Salesforce but not making any progress so far.

@shetzel shetzel added tracked elsewhere The work is being tracked internally by Salesforce owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. area:packaging labels Oct 19, 2023
@github-actions
Copy link

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.

@shetzel
Copy link
Contributor

shetzel commented Oct 19, 2023

What's the case number? I'll check on it.

@paulhxcd
Copy link

paulhxcd commented Oct 19, 2023

Thanks @shetzel our case number is 45520085

I also reached out to the packaging PM

@shetzel
Copy link
Contributor

shetzel commented Oct 20, 2023

That case number doesn't match something related to this issue. Possibly a different number?

@Mr-Modus
Copy link

Our case number is #45474747

@paulhxcd
Copy link

@shetzel sorry I'm confused, case 45520085 is exactly about this issue!

@shetzel
Copy link
Contributor

shetzel commented Oct 24, 2023

@paulhxcd - sorry, I checked with the wrong system (which referenced a different case). Dileep appears to be helping to move the case along.

@marsh-mellow
Copy link
Author

marsh-mellow commented Oct 26, 2023

Response from Salesforce today about issue

=============================

I would like to provide an update regarding the issue pertaining to the new package version creation. After our investigation, our product team has identified a critical bug. This bug arises when a user attempts to create a package version, and we identify their locale (in this case, en_CA) to create a package version. Currently, our validation method for supported languages is stringent, allowing only "Fully Supported Languages." We are working to expand this to accommodate all types of languages supported by the organization.

Our team is actively working to resolve this high-priority bug. In the meantime, if this issue is hindering your package version creation, there is a temporary workaround available. You can specify a fully supported language code, such as en_US, via the CLI command (using --language=en_US), which should enable you to create versions successfully.

@marsh-mellow
Copy link
Author

I confirmed the workaround does work with the language switch.
sf package version create -c -w 100 -x -v hub -p XXX --language en_US

@marsh-mellow
Copy link
Author

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:packaging more information required Issue requires more information or a response from the customer owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. tracked elsewhere The work is being tracked internally by Salesforce validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

7 participants