fix(remix): RequestInit.duplex now is required if body is provided in undici - #3495
Conversation
🦋 Changeset detectedLatest commit: f6fb0eb The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
!snapshot |
|
Hey @octoper - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/backend@1.2.2-snapshot.v72984d5 --save-exact
npm i @clerk/chrome-extension@1.0.17-snapshot.v72984d5 --save-exact
npm i @clerk/clerk-js@5.6.0-snapshot.v72984d5 --save-exact
npm i @clerk/elements@0.6.0-snapshot.v72984d5 --save-exact
npm i @clerk/clerk-expo@1.1.9-snapshot.v72984d5 --save-exact
npm i @clerk/express@0.0.11-snapshot.v72984d5 --save-exact
npm i @clerk/fastify@1.0.13-snapshot.v72984d5 --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/localizations@2.4.4-snapshot.v72984d5 --save-exact
npm i @clerk/nextjs@5.1.4-snapshot.v72984d5 --save-exact
npm i @clerk/clerk-react@5.2.3-snapshot.v72984d5 --save-exact
npm i @clerk/remix@4.0.14-snapshot.v72984d5 --save-exact
npm i @clerk/clerk-sdk-node@5.0.10-snapshot.v72984d5 --save-exact
npm i @clerk/shared@2.2.2-snapshot.v72984d5 --save-exact
npm i @clerk/testing@1.1.6-snapshot.v72984d5 --save-exact
npm i @clerk/themes@2.1.9-snapshot.v72984d5 --save-exact
npm i @clerk/types@4.6.0-snapshot.v72984d5 --save-exact |
|
!snapshot |
|
Hey @octoper - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/backend@1.2.2-snapshot.vef44e76 --save-exact
npm i @clerk/chrome-extension@1.0.17-snapshot.vef44e76 --save-exact
npm i @clerk/clerk-js@5.6.0-snapshot.vef44e76 --save-exact
npm i @clerk/elements@0.6.0-snapshot.vef44e76 --save-exact
npm i @clerk/clerk-expo@1.1.9-snapshot.vef44e76 --save-exact
npm i @clerk/express@0.0.11-snapshot.vef44e76 --save-exact
npm i @clerk/fastify@1.0.13-snapshot.vef44e76 --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/localizations@2.4.4-snapshot.vef44e76 --save-exact
npm i @clerk/nextjs@5.1.4-snapshot.vef44e76 --save-exact
npm i @clerk/clerk-react@5.2.3-snapshot.vef44e76 --save-exact
npm i @clerk/remix@4.0.14-snapshot.vef44e76 --save-exact
npm i @clerk/clerk-sdk-node@5.0.10-snapshot.vef44e76 --save-exact
npm i @clerk/shared@2.2.2-snapshot.vef44e76 --save-exact
npm i @clerk/testing@1.1.6-snapshot.vef44e76 --save-exact
npm i @clerk/themes@2.1.9-snapshot.vef44e76 --save-exact
npm i @clerk/types@4.6.0-snapshot.vef44e76 --save-exact |
|
!snapshot |
|
Hey @octoper - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/backend@1.2.2-snapshot.vff20ad3 --save-exact
npm i @clerk/chrome-extension@1.0.17-snapshot.vff20ad3 --save-exact
npm i @clerk/clerk-js@5.6.0-snapshot.vff20ad3 --save-exact
npm i @clerk/elements@0.6.0-snapshot.vff20ad3 --save-exact
npm i @clerk/clerk-expo@1.1.9-snapshot.vff20ad3 --save-exact
npm i @clerk/express@0.0.11-snapshot.vff20ad3 --save-exact
npm i @clerk/fastify@1.0.13-snapshot.vff20ad3 --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/localizations@2.4.4-snapshot.vff20ad3 --save-exact
npm i @clerk/nextjs@5.1.4-snapshot.vff20ad3 --save-exact
npm i @clerk/clerk-react@5.2.3-snapshot.vff20ad3 --save-exact
npm i @clerk/remix@4.0.14-snapshot.vff20ad3 --save-exact
npm i @clerk/clerk-sdk-node@5.0.10-snapshot.vff20ad3 --save-exact
npm i @clerk/shared@2.2.2-snapshot.vff20ad3 --save-exact
npm i @clerk/testing@1.1.6-snapshot.vff20ad3 --save-exact
npm i @clerk/themes@2.1.9-snapshot.vff20ad3 --save-exact
npm i @clerk/types@4.6.0-snapshot.vff20ad3 --save-exact |
ff20ad3 to
19e95a6
Compare
4895e8f to
a238328
Compare
4b53af7 to
58ca606
Compare
Co-authored-by: Stefanos Anagnostou <anagstef@users.noreply.github.com>
9db8246 to
4d7a407
Compare
…it-duplex-option-is-required-when
|
I'm getting the following error: The problem is that my code looks like this: export async function action(args: ActionArgs) {
const formData = await args.request.formData();
const auth = await getAuth(args);
...
}In other words, the request body is read before calling The workaround is to always call getAuth first: export async function action(args: ActionArgs) {
const auth = await getAuth(args);
const formData = await args.request.formData();
...
}But this is error-prone and easy to forget to do or accidentally change in a large project. At the minimum, this should be documented in the Clerk Remix guide. Ideally, this limitation would be removed. |
Description
RequestInit.duplex now is required if body is provided:
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change