-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Singlefetch Error: Unable to decode turbo-stream response from URL: <URL>
#9809
Comments
It looks like your action is returning an error - a 500 HTTP response with no body - which is presumably why it can't be decoded:
I would try to isolate what's happening in your action and see what value is being returned or if it's throwing something? If it's still an issue pointing to the single fetch decoding, could you create a smaller reproduction without the use of the authenticator and just return the data that causes the failure? |
I've deployed a branch with single fetch disabled, and it's working as expected. You can test it out here: https://remix-run-singlefetch-remix-git-857368-joris-projects-c610dd57.vercel.app/ |
I've created a new instance with a simple redirect in the action, which causes the app to crash with the same error. It appears that when https://remix-run-singlefetch-remix-git-1283f8-joris-projects-c610dd57.vercel.app/login |
Hi, It could have something to do with the use of nativeFetch on Vercel's part which is currently not working correctly. Edit : I think you will find the solution here as I did : vercel#124 |
Thank you! I attempted the suggested solution, but unfortunately, it didn't resolve my problem. |
When using singleFetch in an action with the response.status = 302;
response.headers.set("Location", "/location");
return null; If the problem persist and comes from another reason, i recommend using the Runtime Logs from the Vercel dashboard to investigate what happens when you make the request. |
This looks to be an issue on the Vercel side - it could be something to do with their fetch polyfilling.
This is incorrect - you can definitely return a
Here's a quick example of redirecting from an action with Single Fetch enabled: https://stackblitz.com/edit/remix-run-remix-vtbxq2 I'm going to close this out since I don't think this is an issue on the Remix side - but if you can provide a reproduction of the issue outside of a Vercel deployment then we can definitely reopen and dig in further. |
Reproduction
With Singlefetch enabled
Repo (created from Stackblitz) : https://github.com/jorisre/remix-run-singlefetch-remix-auth
Note : everything is working well in local env.
System Info
Used Package Manager
npm
Expected Behavior
Should not throw an error.
Actual Behavior
When I attempt to submit the login, I encounter the following error :
Note that I'm using
remix-auth
andremix-auth-form
packages from @sergiodxaThe text was updated successfully, but these errors were encountered: