Hi,
The issue I believe is coming up because of the fact that the FCM server is not running anywhere when it is trying to be used. I believe the solution is to check to see if the FCM is being initialized in the right way on app startup, following Push Notifications Docs or more specifically Push Notifications for PWAs. This should initialize the Firebase FCM and allow for calling API after run-time config!
Hello!
Are you encountering this error when running locally? If so, you are likely getting this error due to your transfer protocol. FCM Web push notifications can only be successfully registered from an https domain but local host runs with an http protocol.
It is possible to get around this with the approach from this forum post. However, I find that the simplest solution is just to deploy your changes to a testing environment if you have one available.
Hope this helps!