firebase-js-sdk icon indicating copy to clipboard operation
firebase-js-sdk copied to clipboard

Documentation is using a small minimumFetchIntervalMillis without explicitly specifying that

Open sanehab opened this issue 5 years ago • 9 comments

In the following screenshot documentation is using a small value for minimumFetchIntervalMillis without specifying that. image

I have expected the value to be the default production value, or to at least have a comment that this value is a development specific value. Reading the following text will make you even more sure that the value that was used was a production value

During development, it's recommended to set a relatively low minimum fetch interval. See Throttling for more information.

Anyway this is not related, but i also think that the throttle error can be more descriptive

firebase-remote-config.js:1 Uncaught (in promise) FirebaseError: Remote Config: The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: 1585237413512. (remoteconfig/fetch-throttle).

In order to know what happened here i had to go back to documentation/source code.

sanehab avatar Mar 31 '20 09:03 sanehab

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Mar 31 '20 09:03 google-oss-bot

The same problem on Firefox Browser 82.0.3

yoldar avatar Dec 01 '20 05:12 yoldar

We are also having this issue on Firefox. What should one supposed to do when this message comes? Increase the fetchTimeoutMillis? In our case it is already 1 minute.

fischermatte avatar Jan 27 '21 11:01 fischermatte

@fischermatte @yoldar I don't believe this issue is related to firefox specifically. The issue here is the value used in documentation 3600000 (1 hour) is extremely low for production environment. What's even worse is what is written makes you think this is a recommended production value, i am referring to this sentence "During development, it's recommended to set a relatively low minimum fetch interval. See Throttling for more information."

The production value is documented in https://firebase.google.com/docs/remote-config/use-config-web#throttling which is 12 hours.

You should still catch this error, and try to fetch config in a longer interval. But once you use the default production value (12 hours) i doubt you will see it.

sanehab avatar Jan 27 '21 13:01 sanehab

Thx @sanehab. Ok I guess my problem might not be well placed here. I am just looking for an explanation why this error pops up at load time on firefox but not on other engines. Those parameters shouldn't have an impact at initial load time with a fresh-cache-cleaned browser.

fischermatte avatar Jan 27 '21 15:01 fischermatte

Still having this problem on Firefox. Does someone has any fix for this bug?

Odonno avatar Jan 27 '22 09:01 Odonno

I also have an issue with Firefox only. Automatically it doesn't load anything (for some reason), and when I call fetch it throws an error. It works fine with Chrome and Safari.

PS: Firefox version 120.0.1

Nillcon248 avatar Dec 07 '23 10:12 Nillcon248

This solution helped for me, I added a fetchTimeoutMillis and now it works properly with Firefox. Doesn't matter what's value, but if remove this parameter I have errors in Firefox again.

import { SETTINGS } from '@angular/fire/compat/remote-config';

@NgModule({
    providers: [
        {
            provide: SETTINGS,
            useValue: {
                fetchTimeoutMillis: 600000,
                minimumFetchIntervalMillis: 600000,
            }
        }
    ] 
})
export class AppModule {}

Nillcon248 avatar Dec 07 '23 14:12 Nillcon248

Can we implement ‘real-time’ on the web?

Or, the remote configuration server should use a caching mechanism like ETag.

Naturally, the web page should fetch the configuration with each page request.

dfdgsdfg avatar Aug 13 '24 01:08 dfdgsdfg

Hi @sanehab,

We have updated the documentation to clarify the recommended prod value for minimumFetchIntervalMillis. We appreciate you bringing this to our attention and apologize for the delay in response.

athiramanu avatar Jan 25 '25 14:01 athiramanu