#CORS Error After Upgrading Remotion from 4.0.180 to 4.0.202
12 messages · Page 1 of 1 (latest)
Context: I recently upgraded my Remotion dependencies from version 4.0.180 to 4.0.202:
Previous Versions:
"@remotion/cli": "^4.0.180"
"@remotion/player": "^4.0.180"
"@remotion/transitions": "^4.0.180"
"@remotion/zod-types": "4.0.180"
"remotion": "4.0.180"
New Versions:
"remotion": "^4.0.202"
"@remotion/animated-emoji": "4.0.202"
"@remotion/cli": "^4.0.202"
"@remotion/player": "^4.0.202"
"@remotion/transitions": "^4.0.202"
"@remotion/zod-types": "^4.0.202"
After this update, I started encountering CORS errors when previewing videos using the Player component. The error message looks like this:
Issue: It seems that in the previous version, videos were accessed through a proxy, resulting in URLs like:
http://localhost:3001/proxy/https://mydomain.com/backgrounds/27.mp4#t=0,71.18
In the new version, the proxy appears to have been removed or altered, which could be causing the CORS issues.
Question: Has the proxy functionality been removed or changed in Remotion 4.0.202? If so, what is the recommended workaround to prevent these CORS errors when using OffthreadVideo? How can I ensure that my videos load correctly without running into CORS issues?
CORS Error After Upgrading Remotion from 4.0.180 to 4.0.202
Tried rollback to 4.0.187 and worked
Initially, I suspected the issue might be related to a proxy change. However, after checking the network requests in the browser’s developer tools (F12), I confirmed that the videos were not being proxied in either the old or new version. Despite this, the CORS errors only started appearing after upgrading to version 4.0.202.
When I roll back to version 4.0.187, the issue is resolved, so the problem seems to be related to something that changed in 4.0.202.
interesting
are you drawing videos to a canvas maybe?
or prefetching, or doing anything else with them?
the proxy only happens with OffthreadVideo during rendering, it hasn't changed in a recent version
I am having similar errors, since upgrading from 4.0.180 to 4.0.204
I am getting the following error on my player: Access to video at 'https://domain.nyc3.cdn.digitaloceanspaces.com/Videotok/backgrounds-videos/squares-animated-white.webm#t=0,2.57' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
hmm i see now
i think it is because of https://github.com/remotion-dev/remotion/blob/main/packages/core/src/video/VideoForPreview.tsx#L250
i’ll fix this for the next version
thanks!
Thanks! will wait for this update
the update is out!