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 issues, hiding problems #205

Open
rafales opened this issue Feb 15, 2023 · 2 comments
Open

IPv6 issues, hiding problems #205

rafales opened this issue Feb 15, 2023 · 2 comments
Labels

Comments

@rafales
Copy link

rafales commented Feb 15, 2023

Ok, so. I tried to run tests - written in AVA. For some reason. I quickly figured out the code responsible:

image

It was hanging on the createSubAccount. Sadly after a long timeout all I got was this:

  Error (TypedError) {
    context: undefined,
    type: 'RetriesExceeded',
    message: 'Exceeded 10 attempts for http://localhost:1593.',
  }

  › Object.fetchJson (node_modules/near-api-js/lib/utils/web.js:55:15)
  › async node_modules/near-api-js/lib/providers/json-rpc-provider.js:312:34
  › async Object.exponentialBackoff [as default] (node_modules/near-api-js/lib/utils/exponential-backoff.js:7:24)
  › async JsonRpcProvider.sendJsonRpc (node_modules/near-api-js/lib/providers/json-rpc-provider.js:304:26)
  › async JsonRpcProvider.query (node_modules/near-api-js/lib/providers/json-rpc-provider.js:116:22)
  › async Account.findAccessKey (node_modules/near-api-js/lib/account.js:186:31)
  › async Account.signTransaction (node_modules/near-api-js/lib/account.js:91:31)

Adding NEAR_WORKSPACES_DEBUG=true didn't help either.

One of the issues is that the code handling backoffs is hiding the reason of the failure, making it hard to track the real issues.

In the end the issue here is:

error: FetchError: request to http://localhost:1592/ failed, reason: connect ECONNREFUSED ::1:1592

Meaning that even though near-sandbox listens on IPv4 the app attempts to connect at IPv6. Not sure what the right fix here is, probably near-sandbox should also listen on IPv6 or maybe the url shouldn't use localhost but the IP address instead.

> node -v
v19.6.0
@volovyks volovyks added the P2 label Feb 17, 2023
@roshaans
Copy link

Was there a fix discovered for this?

@roshaans
Copy link

This helped me fix the problem: #168 (comment)

@github-project-automation github-project-automation bot moved this to Backlog 🥶 in DevRel Jun 3, 2024
@thisisjoshford thisisjoshford removed this from DevRel Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants