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

Error on Amazon Linux for JWT Authentication #2545

Closed
thunderpycode opened this issue Oct 31, 2023 · 12 comments
Closed

Error on Amazon Linux for JWT Authentication #2545

thunderpycode opened this issue Oct 31, 2023 · 12 comments
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@thunderpycode
Copy link

thunderpycode commented Oct 31, 2023

Hello,

While running new sf authentication command in JWT on Amazon Linux facing the error. Details are given below:

Operating System: Amazon Linux 2
CPE OS Name: cpe:2.3:o:amazon:amazon_linux:2
Kernel: Linux 4.14.109-99.92.amzn2.x86_64
Architecture: x86-64

Error Details :*

We encountered a JSON web token error, which is likely not an issue with Salesforce CLI. Here’s the error: Command failed with response:

(secret-tool:31942): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
secret-tool: Cannot autolaunch D-Bus without X11 $DISPLAY

{
"architecture": "linux-x64",
"cliVersion": "@salesforce/cli/2.13.9",
"nodeVersion": "node-v16.20.2",
"osVersion": "Linux 4.14.109-99.92.amzn2.x86_64",
"rootPath": "/root/.nvm/versions/node/v16.20.2/lib/node_modules/@salesforce/cli",
"shell": "bash",
"pluginVersions": [
"@oclif/plugin-autocomplete 2.3.9 (core)",
"@oclif/plugin-commands 2.2.28 (core)",
"@oclif/plugin-help 5.2.20 (core)",
"@oclif/plugin-not-found 2.4.3 (core)",
"@oclif/plugin-plugins 3.9.1 (core)",
"@oclif/plugin-search 0.0.23 (core)",
"@oclif/plugin-update 3.2.4 (core)",
"@oclif/plugin-version 2.0.1 (core)",
"@oclif/plugin-warn-if-update-available 2.1.1 (core)",
"@oclif/plugin-which 2.2.34 (core)",
"@salesforce/cli 2.13.9 (core)",
"apex 2.3.19 (core)",
"auth 2.8.20 (core)",
"data 2.5.16 (core)",
"deploy-retrieve 1.19.0 (core)",
"info 2.6.49 (core)",
"limits 2.3.38 (core)",
"login 1.2.35 (core)",
"marketplace 0.3.0 (core)",
"org 2.10.12 (core)",
"schema 2.3.29 (core)",
"settings 1.4.33 (core)",
"sobject 0.2.11 (core)",
"source 2.10.40 (core)",
"telemetry 2.3.6 (core)",
"templates 55.5.14 (core)",
"trust 2.6.18 (core)",
"user 2.3.36 (core)"
]
}

@thunderpycode thunderpycode added the investigating We're actively investigating this issue label Oct 31, 2023
@github-actions
Copy link

Hello @thunderpycode 👋 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 31, 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.

@thunderpycode
Copy link
Author

{
"architecture": "linux-x64",
"cliVersion": "@salesforce/cli/2.13.9",
"nodeVersion": "node-v16.20.2",
"osVersion": "Linux 4.14.109-99.92.amzn2.x86_64",
"rootPath": "/root/.nvm/versions/node/v16.20.2/lib/node_modules/@salesforce/cli",
"shell": "bash",
"pluginVersions": [
"@oclif/plugin-autocomplete 2.3.9 (core)",
"@oclif/plugin-commands 2.2.28 (core)",
"@oclif/plugin-help 5.2.20 (core)",
"@oclif/plugin-not-found 2.4.3 (core)",
"@oclif/plugin-plugins 3.9.1 (core)",
"@oclif/plugin-search 0.0.23 (core)",
"@oclif/plugin-update 3.2.4 (core)",
"@oclif/plugin-version 2.0.1 (core)",
"@oclif/plugin-warn-if-update-available 2.1.1 (core)",
"@oclif/plugin-which 2.2.34 (core)",
"@salesforce/cli 2.13.9 (core)",
"apex 2.3.19 (core)",
"auth 2.8.20 (core)",
"data 2.5.16 (core)",
"deploy-retrieve 1.19.0 (core)",
"info 2.6.49 (core)",
"limits 2.3.38 (core)",
"login 1.2.35 (core)",
"marketplace 0.3.0 (core)",
"org 2.10.12 (core)",
"schema 2.3.29 (core)",
"settings 1.4.33 (core)",
"sobject 0.2.11 (core)",
"source 2.10.40 (core)",
"telemetry 2.3.6 (core)",
"templates 55.5.14 (core)",
"trust 2.6.18 (core)",
"user 2.3.36 (core)"
]
}

@github-actions
Copy link

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

Shared: 2.13.9
Latest: 2.14.6

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 @thunderpycode 👋 None of the versions of sf you shared match the latest release.

Shared: 2.13.9, 2.13.9
Latest: 2.14.6

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

@cristiand391
Copy link
Member

@thunderpycode I've googled that error and doesn't seem to be caused by node.

Also remember that node 16 is no longer supported: #1985

@thunderpycode
Copy link
Author

thunderpycode commented Nov 1, 2023

Running sf 14.6 with node 16

sf version --verbose --json
{
  "architecture": "linux-x64",
  "cliVersion": "@salesforce/cli/2.14.6",
  "nodeVersion": "node-v16.20.2",
  "osVersion": "Linux 4.14.109-99.92.amzn2.x86_64",
  "rootPath": "/root/.local/share/sf/client/2.14.6-1f2724e",
  "shell": "bash",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.10 (core)",
    "@oclif/plugin-commands 3.0.3 (core)",
    "@oclif/plugin-help 6.0.3 (core)",
    "@oclif/plugin-not-found 3.0.2 (core)",
    "@oclif/plugin-plugins 3.9.2 (core)",
    "@oclif/plugin-search 1.0.3 (core)",
    "@oclif/plugin-update 4.1.2 (core)",
    "@oclif/plugin-version 2.0.3 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.1 (core)",
    "@oclif/plugin-which 3.0.5 (core)",
    "@salesforce/cli 2.14.6 (core)",
    "apex 2.3.20 (core)",
    "auth 2.8.22 (core)",
    "data 2.5.19 (core)",
    "deploy-retrieve 1.19.2 (core)",
    "info 2.6.49 (core)",
    "limits 2.3.39 (core)",
    "login 1.2.37 (core)",
    "marketplace 0.3.0 (core)",
    "org 2.11.4 (core)",
    "schema 2.3.30 (core)",
    "settings 1.4.35 (core)",
    "sobject 0.2.13 (core)",
    "source 2.10.43 (core)",
    "telemetry 2.3.6 (core)",
    "templates 55.5.14 (core)",
    "trust 2.6.20 (core)",
    "user 2.3.37 (core)"
  ]
}

On Running : sf org list, getting the error as:

(secret-tool:2624): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
secret-tool: Cannot autolaunch D-Bus without X11 $DISPLAY
Try this:
Determine why this command failed to set an encryption key for user root: [/usr/bin/secret-tool store --label='salesforce.com' user local domainsfdx].

Running sf 14.6 with node 18

  1. Running node on 18 stand alone: with node -v , error is:

node: /lib64/libm.so.6: version GLIBC_2.27' not found (required by node) node: /lib64/libc.so.6: version GLIBC_2.28' not found (required by node)

2. _On running sf with node 18, following error is coming:_
      

/root/.local/share/sf/client/2.14.6-1f2724e/bin/node: /lib64/libm.so.6: version GLIBC_2.27' not found (required by /root/.local/share/sf/client/2.14.6-1f2724e/bin/node) /root/.local/share/sf/client/2.14.6-1f2724e/bin/node: /lib64/libc.so.6: version GLIBC_2.28' not found (required by
/root/.local/share/sf/client/2.14.6-1f2724e/bin/node)

@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 Nov 1, 2023
@cristiand391
Copy link
Member

(secret-tool:2624): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
secret-tool: Cannot autolaunch D-Bus without X11 $DISPLAY
Try this:
Determine why this command failed to set an encryption key for user root: [/usr/bin/secret-tool store --label='salesforce.com' user local domainsfdx].

@thunderpycode oh I think it's because the CLI tries to use libsecret to manage credentials. Can you try setting the SF_USE_GENERIC_UNIX_KEYCHAIN to true? that will make the CLI use a generic keychain:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_env_variables.htm#:~:text=SF_USE_GENERIC_UNIX_KEYCHAIN,a%20CI%20environment.

node: /lib64/libm.so.6: version GLIBC_2.27' not found (required by node) node: /lib64/libc.so.6: version GLIBC_2.28' not found (required by node)

yeah, node 18 only runs on newer kernels, see: #1788

@thunderpycode
Copy link
Author

(secret-tool:2624): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
secret-tool: Cannot autolaunch D-Bus without X11 $DISPLAY
Try this:
Determine why this command failed to set an encryption key for user root: [/usr/bin/secret-tool store --label='salesforce.com' user local domainsfdx].

@thunderpycode oh I think it's because the CLI tries to use libsecret to manage credentials. Can you try setting the SF_USE_GENERIC_UNIX_KEYCHAIN to true? that will make the CLI use a generic keychain:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_env_variables.htm#:~:text=SF_USE_GENERIC_UNIX_KEYCHAIN,a%20CI%20environment.

node: /lib64/libm.so.6: version GLIBC_2.27' not found (required by node) node: /lib64/libc.so.6: version GLIBC_2.28' not found (required by node)

yeah, node 18 only runs on newer kernels, see: #1788

Hi @cristiand391 thanks, it's resolved in a local instance but while running Jenkins we are having an error like "unable to convert undefined or null objects". Also the above mentioned variable is also set at the env level inside Jenkins. Please help in this if possible

@cristiand391
Copy link
Member

unable to convert undefined or null objects

I'm pretty sure you are hitting this bug: forcedotcom/sfdx-core#969

the fix is available in the current RC (sf v2.15.9), install RC instructions:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_update_cli.htm#sfdx_setup_install_cli_rc

or you can wait a few hours until it gets promoted to latest stable today.

@cristiand391
Copy link
Member

unable to convert undefined or null objects

this error was fixed in sf v2.15.9, see: https://github.com/forcedotcom/cli/tree/main/releasenotes/#2159-nov-1-2023-stable

@thunderpycode
Copy link
Author

unable to convert undefined or null objects

this error was fixed in sf v2.15.9, see: https://github.com/forcedotcom/cli/tree/main/releasenotes/#2159-nov-1-2023-stable

Hi @cristiand391 thanks for the help, that rc version actually helped in Jenkins CI/CD.

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