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

136
Visualizações
Firebase Remote Config (Web) always uses default values for Samsung Internet

I've tried to use the Javascript SDK for Firebase Remote Config with my website. For some reason the code works fine when customers browse the website with Chrome, Edge, Vivaldi, and some other browsers. But when the site is viewed using Samsung Internet, or Polypane, the remote config always uses the default values supplied in code, without reaching for the existing ones from the firebase online project. Is someone able to direct me how I might fix this? Code is below:

<script>
    
      const remoteConfig = firebase.remoteConfig();
          remoteConfig.settings = {
            
              fetchTimeMillis: 60000,
              minimumFetchIntervalMillis: 300000

          }
          
          remoteConfig.defaultConfig = ({
  'maintenance_mode_enabled': "false",
              'maintenance_mode_message': "Apologies, our website is unavailable at present. Please direct your enquiries to us by email, or check back here later."
});
        
          
          
          
          
         remoteConfig.fetchAndActivate()
  .then(() => {
              console.log("Thinking");
              
        const val = remoteConfig.getValue("maintenance_mode_enabled");
        const val2 = remoteConfig.getValue("maintenance_mode_message");
                      console.log(val);
                      console.log(val2);
        const maintenance_element = document.getElementById('maintenancemodeoverlay');
              const maintenance_message = document.getElementById('maintenancemodemessage');
              if(val._value=="true" && sessionStorage.bypass != "true"){
                          console.log("Enabling");
                  
                  maintenance_element.style.visibility = "visible";
                  maintenance_message.innerHTML = val2._value;
                  console.log(val2._value);
              }
        
              
              
  })
  .catch((err) => {
    console.error('Firebase Remote Config failed to initialize', err);
  });
  
         
      </script>
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

It turns out this was actually a bug in Firebase's system. After contacting support, they forwarded the bug onto their software engineers who fixed the issue within a day.

about 4 years ago · Juan Pablo Isaza Relatório

0

this could mostly be the issue of setting of those 2 browsers, as your code is working fine in other browsers, I don't see any issue in your code. you can check the local setting of your browser and see if there you find some solution there.

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