angular / angular/angularfire

Unable to configure settings in provideRemoteConfig

Open
#3,020 8 comments 1 reaction 0 assignees View on GitHub
comp: remote-config needs: recheck type: bug version: legacy (v7-v16)
Dominant language
TypeScript
Stars
7.8k
Forks
2.2k
Avg merge
22h 28m
Merged PRs (30d)
6

Description

### Version info

**Angular:**
^12.2.9

**Firebase:**
^9.1.2

**AngularFire:**
^7.1.0

**Other (e.g. Ionic/Cordova, Node, browser, operating system):**

"rxfire": "^6.0.2",
"rxjs": "^6.6.7",

Node LTS (14)
npm@6

### How to reproduce these conditions

**Failing test unit, Stackblitz demonstrating the problem**

**Steps to set up and reproduce**

Copy the following code in the `imports` modules of `AppModule`:

```ts
provideFirebaseApp(() => initializeApp(environment.firebase)),
provideAuth(() => getAuth()),
provideMessaging(() => getMessaging()),
provideAnalytics(() => getAnalytics()),
provideRemoteConfig(() => {
console.log('provideRemoteConfig')
const remoteConfig = getRemoteConfig();

if (isDevMode()) {
console.log('isDevMode')
remoteConfig.settings.minimumFetchIntervalMillis = 10 * 1000;
}

return remoteConfig;
}),
```

### Expected behavior

It should run the code (console.log, etc...) and set the fetch time in dev env.

### Actual behavior

Currently, it does nothing (no console output) and it's really hard to work with Remote Config since it's 12 hours throttle update with default settings...

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the AppModule snippet and trace the provideRemoteConfig entry point alongside the other provider functions. Verify why the callback does not log or apply minimumFetchIntervalMillis, then confirm that the callback runs and the development fetch interval is applied.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, firebase, typescript
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.