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.

JSException: SharedArrayBuffer is not defined

See original GitHub issue

i’m not sure if it’s somehow related with #6 but there i get the following error if i want to use FFmpegBlazor in my WebAssembly project. I noticed that there is a JSException on the hosted version on netlify as well. i’m testing https://ffmpegblazor.netlify.app/tomp3

Microsoft.JSInterop.JSException: SharedArrayBuffer is not defined
ReferenceError: SharedArrayBuffer is not defined
    at blob:https://localhost:5011/8b279815-9592-46f1-806c-a92e17d96ca7:22:175
    at https://unpkg.com/@ffmpeg/ffmpeg@0.10.0/dist/ffmpeg.min.js:1:7334
    at f (https://unpkg.com/@ffmpeg/ffmpeg@0.10.0/dist/ffmpeg.min.js:1:12320)
    at Generator._invoke (https://unpkg.com/@ffmpeg/ffmpeg@0.10.0/dist/ffmpeg.min.js:1:12108)
    at Generator.next (https://unpkg.com/@ffmpeg/ffmpeg@0.10.0/dist/ffmpeg.min.js:1:12745)
    at i (https://unpkg.com/@ffmpeg/ffmpeg@0.10.0/dist/ffmpeg.min.js:1:5052)
    at c (https://unpkg.com/@ffmpeg/ffmpeg@0.10.0/dist/ffmpeg.min.js:1:5255)
   at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1[[Microsoft.JSInterop.Infrastructure.IJSVoidResult, Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
   at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args)
   at FFmpegBlazor.FFMPEG.Load(Boolean triggerEvents)

i’m happy to provide more info if needed. Thank you

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sps014commented, Aug 8, 2022

@Heartnett Another alternative is to build project then use 3rd party local web server which can serve wasm files and allows you to add headers with web request ie. add these :

Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
1reaction
sps014commented, Mar 8, 2022

That should be resolved in .NET 7 when they deliver Multi threading support in blazor wasm . Currently not sure about Kestrel , didn’t find anything useful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Error: "SharedArrayBuffer is not defined" in Firefox
SharedArrayBuffer has been disabled across all browsers except Chrome desktop since the discovery of Spectre, but Chrome desktop also disables ...
Read more >
How can I fix SharedArrayBuffer is not defined?
In response to potential security vulnerabilities like the Spectre attack, which could exploit high-resolution timers like SharedArrayBuffer to read memory ...
Read more >
How to fix SharedArrayBuffer is not defined error - TechKBlog
SharedArrayBuffer is an array object in JavaScript, which can hold raw bytes and the memory contents can be shared between multiple threads.
Read more >
ReferenceError: SharedArrayBuffer is not defined #263
Describe the bug Getting a ReferenceError: SharedArrayBuffer is not defined error after [info] ffmpeg-core.js script loaded To Reproduce ...
Read more >
Uncaught ReferenceError: SharedArrayBuffer is not defined
When I'm using the video sdk sample and video-non-sab is active and i'm trying to share, I get the following exception: Uncaught ...
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