Closed Eddy84 closed 2 years ago
Thanks for reporting. Can you provide steps to reproduce with just Undici? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.
@Eddy84 I'm experiencing the same issue, did you manage to solve this?
Downgrading node version from 18 to 16 (stable) did the trick for me.
Same issue, but already on v16.14.0, v16.16.0 made no difference and it was working last week. Laravel Lighthouse + Graphql code gen.
@LiamKarlMitchell did you found any solution for that? I am trying to use it with Laravel Lighthouse and have the same problem. Node v16.16.0
@hpiaia Check my comment in this other issue https://github.com/dotansimha/graphql-code-generator/issues/7934#issuecomment-1166520696 for a workaround.
Options request shouldn't have a Content-Length set.
Below is a middleware, which can be added to App/Http/Middlewares and put into lighthouse middlewares config array. It does add it to every POST request however for the graphql endpoint.
https://gist.github.com/LiamKarlMitchell/18f1e43ae6b772864d1b6a6ec1f71ba9
Works for me for a temp work-around until this can be resolved upstream.
On Thu, 28 Jul 2022, 11:05 am Thomas Aull, @.***> wrote:
@hpiaia https://github.com/hpiaia Check my comment in this other issue dotansimha/graphql-code-generator#7934 (comment) https://github.com/dotansimha/graphql-code-generator/issues/7934#issuecomment-1166520696 for a workaround.
— Reply to this email directly, view it on GitHub https://github.com/nodejs/undici/issues/1490#issuecomment-1197470332, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPAP3INOG45VBBWVQLJTMTVWG6ERANCNFSM5YRKXXXA . You are receiving this because you were mentioned.Message ID: @.***>
@thomasaull @LiamKarlMitchell, I got another solution for that, just use node-fetch instead of undici for consuming the api.
schema:
- http://localhost:8000/graphql:
customFetch: 'node-fetch'
Reference: https://www.graphql-code-generator.com/docs/config-reference/schema-field#customfetch
I'm closing this as won't fix
. I will happy to review again when/if we have a reproduction for the problem.
@mcollina I'd be happy to provde a reproduction. However since this is happening in a mixedx project with php laravel and javascript, I'm not sure what would be the best way to do this?
Try to reproduce with just undici and Node.js. Things that work well:
@mcollina Had no luck reproducing it with node :-/
happens periodically for us as well using node 18 with undici 5.22.1. No clear reproducer but we see it daily.
Happens to us, using Node 20 in a Google Cloud Functions, however works fine locally
Happens also periodically for me using node 20 and nest.js - No clear reproducer but we see it daily. Happens only on long request (+15min)
+1, Affected by this, inconsistently, no defined cause.
Happens when IPv6 is disabled. Reproduce on Ubuntu:
echo '1' | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6 > /dev/null
echo '1' | sudo tee /proc/sys/net/ipv6/conf/default/disable_ipv6 > /dev/null
Fetch usage with node results in exit code 13
.
Bug Description
I have a bug with graphl-codegen which is very likely caused by undici closing the connection and sending a terminated signal?
I have double checked my backend with various graphql clients and plain http requests doing the introspection query, the bug is definitely in undici.
The server receives the request, but it is terminated.
A stacktrace is included below:
Here is the related issue https://github.com/dotansimha/graphql-code-generator/issues/7934
Reproducible By
See the linked issue above
Expected Behavior
Return a response
Logs & Screenshots
See below
Environment
Additional context
Stacktrace: