Skip to content
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

Help needed solving -> DOMException: Failed to construct 'Worker': Script at 'https://reddit.com/814.ffmpeg.js' cannot be accessed from origin 'https://reddit.com.' #750

Open
QuantumForced opened this issue May 18, 2024 · 0 comments

Comments

@QuantumForced
Copy link

QuantumForced commented May 18, 2024

Wondering if someone might be able to kindly lend some advice re. an exception I can't seem to solve:

I have written a google chrome extension using local ffmpegwasm files (no need to run a server or download any ffmpegwasm files), which allows users to click an injected 'download' button under Reddit videos (via content_scripts). This was working great on ffmpegwasm v11, but since migrating to v12 (latest version) I have been unable to solve the following exception which is triggered during ffmpeg.load(): as seen in chrome's console log:

DOMException: Failed to construct 'Worker': Script at 'https://www.redditstatic.com/814.ffmpeg.js' cannot be accessed from origin 'https://reddit.com'. At i.load (chrome-extension://ljejfmmefhnpbpdhkhbbajpihfhnbdnm/lib/ffmpeg/umd/ffmpeg.js:1:2918)

I'm a programming beginner and I've been stuck trying to fix this for many, many hours. This exception does not happen and the video downloads if I instead use a feature of my extension which allows entering a Reddit video URL directly into a field in the extensions popup or options window. Also, I have no idea why the 814.ffmpeg.js file is being referenced along with redditstatic.com (from exception to exception, this url seems to randomly change to other reddit url's too), though I imagine this is part of the problem?

I have seen there are a couple of mentions of this error on this github repository, with some fixes involving using the worker814URL and/or classWorkerURL params within ffmpeg.load() and pointing them to the 814.ffmpeg.js file, which I have tried without any success (although I did notice that using classWorkerURL changed https://www.redditstatic.com/814.ffmpeg.js to chrome-extension://ljejfmmefhnpbpdhkhbbajpihfhnbdnm/lib/ffmpeg/umd/814.ffmpeg.js). Though, It seems that previous discussions around this error might not be too helpful for me as those appear geared towards ffmpegwasm running with a server, as apposed to entirely locally within a chrome extension.

Any help would be super appreciated - many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant