Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

168
Visualizações
Pyodide: ReferenceError: SharedArrayBuffer is not defined

I am developing my final year project. Developing a browser-based IDE. I am using Pyodide for compiling. It was working fine before, but when I tried to run the project now, I have encountered an error about SHaredArrayBuffer(). I do not know what caused that issue. Please guys anyone help me, my final year presentation is next Wednesday, and my project is not working.

Here is were I am using it.

readline: () => {
            let sab = new SharedArrayBuffer(2048)
            let sab_int32 = new Int32Array(sab)
            let sab_uint8 = new Uint8Array(sab)

            send('STDIN', sab)

            Atomics.wait(sab_int32, 0, 0)

            let str_len = sab_int32[0]
            let str_uint8 = sab_uint8.slice(4, 4 + str_len)

            return new TextDecoder().decode(str_uint8) + '\n'
        },

Is there at least an alternative way to do it? And yes I am using a web-worker. I am getting this error on Edge, Firefox, and Mozilla.

ReferenceError: SharedArrayBuffer is not defined

I am running on the website on the localhost. Is is because my website is not certificated?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

SharedArrayBuffer is disabled by default for security reasons starting from Chrome 92 and Firefox. Safari stopped supporting it since long time ago. Here's why: https://developer.chrome.com/blog/enabling-shared-array-buffer/

To use it, you'll need to enable cross-origin isolation by sending some HTTP headers. There are some additional requirements as well. You can learn more here: https://web.dev/coop-coep/

One quick escape-hatch is to register for an origin trial in Chrome. https://developer.chrome.com/blog/enabling-shared-array-buffer/#origin-trial

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda