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

Linux Manjaro: Stuck during login with npx verdaccio-github-oauth-ui at "[github-oauth-ui] Running command: npm config list --json" #196

Open
codewing opened this issue May 21, 2024 · 3 comments
Labels
investigating I'm looking at it

Comments

@codewing
Copy link

codewing commented May 21, 2024

Bug Report

Versions

Version
Verdaccio 5.31.0
This plugin 6.0.8

Environment

Name Version
Browser Firefox / Chrome 125 / 124
Operating system Linux

Observed behavior

Loggin in via the web-interface works but via the console it is stuck at [github-oauth-ui] Running command: npm config list --json

I'm logging in via npx verdaccio-github-oauth-ui --registry https://npm.pkg.holoride.com/

Expected behavior

The command should either produce and error or log me in.

Steps to reproduce

Run the login command without any npm settings (I've deleted ~/.npmrc and the ~/.npm folder)

Additional context

To help in bug hunting this is the verbose output which seems to be successful:

❯ npx -dd verdaccio-github-oauth-ui --registry https://npm.pkg.holoride.com/
npm verbose cli /usr/bin/node /usr/lib/node_modules/npm/bin/npm-cli.js
npm info using [email protected]
npm info using [email protected]
npm verbose title npm exec verdaccio-github-oauth-ui --registry https://npm.pkg.holoride.com/
npm verbose argv "exec" "--loglevel" "verbose" "--" "verdaccio-github-oauth-ui" "--registry" "https://npm.pkg.holoride.com/"
npm verbose logfile logs-max:10 dir:/home/frieder/.npm/_logs/2024-05-21T08_36_55_526Z-
npm verbose logfile /home/frieder/.npm/_logs/2024-05-21T08_36_55_526Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/verdaccio-github-oauth-ui 739ms (cache revalidated)
[github-oauth-ui] Version: [email protected]
[github-oauth-ui] Running command: npm config list --json
npm verbose cli /usr/bin/node /usr/bin/npm
npm info using [email protected]
npm info using [email protected]
npm verbose title npm config list
npm verbose argv "config" "list" "--json"
npm verbose logfile logs-max:10 dir:/home/frieder/.npm/_logs/2024-05-21T08_36_57_201Z-
npm verbose logfile /home/frieder/.npm/_logs/2024-05-21T08_36_57_201Z-debug-0.log
npm verbose exit 0
npm info ok

Edit: It seems that the generated token from the ui doesn't work:

npm error code E401
npm error Unable to authenticate, your authentication token seems to be invalid.
npm error To correct this please try logging in again with:
npm error     npm login
@n4bb12 n4bb12 added the investigating I'm looking at it label May 30, 2024
@n4bb12
Copy link
Owner

n4bb12 commented May 30, 2024

Thanks for reporting.

If successful, the output looks something like this:

[github-oauth-ui] Version: [email protected]
[github-oauth-ui] Running command: npm config list --json
[github-oauth-ui] Running command: npm config set //localhost:4873/:_authToken "foo.bar.baz"
[github-oauth-ui] All done! We've updated your npm configuration.

If you're not seeing this, an error occurred and the process exits with status 1, indicating that there was an error.

The error message is displayed on the web page that opens during the OAuth flow. I made a change to log it as well.

@n4bb12
Copy link
Owner

n4bb12 commented May 30, 2024

Please comment if this did not resolve your issue.

@n4bb12 n4bb12 closed this as completed May 30, 2024
@n4bb12 n4bb12 added enhancement New feature or request and removed investigating I'm looking at it labels May 30, 2024
@codewing
Copy link
Author

codewing commented May 31, 2024

TLDR: Works with Windows 11 and Ubuntu WSL but doesn't work on my two Manjaro setups.. :(

non verbose log:

[github-oauth-ui] Version: [email protected]
[github-oauth-ui] Running command: npm config list --json
^C

The verbose output indicates that it successfully ran the command:

[github-oauth-ui] Version: [email protected]
[github-oauth-ui] Running command: npm config list --json
npm verbose cli /usr/bin/node /usr/bin/npm
npm info using [email protected]
npm info using [email protected]
npm verbose title npm config list
npm verbose argv "config" "list" "--json"
npm verbose logfile logs-max:10 dir:/home/codewing/.npm/_logs/2024-05-31T09_45_57_242Z-
npm verbose logfile /home/codewing/.npm/_logs/2024-05-31T09_45_57_242Z-debug-0.log
npm verbose cwd /home/codewing
npm verbose os Linux 6.8.11-1-MANJARO
npm verbose node v20.13.1
npm verbose npm  v10.8.0
npm verbose exit 0
npm info ok

so not really sure why it doesn't "exit" the command execution


One more update: I've also just tested it on Windows and there the issue doesn't seem to occur...
Additionally I've tested it on windows using ubuntu inside wsl and there the issue also doesn't occur...

@n4bb12 n4bb12 changed the title Stuck during login with npx verdaccio-github-oauth-ui at "[github-oauth-ui] Running command: npm config list --json" Linux Manjaro: Stuck during login with npx verdaccio-github-oauth-ui at "[github-oauth-ui] Running command: npm config list --json" May 31, 2024
@n4bb12 n4bb12 added investigating I'm looking at it and removed enhancement New feature or request labels May 31, 2024
@n4bb12 n4bb12 reopened this May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating I'm looking at it
Projects
None yet
Development

No branches or pull requests

2 participants