Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

126
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!