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

IPv6 Routing Debugging Request - REF: #4163 #6414

Closed
2 tasks done
markojak opened this issue May 2, 2023 · 2 comments
Closed
2 tasks done

IPv6 Routing Debugging Request - REF: #4163 #6414

markojak opened this issue May 2, 2023 · 2 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release

Comments

@markojak
Copy link

markojak commented May 2, 2023

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

Referencing the Issue : #4163
#4163

The best way to describe this problem is that for some unknown reason some people cannot make IPV6 connections to registry.npmjs.org - What usually happens then is that the users struggle to find out why npm cannot update and there are no online resources that help with this.

This issue is happening in Node 18+ with the associated npm versions (all versions affected)

Showing the user that they are having a network level problem will avoid a tremendous amount of unnecessary node versioning.

Expected Behavior

Looking at this thread it appears that the issue is widespread enough that the suggestion would be to implement IPv6 and IPv4 connection checks into the "npm ping" and "npm doctor" commands.
If there is a NETWORK TIMEOUT on IPv6 the CLI should attempt an IPV4 connection.

Example of expected behavior

Check                               Value   Recommendation/Notes
npm ping                          ERR  IPv6 Connection timed out
npm ping                          ok      IPv4 Connection 627ms
npm -v                              ok      current: v9.6.5, latest: v9.6.5
node -v                             ok      current: v18.16.0, recommended: v18.16.0

Steps To Reproduce

This is dififcult to reproduce as it affects specific ISP's and users. but In general:

  1. v18+
  2. Default configuration
  3. Any npm command causes this but you can test with "npm ping"
  4. Error = timed out

Environment

  • npm: current: v9.6.5, latest: v9.6.5
  • Node.js: current: v18.16.0, recommended: v18.16.0
  • OS Name: MacOS / Any OS
  • System Model Name:
  • npm config:
; node bin location = /Users/xxx/.nvm/versions/node/v18.16.0/bin/node
; node version = v18.16.0
; npm local prefix = /Users/xxx/workspace
; npm version = 9.6.5
; cwd = /Users/xxx/workspace
; HOME = /Users/xxx
; Run `npm config ls -l` to show all defaults.
@markojak markojak added Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release labels May 2, 2023
@markojak
Copy link
Author

markojak commented May 2, 2023

A further improvement would be suggested by : #4163 (comment)
"Fall back to IPv4 if IPv6 times out"
This being said the IPv6 timeout can be rather long so this might cause more issues if you do automated fallback

My suggestion rather is to alert the user what Protocol is being used to connect to the registry.

Just having this would have been enough for me to save almost 2 days of debugging

@wraithgar
Copy link
Member

wraithgar commented May 2, 2023

#3359 #4028 and #4652 are the issues currently tracking this

@wraithgar wraithgar closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release
Projects
None yet
Development

No branches or pull requests

2 participants