angular / angular/angularfire

Unable to configure settings in provideRemoteConfig

未關閉
#3,020 8 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
comp: remote-config needs: recheck type: bug version: legacy (v7-v16)
主要語言
TypeScript
星號
7.8k
分支
2.2k
平均合併
22 小時 28 分鐘
30 天內合併 PR
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 摘要。