Running FCM on IP stops Angular rendering
- 主要語言
- TypeScript
- 星號
- 7.8k
- 分支
- 2.2k
- 平均合併
- 22 小時 28 分鐘
- 30 天內合併 PR
- 6
描述
I need to sometimes run my app on IP for mobile testing etc, and this used to work fine in Angular 16 since firebase would just ignore IPs but now, since Angular 20, I get:
TypeError: Cannot read properties of undefined (reading 'addEventListener')
eventually failing with
FirebaseError: Messaging: This browser doesn't support the API's required to use the Firebase SDK. (messaging/unsupported-browser).
But not before it halts the whole app and stops it rendering.
This should just not do anything when it detect a none 127.0.0.1 IP as it did before, seems like there has been a regression bug somewhere.
Specifically the issue provider is:
provideMessaging(() => getMessaging()),
貢獻指南
研究方向
從 provideMessaging(() => getMessaging()) 入口點開始,並在非 127.0.0.1 IP 上提供應用程式時重現此問題。追蹤導致 unsupported-browser error 的初始化失敗;完成條件是應用程式在該環境中繼續渲染,而不會被 Firebase Messaging 阻止。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- angular, firebase, typescript
- 領域
- frontend
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100