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 login jwt -> TypeError: #2935

Closed
tparaiso opened this issue Jun 21, 2024 · 22 comments
Closed

sf org login jwt -> TypeError: #2935

tparaiso opened this issue Jun 21, 2024 · 22 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@tparaiso
Copy link

Summary

When the commande "sf org login jwt" is executed, it returns "TypeError: Cannot read properties of undefined (reading 'entries')"

Steps To Reproduce:

  1. This is step 1 -> In terminal type : sf org login jwt .

Expected result

You forget something normally

Actual result

TypeError: Cannot read properties of undefined (reading 'entries')

Additional information

Feel free to attach a screenshot.

Salesforce Extension Version in VS Code:

Salesforce CLI Version: Latest
@salesforce/cli/2.46.6 darwin-arm64 node-v20.9.0

OS and version:
MacOs Sonoma

CleanShot 2024-06-21 at 10 22 34

@tparaiso tparaiso added the investigating We're actively investigating this issue label Jun 21, 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 @tparaiso 👋 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 Jun 21, 2024
@tparaiso
Copy link
Author

{
"architecture": "darwin-arm64",
"cliVersion": "@salesforce/cli/2.46.6",
"nodeVersion": "node-v20.9.0",
"osVersion": "Darwin 23.5.0",
"rootPath": "/usr/local/lib/node_modules/@salesforce/cli",
"shell": "zsh",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.1.2 (core)",
"@oclif/plugin-commands 4.0.2 (core)",
"@oclif/plugin-help 6.2.1 (core)",
"@oclif/plugin-not-found 3.2.3 (core)",
"@oclif/plugin-plugins 5.2.4 (core)",
"@oclif/plugin-search 1.1.2 (core)",
"@oclif/plugin-update 4.3.5 (core)",
"@oclif/plugin-version 2.2.3 (core)",
"@oclif/plugin-warn-if-update-available 3.1.5 (core)",
"@oclif/plugin-which 3.2.2 (core)",
"@salesforce/cli 2.46.6 (core)",
"apex 3.1.18 (core)",
"auth 3.6.21 (core)",
"community 3.0.13 (user) published 159 days ago (Sat Jan 13 2024) (latest is 3.2.20)",
"data 3.4.6 (core)",
"deploy-retrieve 3.9.4 (core)",
"info 3.3.6 (core)",
"limits 3.3.12 (core)",
"marketplace 1.2.12 (core)",
"org 4.2.1 (core)",
"packaging 2.1.1 (user) published 158 days ago (Sun Jan 14 2024) (latest is 2.6.1)",
"schema 3.3.11 (core)",
"settings 2.3.1 (core)",
"signups 2.0.17 (user) published 158 days ago (Sun Jan 14 2024) (latest is 2.3.13)",
"sobject 1.4.11 (core)",
"source 3.4.2 (core)",
"telemetry 3.4.0 (core)",
"templates 56.2.11 (core)",
"trust 3.7.5 (core)",
"user 3.5.13 (core)",
"edenred-sfdx-plugin 2.0.0 (link) /Users/Thomas/developpement/programmes/edenred/Redforce/edenred-sfdx-plugin"
]
}

@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 Jun 21, 2024
@tparaiso
Copy link
Author

Same issue with this command : sf org list

TypeError: Cannot read properties of undefined (reading 'entries')

@shetzel
Copy link
Contributor

shetzel commented Jun 24, 2024

@tparaiso - I can't reproduce this using the same installed CLI version. We have tons of tests that use these commands as well and they run cleanly. This is specific to your environment so here's what I'd do:

  1. Use the sf plugins reset command to put your CLI back to a base state. The --hard flag might be a good idea to use as well.
  2. After a reset, try sf org list again. If it works without error, then one of the old plugins installed is likely causing the issue. Figure out which one and pinpoint the problem. I would use the CLI-bundled versions of the core plugins. If it's the linked plugin, get more details about it (i.e., a stack trace) with export SF_ENV=development and rerun the command.
  3. If the error still happens after a reset, then please provide more information by running sf doctor --command "org list" and inspecting the results. I would like to see the stack trace from the debug output files.

@tparaiso
Copy link
Author

@shetzel thank you very much, the command "sf plugins reset --hard" fix my issue.

At my work I have had the same issue with our CI, we installed the previous version of the CLI and it's worked. There is something in the version of June 20 and plugins dependency. I will try the command tomorrow.

Thanks !

@seanhharrison
Copy link

I had the same problem. FWIW, I uninstalled plug-ins one at a time until sf org list worked again. Started working again after uninstalling @salesforce/sfdx-scanner 3.11.0

@mgalalm
Copy link

mgalalm commented Jun 27, 2024

We're experiencing the same error with this version as well

@jhgihub0
Copy link

@salesforce/cli/2.47.6 darwin-x64 node-v20.10.0 still has the issue

@mgalalm
Copy link

mgalalm commented Jun 28, 2024

It appears that a breakage has been introduced for plugins using the relatively old sfdx-core package, as noted in this pull request: forcedotcom/sfdx-core#1080. I managed to bypass the problem for debugging purposes by editing the core library. Specifically, I added a couple of lines

exports.Lifecycle = Lifecycle;
Lifecycle.getInstance()

above

const cloneListeners = (listeners) => new Map(Array.from(listeners.entries()));

in the lifecycleEvents.js part of the old version of the sfdx-core package. Please note that I am not proposing this as a solution, just sharing my findings.

@WillieRuemmele
Copy link
Member

Thanks @mgalalm @jhgihub0 @seanhharrison - I verified that the bug exists with @salesforce/sfdx-scanner@3.11.0 - I just tried installing the latest version of scanner (4.3.0) and it worked.

if anyone else can confirm the latest version of scanner is fixed as well that'd be great

@four4444PL
Copy link

Unfortunately Im getting the same problem there :( Updating the scanner to version 4.3.0 havent helped :(
Any other recomendations?
My config looks as below:
{
"architecture": "win32-x64",
"cliVersion": "@salesforce/cli/2.47.6",
"nodeVersion": "node-v20.14.0",
"osVersion": "Windows_NT 10.0.22631",
"rootPath": "C:\Users\Lenovo\AppData\Local\sf\client\2.47.6-6b39a27",
"shell": "cmd.exe",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.1.4 (core)",
"@oclif/plugin-commands 4.0.4 (core)",
"@oclif/plugin-help 6.2.3 (core)",
"@oclif/plugin-not-found 3.2.5 (core)",
"@oclif/plugin-plugins 5.3.2 (core)",
"@oclif/plugin-search 1.1.4 (core)",
"@oclif/plugin-update 4.4.2 (core)",
"@oclif/plugin-version 2.2.4 (core)",
"@oclif/plugin-warn-if-update-available 3.1.6 (core)",
"@oclif/plugin-which 3.2.4 (core)",
"@salesforce/cli 2.47.6 (core)",
"apex 3.1.21 (core)",
"auth 3.6.23 (core)",
"custom-metadata 3.3.13 (user)",
"data 3.5.0 (core)",
"deploy-retrieve 3.9.6 (core)",
"info 3.3.9 (core)",
"limits 3.3.13 (core)",
"marketplace 1.2.15 (core)",
"org 4.2.4 (core)",
"packaging 2.4.6 (core)",
"schema 3.3.14 (core)",
"settings 2.3.3 (core)",
"sobject 1.4.12 (core)",
"source 3.4.6 (core)",
"telemetry 3.4.3 (core)",
"templates 56.2.13 (core)",
"trust 3.7.7 (core)",
"user 3.5.15 (core)",
"@salesforce/sfdx-scanner 4.3.0 (user)",
"sfdx-git-delta 5.40.2 (user)",
"sfdx-git-packager 0.3.4 (user)",
"sfdx-mdt-plugin 0.6.6 (user)",
"sfdx-plugin-source-read 1.2.0 (user)"
]
}

@kevanmoothien
Copy link

Upgrading to latest version of sfdx/scanner is not working on my side.

@ReaperBeats
Copy link

Same happens to me. Tried reinstalling or uninstalling the sacnner, but it doesnt work.
Also for me its just happening when I try to deploy or retrieve using the VSCode UI, but it does not happen if I exceute sf project deploy start -d "..." directly in the terminal.
I tried reinstalling the VSCode plugins, but that did not work also

@tparaiso tparaiso reopened this Jul 2, 2024
@tparaiso
Copy link
Author

tparaiso commented Jul 2, 2024

If you are blocked, you can install an older version (that's worked for me on my other computer) : install @salesforce/cli@2.45.6 --global
(https://help.salesforce.com/s/articleView?id=release-notes.rn_sf_cli_previous_version.htm&release=220&type=5)

@WillieRuemmele
Copy link
Member

Hey @tparaiso @ReaperBeats @kevanmoothien @four4444PL - after a lot more testing, I'm still stumped. I've installed all of the versions, with the various node versions reported, and the problem keeps appearing for me when I use scanner@3.11.0, once I bump that to the latest ^4 version, it goes away

@WillieRuemmele WillieRuemmele added the bug Issue or pull request that identifies or fixes a bug label Jul 3, 2024
Copy link

git2gus bot commented Jul 3, 2024

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

@ReaperBeats
Copy link

It is working fine for me since I updated to the last version on CLI.

@jhgihub0
Copy link

jhgihub0 commented Jul 10, 2024

Still an issue with latest stable

@salesforce/cli/2.48.6 linux-x64 node-v20.15.0

@oclif/plugin-autocomplete 3.1.4 (core)
@oclif/plugin-commands 4.0.4 (core)
@oclif/plugin-help 6.2.3 (core)
@oclif/plugin-not-found 3.2.6 (core)
@oclif/plugin-plugins 5.3.2 (core)
@oclif/plugin-search 1.2.0 (core)
@oclif/plugin-update 4.4.3 (core)
@oclif/plugin-version 2.2.4 (core)
@oclif/plugin-warn-if-update-available 3.1.6 (core)
@oclif/plugin-which 3.2.4 (core)
apex 3.2.0 (core)
auth 3.6.27 (core)
data 3.5.2 (core)
deploy-retrieve 3.9.9 (core)
info 3.3.11 (core)
limits 3.3.15 (core)
marketplace 1.2.17 (core)
org 4.3.0 (core)
packaging 2.6.1 (core)
schema 3.3.16 (core)
settings 2.3.6 (core)
sobject 1.4.14 (core)
source 3.4.8 (core)
telemetry 3.5.1 (core)
templates 56.3.0 (core)
trust 3.7.10 (core)
user 3.5.17 (core)

@WillieRuemmele
Copy link
Member

Hey @jhgihub0 - thanks for staying so on top of this change, you might have just missed our promotion to latest (I mean, missed it by minutes, this happened within the hour), which is now 2.49.7. I'm hoping an update (again) will fix this for you

@jhgihub0
Copy link

Yes, it seems to work with @salesforce/cli/2.49.7 linux-x64 node-v20.15.0

Thank you.

@albertopuerto
Copy link

Hi there guys, i´m facing the same issue with @salesforce/cli/2.49.7 win32-x64 node-v20.15.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug 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