-
Notifications
You must be signed in to change notification settings - Fork 375
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
[Bug]: Actions with latest netlify
preset return 500 due to Response body object should not be disturbed or locked
#1673
Comments
@pi0 I see that in many other presets we're reading in the whole body stream and then passing it back to Nitro as a Buffer: I suspect this is related. In both cases I can see this being added specifically to fix something unspecified. Do we need to do something like this in the new |
Considering Nitro is moving to web standards, we should fix the root cause (other presets will be updated progressively). Can we reproduce it with (unmodified) Nitro alone? (if not it seems a bug with solid/vinxi) |
Whew, finally found the time to try to create a Nitro repro of this, but it seems to work just fine:
So it seems to be specific to SolidStart. Any ideas @ryansolid? or ideas for workarounds? I could maybe look into fixing myself if either of you could give me a little guidance here as there's, uhh, quite a lot going on here I'm a bit wary of diving in without understanding the stories behind all these workarounds. Thanks! |
I admit I have no idea. All the hacks in there were for getting around previous issues we had in various envs and I wasn't involved in implementing any of them. I verified them on various platforms but for the most part it was due to gaps in adapters for those envs. It's possible some of them are no longer needed. If you look one of the comments sounds almost like it was to fix an issue similar to what you are facing by cloning the request rather than using a locked one. It is interesting that no longer works?... |
@ryansolid Thanks, Ryan.
Yeah, I'd have to check again but when I poked around with some added logging a few weeks ago it seemed like this I guess I'll try to dig further when I can find some time. |
Duplicates
Latest version
Current behavior 😯
The page renders "⚠️ Oops, something went wrong".
This is because the Action's
POST /_server
returns a 500.This error is logged on the server:
Expected behavior 🤔
The page should render "✅ Correct!" because the Action returns
true
This works as expected with:
vinxi dev
(doesn't exercise thenetlify
preset)ntl dev
(doesn't exercise thenetlify
preset)netlify-edge
preset instead ofnetlify
netlify-legacy
presetSteps to reproduce 🕹
Steps:
with https://github.com/serhalp/repro-solidstart-nitro-response-body-disturbed (
pnpm i
) and netlify-cli (npm i -g netlify-cli
)ntl serve
or
ntl init
)ntl deploy --build
I've also deployed it here: https://672c1abc039334ad67383d7e--repro-solidstart-response-disturbed.netlify.app/.
Context 🔦
Seems to be similar to #1577...?
If I add some logging here (necessary because the error handling in that function strips the stack trace and all details outside of dev but this bug can only be reproduced in "real" environments) I can see that this is throwing from here.
Your environment 🌎
macOS Monterey 12.7.1 (21G920)
Firefox 131.0.3
The text was updated successfully, but these errors were encountered: