Running FCM on IP stops Angular rendering
- Dominant language
- TypeScript
- Stars
- 7.8k
- Forks
- 2.2k
- Avg merge
- 22h 28m
- Merged PRs (30d)
- 6
Description
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()),
Contributor guide
Research direction
Start at the provideMessaging(() => getMessaging()) entry point and reproduce the issue while serving the app on a non-127.0.0.1 IP. Trace the initialization failure that leads to the unsupported-browser error; done means the app continues rendering without Firebase Messaging halting it in that environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, firebase, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100