# "SharedArrayBuffer is not supported!" , after 1-2 refreshes it disappears

**URL:** <https://devforum.zoom.us/t/sharedarraybuffer-is-not-supported-after-1-2-refreshes-it-disappears/99028>\
**Category:** Video SDK\
**Created:** [November 27, 2023, 6:18am UTC](https://devforum.zoom.us/t/sharedarraybuffer-is-not-supported-after-1-2-refreshes-it-disappears/99028 "2023-11-27T06:18:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fides-it](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/fides-it/32/51395_2.png) [@fides-it](https://devforum.zoom.us/u/fides-it)\
**Post date:** [November 27, 2023, 6:18am UTC](https://devforum.zoom.us/t/sharedarraybuffer-is-not-supported-after-1-2-refreshes-it-disappears/99028/1 "2023-11-27T06:18:37Z")

</div>

I’m using this check at initialization:

`if (!(typeof SharedArrayBuffer === 'function')) { fail() }`

this usually works, except when I open a fresh browser, then it fails the first time I open my app. After one or two refreshes, the SharedArrayBuffer is detected. I have this in Edge, Chrome & Firefox. Do I need to “wait” for the SharedArrayBuffer to be detected, what’s the correct approach?

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [November 27, 2023, 8:04am UTC](https://devforum.zoom.us/t/sharedarraybuffer-is-not-supported-after-1-2-refreshes-it-disappears/99028/2 "2023-11-27T08:04:35Z")

</div>

Hey @fides-it

Thanks for your feedback.

Using `typeof SharedArrayBuffer === 'function'` to check if SharedArrayBuffer is supported is correct.

Have you used service worker on your page or made configurations on the web server that may cause the response headers to vary with each page visit?

> **[SharedArrayBuffer - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements)**
>
> The SharedArrayBuffer object is used to represent a generic raw binary data buffer, similar to the ArrayBuffer object, but in a way that they can be used to create views on shared memory. A SharedArrayBuffer is not a Transferable Object, unlike an...

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![fides-it](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/fides-it/32/51395_2.png) [@fides-it](https://devforum.zoom.us/u/fides-it)\
**Post date:** [November 27, 2023, 4:09pm UTC](https://devforum.zoom.us/t/sharedarraybuffer-is-not-supported-after-1-2-refreshes-it-disappears/99028/3 "2023-11-27T16:09:49Z")

</div>

Hi Vic, I’ve disabled my service worker in my Angular application for local development. I checked the Chrome devtools, there’s no service worker registered

edit: I got it figured out: I’m using a local proxy config (proxy.conf.js) in my Angular app that sets the COEP response headers, but the path for that was “/\*\*”. The initial page I requested was “/” which didn’t match against the pattern… my bad!

edit: just posting this for my fellow Angular devs: the index.html is served as 304 - not modified b ythe build-angular:dev-server, but the COEP response headers are not set because it bypasses the proxy conf I set up… I’m looking for a solution still, or I might ignore it (on acc/prd there’s no caching of index.html)
