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

207
Visualizações
BuildFire LocalStorage Not Saving Between Admin and Widget

I am having issue in BuildFire that works on my local computer but fails in production when the plugin is uploaded.

In my plug-in, I am having the user enter and save values to the buildfire local storage as such in my Content.js:

function saveCredentionals (){

    buildfire.localStorage.setItem("bw_organizer_id", organizer_id, (error) => {
      if (error) return console.error("something went wrong!", error);
      console.log("All is well, data saved and other plugins can now access it");
    });

    buildfire.localStorage.setItem("bw_access_token", access_token, (error) => {
      if (error) return console.error("something went wrong!", error);
      console.log("All is well, data saved and other plugins can now access it");
    });

  }

The files save correctly and values can be retrieved in the Content.js, even when page reloads. Next I try to retrieve the values in Widget.js as such:

Promise.all([
        buildfire.localStorage.getItem("bw_organizer_id"),
        buildfire.localStorage.getItem("bw_access_token"),
      ]).then(items => {

        let has_organizer_token = false;

        let has_access_token = false;

        if (items[0]) {
          has_organizer_token = true;
        }

        if (items[1]) {
          has_access_token = true;
        }

        if (has_access_token && has_access_token) {
          displayVideoPage(items[0], items[1]);
        } else {
          setMainContent(<div>Organizer ID and access token required.</div>);
        }


      });

This works on my local computer but fails to retrieve the value when I publish my plugin and run it on the app.buildfire.com . The items from the Promise are both null on production in my Widget.js.

Any thoughts on why this is happenings? The code is also open sourced here: https://github.com/BingeWave-Libraries/buildfire-livestream

about 4 years ago · Juan Pablo Isaza
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