[Bug]: Error sending packet 704992908 ReferenceError: SharedArrayBuffer is not defined
Before submitting
- [x] I have searched existing issues to make sure this bug hasn't already been reported
- [x] I have updated to the latest version of the software to verify the issue still exists
- [x] I have cleared cache/cookies/storage or tried in a private/incognito window (if applicable)
Hardware
Rak4631
Connection Type
Bluetooth
Local or Hosted
https://client.meshtastic.org
Firmware Version
2.6.1.7c3edde
Operating System
Windows 11
Browser
Edge 134.0.3124.72 & Chrome 134.0.6998.89
Expected Behavior
Bluetooth connections works
Actual Behavior
I'm getting a console error when trying to connect to nodes using bluetooth.
UI not loading and I'm unable to use the node in the web client.
Steps to Reproduce
- Click New Connection
- Click Bluetooth
- Click New Device
- Select the device from the browser modal and click Pair
- Click on the new UI button for that device
Relevant console output
index-iVSvOqO1.js:512 Error sending packet 504699740 ReferenceError: SharedArrayBuffer is not defined
at pF (index-iVSvOqO1.js:512:43959)
at vF.writeToRadio (index-iVSvOqO1.js:512:65124)
at index-iVSvOqO1.js:512:49189
at mF.processQueue (index-iVSvOqO1.js:512:45454)
at async vF.sendRaw (index-iVSvOqO1.js:512:49138)
Screenshots
Additional Context
No response
@ch3p4ll3 can you please confirm that you've cleared your cache and retried? This has been fixed but requires clearing the cache.
As well please try using the https://client.meshtastic.org website in a incognito tab.
I tried using incognito mode and it worked, but only for the first connection, after an F5 the page refreshed and the error recurred and until I clear the cache again it does not work
@ch3p4ll3
Use Shift+F5 and see if that fixes it.
@Hunter275 Yep, Shift+F5 fixes the problem, but still, if I close the tab and open it again without clearing the site cache it doesn't work
@ch3p4ll3 Can I ask you try this preview deployment of the Mestastic client? https://web-nt9s8cck3-meshtastic.vercel.app/
Let us know if it fixes your issue, additionally one other step I'd like you to try is opening your Chrome DevTools, selecting the Application Tab, then going to Service Workers. If you see anything in the right pane, select the hyperlink named "Unregister". After refreshing your browser (or closing it entirely) you shouldn't have issues with Bluetooth connections.
I tried the preview version and the problem persists, even removing the service worker doesn't work
- I tried again but the problem is not solved, I always have to delete the site data before I can connect
I’m experiencing the same issue, I got SharedArrayBuffer error when trying to connect via Bluetooth. I’ve tested this on both my LilyGO T-Beam and SenseCAP T1000-E devices. After clearing the browser cache, the first connection attempt works fine. However, when I try to connect a second time, the error appears again and the connection fails like #489
And with the last release I get this error on google Chrome: Uncaught (in promise) TypeError: navigator.bluetooth.getDevices is not a function
Noticing that when this happens, the main html doc shows "200 OK (from service worker)" in the dev tools network viewer's Header tab. When I force refresh, it doesn't mention the service worker and the cross-origin-opener-policy and cross-origin-embedder-policy headers show properly set. Maybe something with the service worker is the issue?
This should be retested using the latest webUI as PR #638 and another related PR were recently merged.
Noticing that when this happens, the main html doc shows "200 OK (from service worker)" in the dev tools network viewer's Header tab. When I force refresh, it doesn't mention the service worker and the cross-origin-opener-policy and cross-origin-embedder-policy headers show properly set. Maybe something with the service worker is the issue?
Thanks for mentioning this, I've seen the same google results I believe you are mentioning and in our vite.config.ts file we have all relevant headers being set. Please retest with the latest version of the web client.
This should be retested using the latest webUI as PR #638 and another related PR were recently merged.
Hi, I tried the latest webUI but nothing changed, I also tried force-refresh, cleaning site data and remove service worker but nope. This is what I get when I click the bluetooth button
@ch3p4ll3 Can you access https://client-test.meshtastic.org and see if the issue still occurs on that web host? This can be a tough to duplicate issue as it doesn't occur on my set up but I know others have experienced it.
@ch3p4ll3 Can you access https://client-test.meshtastic.org and see if the issue still occurs on that web host? This can be a tough to duplicate issue as it doesn't occur on my set up but I know others have experienced it.
hello, I have tried in both clients, even doing shift+f5 but the problem persists:
I had the exact same issues and traced it to the configuration of Cross-Origin-Embedder-Policy / Cross-Origin-Opener-Policy headers, which seem to prevent access to the SharedArrayBuffer.
https://client-test.meshtastic.org/ is working fine for me. The GATT Server error was logged once but disappeared and never returned after a simple refresh. Now I can simply refresh the page (F5) and connect again and again. ✅
Some translations are missing, but I think this is fine for testing. I was switching to English to work around that.
I tried again but on Windows 11 both on Chrome and Edge I always have the same error: Uncaught (in promise) TypeError: navigator.bluetooth.getDevices is not a function
web-nt9s8cck3-meshtastic.vercel.app was able to resolve the issue for me on Chrome with a RAK 4631 WisBlock
I stand corrected, it reappears if you disconnect and try to reconnect