Weird header response randomly

Not sure what causes it but randomnly when trying to convert an image to a stream to upload to youtube, uploadthing returns a weird header value and it breaks the parser. This link specifically: https://uploadthing.com/f/b17adb06-212c-4002-9685-c3b0653d14ad-albtc1.png
15 Replies
opti.
opti.OPβ€’15mo ago
{"error":"error converting stream - RequestError: Parse Error: Invalid header value char
{"error":"error converting stream - RequestError: Parse Error: Invalid header value char
also insomnia says this: Error: Stream error in the HTTP/2 framing layer wonder if it loads here? https://uploadthing.com/f/b17adb06-212c-4002-9685-c3b0653d14ad-albtc1.png didn't load
opti.
opti.OPβ€’15mo ago
node 18.17.1 Ok so it's something to do with the filename: YouTube – GA4 Downloads v2.png i think the dash is breaking it
opti.
opti.OPβ€’15mo ago
Someone else is getting the same issue on github i'll track there: https://github.com/pingdotgg/uploadthing/issues/402
GitHub
[bug]: When uploaded file name is Chinese, node fetch download will...
Provide environment information System: OS: macOS 13.3.1 CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz Memory: 1.97 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 18.17.1 - ~/.nvm/...
theo (t3.gg)
theo (t3.gg)β€’15mo ago
Oh shit, very good catch. Ty for sharing here, cc @julius @markr
markr
markrβ€’15mo ago
That’s an interesting one. I believe I have found a solution for this, just manually applied the change on the file that wasn't working before, mind testing that one again on your end to see if it works?
opti.
opti.OPβ€’15mo ago
I’m out and about today, but I’ll ping when I get home later πŸ™‚ Looks like it's working now πŸ™‚
markr
markrβ€’15mo ago
Nice, I'm going to merge those changes then, so future uploads will hopefully "just work" Changes are up, looks to be working on my end πŸ‘
opti.
opti.OPβ€’15mo ago
Umm well, would it now being stopped the other way?
{"error":{"code":"UPLOAD_FAILED","message":"Invalid according to Policy: Policy Condition failed: [\"eq\", \"$Content-Disposition\", \"inline; filename=\"maxresdefault.jpg\"\"]"},"input":{"url":"https://i.ytimg.com/vi/L-604WrRJ2E/maxresdefault.jpg"}}
{"error":{"code":"UPLOAD_FAILED","message":"Invalid according to Policy: Policy Condition failed: [\"eq\", \"$Content-Disposition\", \"inline; filename=\"maxresdefault.jpg\"\"]"},"input":{"url":"https://i.ytimg.com/vi/L-604WrRJ2E/maxresdefault.jpg"}}
@markr
markr
markrβ€’15mo ago
oh no maxresdefault.jpg is the file name correct?
opti.
opti.OPβ€’15mo ago
yes it's being uploaded from a URL from youtube this is happening on the server i'm guessing because it does this on 5.6.1 and 5.7.0
markr
markrβ€’15mo ago
hmmm works fine with the component, let me try on server It shouldn't make a difference, this was an infra-side change Oh wait. I think I see what might be wrong here
opti.
opti.OPβ€’15mo ago
monkaHmm
markr
markrβ€’15mo ago
Will merge the fix shortly, just waiting on CI Fix should be up now Looks to work for me
opti.
opti.OPβ€’15mo ago
Working here too thank you πŸ™‚
Want results from more Discord servers?
Add your server