[WEB COMPAT] SharedArrayBuffer issue breaks websites #139
Labels
No labels
bug
confirmed
contribution welcome
duplicate
enhancement
good first issue
help wanted
important
invalid
other
question
upstream
web compat
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
celenity/Phoenix#139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Confirmation
Which domain(s) are you experiencing this issue on?
Domains which require SharedArrayBuffer usage have problems. Two examples are below, and neither site has an issue on stock Firefox.
What version of Phoenix are you using?
2025.06.06.1
What version of Firefox are you using with Phoenix?
139.0.1
What operating system are you experiencing this issue on?
Ubuntu
Other
No response
Please explain the issue you are experiencing.
When going to websites which require SharedArrayBuffer, an error occurs. In the example of https://eden.net.nz/test/sab.html, this can be seen easily. When SAB is working, you will see a message that says, "SharedArrayBuffer OK." When SAB is not working, you will see a message that says, "SharedArrayBuffer not available."
I have been tinkering with settings for weeks, and I have come to the conclusion that the setting
dom.postMessage.sharedArrayBuffer.withCOOP_COEPtotrueis (supposedly) the correct fix. However, when I change it totruein about:config or using a user.js/config override, the SharedArrayBuffer error persists. If I change it totruein the phoenix.js/phoenix-desktop.js, suddenly the error goes away. Why does the SharedArrayBuffer pref switch only work if set using the phoenix.js and not any other way? To clarify,dom.postMessage.sharedArrayBuffer.withCOOP_COEPdoes show astruein about:config when changed in user.js/config setup, so the setting is actually changing, but it doesn't seem to actually enable SharedArrayBuffer unless it is set at the phoenix.js level. I can even set it tofalsewith the config, and SharedArrayBuffer still works if it is set totrueat phoenix.js.It's like Firefox recognizes and saves the config setting, but somehow, the actual permission to use SharedArrayBuffer still comes from phoenix.js/phoenix-desktop.js.
So I took a look, and I'm unable to replicate the issue (tested on Fedora 42). I can confirm that
https://eden.net.nz/test/sab.htmldisplaysSharedArrayBuffer not available., but after settingdom.postMessage.sharedArrayBuffer.withCOOP_COEPtotrueand restarting Firefox, I see it statesSharedArrayBuffer OK.To confirm, did you restart the browser after changing the value of
dom.postMessage.sharedArrayBuffer.withCOOP_COEP? Changing the value of this preference appears to requires a restart to take effect.I just added
demo.actualbudget.org&eden.net.nzto the Web Compat page, so thanks for that.TL;DR: skip to the bottom, I think I am on the right path to figuring out the problem.
I did restart each time since I noticed that's required to take effect.
Since you weren't able to replicate it, I created a new test profile with the exact same setup (same user.js/config, since that's all I had done with the first test profile). For some reason, the second profile behaves correctly/as expected. When I went back to the first profile, the problem was still there. I compared everything. As far as I can tell, they're identical profiles with same user.js and everything.I've been seeing similar problems before, where tweaking about:config and/or a custom config file several times can lead to some settings no longer taking effect and "sticking" to Phoenix defaults, even though about:config shows the custom config changes I haven't nailed down a rhyme or reason for why it happens, but I'm working on that.Edit: It happened again, and creating a new profile did not solve the problem.
dom.postMessage.sharedArrayBuffer.withCOOP_COEPis set totruevia the config file, but in practice, it's still acting like it'sfalseand having settings based on the Phoenix defaults. I have tried restarting Firefox, uninstalling and reinstalling Phoenix, creating a fresh profile, etc. The only thing that prevents the SharedBufferArray errors is if I change the pref in phoenix-desktop.js. Setting it totruein the config file, although it shows it as set correctly, still causes the error to be thrown. It's basically showing the correct specialized config settings in the about:config page, but the browser is behaving like there is no specialized config being used. Only changing phoenix-desktop.js affects the browser behavior for this setting for me.Edit 2: PROGRESS! Reproducible progress. I have learned that if I change the
dom.postMessage.sharedArrayBuffer.withCOOP_COEPpref in a config file, it does reflect in about:config as changed correctly, but it does not actually go into effect (still see error on websites). However, if I do NOT put the pref in the config file at all and ONLY change it in the about:config GUI, the setting is properly implemented - no more errors. How/why is that? Why would the config file setting reflect in prefs.js and/or about:config but not have the same effect on websites as changing it in the about:config GUI? Isn't the point of the user.js/config file setup to avoid having to go into about:config for every single setting?Results Summary for the SharedArrayBuffer
dom.postMessage.sharedArrayBuffer.withCOOP_COEPissue:WHAT WORKS
Set to true in phoenix-desktop.js --> works (no error)
Set to true manually in about:config --> works (no error)
Set pref to true directly in user.js --> works (no error)
WHAT DOES NOT WORK
Set to true in special config file --> shows value correctly in about:config but does not work (throws SharedArrayBuffer error as if were still set to false)
So is the problem something upstream with Mozilla and how they are implementing either the AutoConfig stuff or something to do with this specific pref? Or is this a Phoenix bug?
Also, it may be worth noting that it took me an embarrassingly long time to realize that just deleting the user.js file was not enough to detach the profile from the special config file. I didn't think about the fact that I would need to remove the config file pref from the prefs.js file (or about:config), so that may be worth a short blurb in the Extended Configs setting of the Wiki or README.
I'm leaving the original comment below in case it helps you troubleshoot any of these weird settings issues, but I'll probably need to wait for this new below problem to reoccur predictably and report under a new issue, if appropriate. However, of course feel free to respond to my below confusion if you know the explanation off the top of your head.
Original comment:
~~Okay, maybe this should be a separate issue, but in trying to understand how everything is working and isolate the root of the conflicts I've been noticing, I've discovered something else confusing. Often, when I create a new profile, there is an unexpected result in relation to the phoenix-desktop.js. Here are the reproducible steps I've taken several times:
pref("browser.phoenix.status.empty", "empty phoenix config applied", locked);. Save the phoenix-desktop.js file.Another example of weirdness suggesting that these Phoenix prefs are stored and pulled from somewhere else:
pref("browser.phoenix.status.test", "test success", locked);.pref("dom.postMessage.sharedArrayBuffer.withCOOP_COEP", true);Save the phoenix-desktop.js file.I would expect the new profile to have the
test successpref value and have thedom.postMessagepref be true. Instead, the test success is present, butdom.postMessage.sharedArrayBuffer.withCOOP_COEPis stillfalse. How could this be?Sometimes, if I uninstall and reinstall Phoenix, things go back to working as I expect (where emptying phoenix-desktop.js removes all Phoenix prefs), but somewhere along the way, this or some similar issue begins occurring, throwing a wrench into my web compat troubleshooting. It seems like prefs get "stuck" and are being stored somewhere globally that isn't phoenix-desktop.js sometimes.
Maybe this is expected, but my understanding was that the profiles pulled their "default" settings from phoenix-desktop.js unless they were overridden with a different config, so how is the new profile still showing all of the Phoenix prefs? (I am trying to root out why how everything is working and why I'm having unexpected results because I'm having web compat issues. I can't troubleshoot which prefs are causing the web compat problems if I can't get my prefs/configs to behave in a reliable manner and understand how it's working. Thanks for any insight you can offer.)
Edit: To clarify, I don't think any of this ^ needs a "fix" since I have quickly rectified it by uninstalling and reinstalling Phoenix, I'm just wondering how the "stuck" prefs could happen in the first place so I can better understand how this works for further troubleshooting.~~
Great point, I'll make sure to note this - I never thought about that before. Thanks.
That's correct.
It's hard to say, but it sounds like something is preventing your changes to the
phoenix-desktop.jsfile from taking effect. Next time this happens for you, can you please check the contents offile:///etc/firefox/defaults/pref/phoenix-desktop.jsfrom within Firefox, to ensure it displayspref("browser.phoenix.status.empty", "empty phoenix config applied", locked);instead of Phoenix's default preferences? That'll help rule that out.Fair enough, thanks for taking the time to troubleshoot and understand the project - it definitely helps a lot, very much appreciated.