#[Electron + Vue + wasm] @sentry/electron 6.x breaks emscripten + SharedArrayBuffer

5 messages · Page 1 of 1 (latest)

final ether
#

Hi! This is quite a weird one, sorry in advance 😬

Recently, I noticed that when Sentry is enabled, I am given an issue in my app regarding the use of SharedArrayBuffer by some wasm module we are using through emscripten. The whole module crashes, and the app cannot start without it.

Uncaught (in promise) DataCloneError: Failed to execute 'postMessage' on 'Worker': SharedArrayBuffer transfer requires self.crossOriginIsolated.
    at […]
    at new Promise (<anonymous>)
    at loadWasmModuleToWorker […]
    at Array.map (<anonymous>)
    at Object.loadWasmModuleToAllWorkers […]
    at […]
    at callRuntimeCallbacks […]
    at preRun […]
    at run […]
    at removeRunDependency […]

(this is an emscripten stacktrace, I just included it for context)

I’ve made some tests, and found that:

  • the issue only arises after upgrading @sentry/electron past v6.0
  • @sentry/electron v5.12.0 works fine
  • I am also using @sentry/vue, but v9.1.0 poses no issue

I am not aware of Sentry modifying anything related to SharedArrayBuffer nor crossOriginIsolated, does anyone know something about that?

Thanks in advance ❤️

#

[Electron + Vue + wasm] @sentry/electron 6.x breaks emscripten + SharedArrayBuffer

silent pulsar
#

Could you open a GH issue in the electron SDK repo? We’ll need to dig in further! If you could provide a minimal repro that would help a lot too.

final ether
#

I’m not very well versed either in Sentry or emscripten, but I’ll try to provide a small project with the issue 😅

silent pulsar