question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not work in Firefox 79+ because SharedArrayBuffer is undefined

See original GitHub issue

Describe the bug The front page says:

Your browser doesn’t support SharedArrayBuffer, thus ffmpeg.wasm cannot execute. Please use latest version of Chromium or any other browser supports SharedArrayBuffer.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://ffmpegwasm.github.io/
  2. Scroll down to ‘Demo’
  3. See quoted error

Expected behavior As SharedArrayBuffer is available in the aforementioned versions of Firefox (on certain conditions), I think it is fair we don’t fall into the “this only works in Chrome” bane of Web applications made today, especially if the application may in fact work in Firefox and the latter only refuses to provide the object for security reasons: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/79#JavaScript

Desktop (please complete the following information):

  • OS: Windows 10 x86-64
  • Browser Firefox 64-bit
  • Version 81.0.1

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:10
  • Comments:29

github_iconTop GitHub Comments

8reactions
gzuidhofcommented, Aug 21, 2021

For those that want to host a demo/app on a domain where you can’t control the headers, with a service worker you can actually set the required COOP and COEP headers. See the coi-serviceworker repo, and this blog post that explains the approach.

It’s a bit crazy, but it’s a solution for demos hosted on Github pages.

5reactions
trybickcommented, Aug 7, 2021

I was able to fix this in Chrome for a react project on netlify by creating a netlify.toml with these headers:

[[headers]]
  for = "/*"
  [headers.values]
      Cross-Origin-Opener-Policy = "same-origin"
      Cross-Origin-Embedder-Policy = "require-corp"
Read more comments on GitHub >

github_iconTop Results From Across the Web

React Error: "SharedArrayBuffer is not defined" in Firefox
I have a React app, created with 'create-react-app' (I also use jsdom NPM package), and for some reason, the application throws an error...
Read more >
SharedArrayBuffer - JavaScript - MDN Web Docs
The SharedArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer, similar to the ArrayBuffer object, ...
Read more >
Enabling SharedArrayBuffers in Firefox | ECMAScript Cookbook
Open Firefox. · Navigate to about:config . · Click I accept the risk! · Search for shared . · Double-click javascript.options.shared_memory . ·...
Read more >
Shared Array Buffer | Can I use... Support tables for HTML5 ...
1 Has support, but was disabled across browsers in January 2018 due to Spectre & Meltdown vulnerabilities. 2 Enabled by default in Nightly,...
Read more >
Safari Technology Preview Release Notes - Apple Developer
Note: Shared Tab Groups and syncing for Tab Groups, Website Settings, and Web Extensions are not enabled in this release. WebAssembly. Fixed error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found