angular / angular/angularfire

Unable to configure settings in provideRemoteConfig

オープン
#3,020 コメント 8 件 リアクション 1 件 担当者 0 名 GitHub で見る
comp: remote-config needs: recheck type: bug version: legacy (v7-v16)
主要言語
TypeScript
スター
7.8k
フォーク
2.2k
平均マージ
22時間 28分
マージ済み PR(30日)
6

説明

### 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...

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

AppModule のスニペットで問題を再現し、他の provider 関数と併せて provideRemoteConfig のエントリポイントを追跡します。callback がログを出力せず、minimumFetchIntervalMillis も適用しない理由を確認し、その後、callback が実行されて開発用の fetch 間隔が適用されることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, firebase, typescript
領域
cloud
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。