Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

132
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda