angular / angular/angularfire

Running FCM on IP stops Angular rendering

未关闭
#3,672 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
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

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。