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

failed to fetch still present #56456

Closed
1 task done
statusunknown418 opened this issue Oct 5, 2023 · 3 comments · Fixed by #56528
Closed
1 task done

failed to fetch still present #56456

statusunknown418 opened this issue Oct 5, 2023 · 3 comments · Fixed by #56528
Labels
bug Issue was opened via the bug report template. locked

Comments

@statusunknown418
Copy link

Link to the code that reproduces this issue

https://github.com/AlvaroAquijeDiaz/toldyouso

To Reproduce

  1. start & login
  2. go to /secrets

Current vs. Expected behavior

should work

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000
Binaries:
  Node: 18.17.1
  npm: 9.6.7
  Yarn: 1.22.19
  pnpm: 8.6.6
Relevant Packages:
  next: 13.5.5-canary.2
  eslint-config-next: 13.5.4
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

App Router

Additional context

 ✓ Compiled /secrets/page in 483ms (1262 modules)
 ⨯ Internal error: TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11576:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
 ⨯ Internal error: TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11576:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
digest: "956933652"

I'm on the latest version, saw issues closed but this is still present even when deployed or when using http://127.0.0.1:3000 is not fixing anything

@statusunknown418 statusunknown418 added the bug Issue was opened via the bug report template. label Oct 5, 2023
@statusunknown418

This comment was marked as off-topic.

@kodiakhq kodiakhq bot closed this as completed in #56528 Oct 6, 2023
kodiakhq bot pushed a commit that referenced this issue Oct 6, 2023
### What?

While debugging #56456, I noticed that we cut useful information, namely the `Error` instances' [`cause` property](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause).

### Why?

In #56456, it was hiding the following:

```sh
Error: getaddrinfo EAI_AGAIN undefined
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)
    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
  errno: -3001,
  code: 'EAI_AGAIN',
  syscall: 'getaddrinfo',
  hostname: 'undefined'
}
```

which might be an indicator to the user what was going wrong with the `fetch` call.

### How?

If there is a `err.cause` property, log it together with `err.digest`


Note, this does not fix #56456 but might be useful to debug similar issues as well.
@darthmaim
Copy link
Contributor

@balazsorban44 #56528 auto-closed this issue erroneously

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants