-
Notifications
You must be signed in to change notification settings - Fork 318
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
Cannot construct a Request with a Request object that has already been used #4259
Comments
We have seen this on the 4.x.x release line, unfortunately we needed this to get a fix related to an out of memory race condition on the auto injection docker image |
We are also seeing the same issue on 4.x, and Next.js 13.x
|
@yjukaku That is very interesting, have you found an workaround for it? |
Same issue here, lost few hours to land on this issue.
|
Looks like this commit is designed to fix it: 0f36e48 |
Our workaround, other than downgrading the DD library, was to update the URLs we were fetching to avoid the redirect. EDIT: It seems the redirects were likely a red herring and it didn't help to update the URLs to avoid the redirect. |
Having this issue with our Docker image |
We ran into this as well. Even though we're pinning the versions of datadog-lambda-extension and datadog-lambda-js, the Lambda layer was still picking up a newer version of dd-trace that had this problem. |
Ran into this same error with Downgrading to |
Same issue here, and we are pinning to v5.10.0 for now. |
Seems a fix has existed for a couple of days but hasn't been pushed out yet #4258 |
Can confirm - issue on 5.11.0, while 5.10.0 works fine. We need PR #4258 also for v5, not only pre-v6. |
Ran into this same error with auth0 node sdk package using dd-trace Downgrading to v5.10.0 fixed the issue. |
Same here. Caused our next.js server side fetches to fail all over. Storing a local copy of the wrapper using specific versioning to 5.10, and from now on. Thanks @radum for finding this. We spent hours trying to figure out why this suddenly happened. |
can confirm as well (nestjs), downgrading to v5.10.0 for now |
if you remove the connection to apm the app works again |
A fix for this has been released in v5.12.0, v4.36.0, and v3.57.0 of the library. Please upgrade to confirm that it fixes the issue. If it does not fix the issue please @ me and I'll reopen this issue and we'll investigate further. Thanks! |
Nice! Looks like it is working :) |
Hello,
We just upgraded to version 5.11.0 and our Next.js internal API routes that are using fetch to get data from external services are now failing with
Cannot construct a Request with a Request object that has already been used.
. Disabling datadog or reverting to the previous version (5.10.0) works fine.I will try to see if I can setup a demo repo but its very unlikely I can strip down our setup.
We load DD via
"start": "node -r ./server-preload.js ./node_modules/.bin/next start"
and in that file we have:Not sure what changed but looks like fetch constructor is called twice from DD and then within our app it fails to construct it again.
The text was updated successfully, but these errors were encountered: