-
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
TypeError: Can't modify immutable headers.
in handleDataRequestRR (Cloudflare Pages)
#9212
Comments
@ilyasotkov this will probably fix it for you https://github.com/remix-run/remix/pull/8722/files |
@arjunyel I just checked, and it doesn't fix it. Also I don't see how the changes in your PR are anyhow related to the PR that introduced the issue: #6783. This issue is about HMR returning 500 because workerd is throwing - <Form method="post">
+ <Form method="post" reloadDocument> |
I've created a simple test project that reproduces this error in the context of error handling: it used to be possible to throw a Response object out of a loader or action function and have that response be represented in the output of Here's sample output from the test project:
|
Thank you for this issue. I ran into this some time ago after upgrading Remix and thought maybe I was wrong. I was reproducing this in basically the same way, which I don't see as being "bad." I was going to end up doing something like cloning the response or just building and returning a new one to avoid it. Hopefully this gets fixed |
I've updated my error handling repeatable case to 2.10.2 and the problems seems to still be present. I realize the context of this example is different than the specifics of this issue, and I would be happy to open a separate issue if that would be helpful. |
It looks like you added the (unused) I actually created a utility to do this a while back to make it easier: https://github.com/brophdawg11/upgrade-remix I can confirm that once all are updated the problem is resolved 👍 |
Bravo, that's done it! Thanks very much for your help |
Reproduction
Go to https://github.com/ilyasotkov/polished-truth-b001, open in Codespaces or local devcontainer, follow the steps in README.
This pull request #6783 is the culprit, present since 1.19.0, worked fine before that. The error seems quite baffling to me because the code below is so basic, I can't imagine any useful Remix app not doing something like this. Am I missing something here? Any workarounds?
System Info
The text was updated successfully, but these errors were encountered: