chrome-extension-app icon indicating copy to clipboard operation
chrome-extension-app copied to clipboard

Chrome extension no longer works

Open ZarcoV opened this issue 3 years ago • 7 comments

Unfortunately this chrome extension no longer works and now also throws the Uncaught (in promise) ReferenceError: SharedArrayBuffer is not defined error.

I've been trying to build a chrome extension using locally stored ffmpegwasm files and came across this example, but sadly it doesn't seem to be supported anymore. I've attempted to run the ffmpeg.min,js and the core in chrome's extension sandbox as well, but this didn't make any difference.

Would it be possible to create a new example extension demonstrating how to do this without encountering the SharedArrayBuffer problem?

ZarcoV avatar Jul 25 '21 14:07 ZarcoV

hi, I am trying to use this example and also having trouble ... have you found a solution for running FFmpeg inside the chrome extension?

ddenis1994 avatar Aug 15 '21 20:08 ddenis1994

The Same issue Screenshot 2022-03-15 at 23 37 06

@jeromewu please help us)

It looks like this is the issue. Screenshot 2022-03-16 at 21 26 34

zheoreh avatar Mar 15 '22 20:03 zheoreh

SharedArrayBuffer is indeed a pain... But they do work, although you will need to do some manual tweaks: https://brunoluiz.net/blog/2022/jan/gif-sane-playback-control-ffmpegwasm/

An example of working extension (so far): https://github.com/brunoluiz/gifsane-extension

Bear in mind as well that Google is blocking any new Manifest V2 extension in their store and, so far, Manifest V3 doesn't properly support WASM (seems to be in the canary version tho). https://bugs.chromium.org/p/chromium/issues/detail?id=1173354

brunoluiz avatar Mar 16 '22 23:03 brunoluiz

@brunoluiz so there is no way to implement it within an extension and it requires a separate sever (website) to perform the conversion...

zheoreh avatar Mar 17 '22 12:03 zheoreh

It works on Chrome, as far you:

  1. Use the correct CSP policies
  2. Use manifest v2

If I recall correctly, manifest v3 will not allow you do run remote scripts. Hosting somewhere else is not going to be an option.

If you follow the post and the GIFSane repository, you should be able to have a working extension.

Manifest V3 adds another complication as well: background workers need to be service workers. It seems ffmpegwasm uses some non-service-worker compatible APIs, which will lead to issues in the future.

brunoluiz avatar Mar 17 '22 13:03 brunoluiz

I mean "so there is no way to implement it within an extension and" publish the one to the web store

zheoreh avatar Mar 17 '22 13:03 zheoreh

@brunoluiz but I still don't understand how to resolve the issue with CSP policies in this application (ffmpeg.wasm Chrome Extension). Can you please fork this repository and implement a fix?

zheoreh avatar Mar 17 '22 14:03 zheoreh