Giter VIP home page Giter VIP logo

Comments (6)

google-oss-bot avatar google-oss-bot commented on June 23, 2024

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

from firebase-js-sdk.

jbalidiong avatar jbalidiong commented on June 23, 2024

Hi @enterprisecoderr, thanks for reaching out to us. I'm wasn't able to reproduce the behavior that you've mentioned. I tried fetchAndActivate() using the ff:

  1. Edit the src/app/app.tsx to be:
const remoteConfig = getRemoteConfig(app);

remoteConfig.settings.minimumFetchIntervalMillis = 0;
fetchAndActivate(remoteConfig)
.then(()=>{
  const value = getValue(remoteConfig, "someKey")
  .asString()
  console.log(`Value: ${value}`);

})
  1. Run npm run start
  2. Visit the http://localhost:4200/
  3. Update the remote config value in the console
  4. Refresh the page and get the updated value.

To get a better understanding of what’s causing the failed fetch, could you provide a minimal, but complete sample of a project that I can run locally.

from firebase-js-sdk.

enterprisecoderr avatar enterprisecoderr commented on June 23, 2024

I am not using the bundled fetchAndActivate command. I'm calling activate and then later fetchConfig. Can you try with that setup?

from firebase-js-sdk.

jbalidiong avatar jbalidiong commented on June 23, 2024

Hi @enterprisecoderr, I tried using the fetchConfig and activate but I still wasn't able to replicate the behavior. Here is the sample snippet of my code:

fetchConfig(remoteConfig)
.then(()=>{
  activate(remoteConfig)
.then(()=>{
    const value = getValue(remoteConfig, "someKey")
    .asString()
    console.log(`Value: ${value}`);
  
  })
.catch((error)=>{
    console.log(error)
  });
})
.catch((error)=>{
  console.log(error)
});

I used .then() and called activate() to avoid any race condition as both activate and fetchConfig returns a promise. Could you try following the implementation and see if the behavior persists.

from firebase-js-sdk.

google-oss-bot avatar google-oss-bot commented on June 23, 2024

Hey @enterprisecoderr. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

from firebase-js-sdk.

google-oss-bot avatar google-oss-bot commented on June 23, 2024

Since there haven't been any recent updates here, I am going to close this issue.

@enterprisecoderr if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

from firebase-js-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.