[Bug]: failed parse FormData with Cloudflare
See original GitHub issueWhat version
0.0.2
What happend
input-resolvers.ts#L6-L7 failed parse FormData with Cloudflare Pages functions.
Steps to Reproduce
I found that new URLSearchParams().toString()
return ""
with Cloudflare Pages functions at ergofriend/remix-cloudflare-pages
debug code
const formData = await request.clone().formData()
const data = new URLSearchParams(formData as URLSearchParams).toString()
const json = JSON.stringify(Object.fromEntries(formData.entries()))
sentry.captureMessage(`action URLSearchParams: ${JSON.stringify(data)} json: ${json}`)
sentry.io console
// local (wrangler2)
action URLSearchParams: "like=takenoko" json: {"like":"takenoko"}
// cloudflare pages functions
action URLSearchParams: "" json: {"like":"takenoko"}
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
ERROR 5400: Bad request: Error parsing form fields with Node
Hi, I have the following POST handler in my node (Remix) server: export async function action({ request }: ActionArgs) ...
Read more >File type error when uploading file via formData #48 - GitHub
When trying upload file with formData miniflare is throwing following error: /home/pagan/webdev/kvms/backend/node_modules/formdata-node/lib/FormData.js:286 ...
Read more >Network Connection Lost - saving form data (file) to R2 bucket ...
I just noticed that you're calling formData on the request. This is causing you to read the object into RAM. Workers has a...
Read more >FormData - Web APIs | MDN
Chrome Edge
FormData Full support. Chrome5. Toggle history Full support. Edge12. Toggl...
@@iterator Full support. Chrome50. Toggle history Full support. Edge18. Toggl...
FormData() constructor Full support....
Read more >cloudscraper - npm
3 this error is returned when library failed to parse and solve js challenge. error will be String with some details. ⚠️ ⚠️...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thx, but I got same error
Invalid enum value. Expected 'takenoko' | 'kinoko'
. And console debug said same result as below.Exactly, I will report to remix, thank you for your cooperation.
@ergofriend could you try reproducing the issue using the package from the branch
cloudflare-adapter-workaround
? You can install locally by using the following entry in yourpackage.json
:If the error persists you should report the issue in the remix repo since the cloudflare adapter would have to be fixed.