-
Notifications
You must be signed in to change notification settings - Fork 16.1k
[Bug]: [AudioWorklet] value of globalThis
differs between first and second calls to the worklet.
#41263
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
Comments
Hi @mlaurencin @codebytere |
Hello @codebytere, Thanks in advance 🙇 |
Hey @codebytere |
Hello @codebytere, Thanks in advance 🙇 |
@rmnbrd good news! This was an upstream issue fixed in https://issues.chromium.org/issues/327027138. I can try to backport it but it's in versions v30.0.0-beta.1 and newer. |
Fixed in #41889 |
Hello @codebytere, |
Hello @mlaurencin and @codebytere, Do you have news to share regarding when that fix will be released? Thanks 🙂 |
I'm having the same issue; it works the first 4 times and doesn't work after that. Refreshing the renderer process will reset it for the next 4 tries With nodeIntegrationInWorker set to false globalThis will always have the same value (AudioWorkletGlobalScope) In electron 27.x.y, 28.x.y and 29.x.y it worked only the first time. Since electron 30 (up to the latest v34.0.0-alpha.6) it's working only the first 4 times Gist here: https://gist.github.com/5a8ab93852ccb201057a9f3e813af47b |
Tracked partially to https://chromium-review.googlesource.com/c/chromium/src/+/5270028 |
Uh oh!
There was an error while loading. Please reload this page.
Preflight Checklist
Electron Version
27.0.0
What operating system are you using?
macOS
Operating System Version
macOS 14.3
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
26.6.8
Expected Behavior
The value of the
globalThis
variable, inside anAudioWorklet
, is supposed to be stale.Actual Behavior
Since v27.0.0, the value of
globalThis
is changing from the first to the second call to the AudioWorklet, only whennodeIntegrationInWorker
is set totrue
.You can find attached screenshots that will give you more context about this issue, as well as a fork of the
electron-quick-start
project with the changes to reproduce the issue easily.The biggest side-effect of this bug is that we no longer have access to node env (like require etc ...)
Testcase Gist URL
rmnbrd/electron-quick-start@master...rmnbrd:electron-quick-start:issue-globalThis-value
Additional Information
Reproduction steps:
electron-quick-start
project,globalThis
differs between the first and second call to the AudioWorklet.The text was updated successfully, but these errors were encountered: