-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An API this library relies on will be turned off June 20, 2024 #68
Comments
Do you have any official ressource for that, where I can find more information and needed changes? |
I linked to the official resource... |
Hmm, that's troubling. Did firebase team advise to which API endpoint we should change to keep it running? @RandomEngy |
They did not. They referenced this guide to setting up FCM on a web app. I think the best bet right now is adapting from the firebase-js-sdk source code.
|
Any updates on this? |
I took a stab at this today and decided I'm going to give up and use Amazon SNS for my desktop apps instead of trying to get FCM working. It has actual support for running in NodeJS and Rust. Fixing this library would mean implementing the web push protocol from scratch. |
Hello! Given that this library seems to not be supported by the author anymore, it's using soon-to-be deprecated APIs and has various bugs accumulated over time, I decided to write my own version. It does everything that push-receiver already does and a little bit more. For the people who are going to migrate to my library, there is also a function exposed for retro-compatibility that subscribes to FCM using the sender ID. Documentation: Aracna FCM Docs |
Oh heck yes. I was looking more into SNS and it's not really a good replacement for proper push. I think I may actually be able to save push notifications in Rust/Tauri and update fcm-push-listener by following this library. |
@alchemicas Sounds interesting! Thank you for sharing your library. Does it support Electron? |
@alchemicas is there a possibility to not use FCM credentials like in this library? Or has the methodology changed in new API? |
Hi @saenzramiro , yes it does work with Electron, only on the main process of course.
Hi @developerfromjokela , I can't give a 100% accurate answer because we're always talking about APIs that are not documented anywhere by Google, everything that is inside these libraries is an effort of reverse engineering. Having said this, the way the latest Firebase js sdk does things is with a new registration endpoint that requires an auth token generated with Firebase API Key, App ID and Project ID. Maybe, and I say maybe, we could find an alternative way by reverse engineering the API calls made by native apps using FCM, but the way the web sdk does things is what's currently in my library. If you're worried about exposing your Firebase api key, I'm pretty sure it's safe to have out in the open 👍 |
@alchemicas can I use sender ID argument? I have a third party service I want to receive push notifs from, with push-receiver i just put it there and it worked. In arcana i coudln't quite figure out. |
You can @developerfromjokela , just use the subscribeToFCM function. But by June you'll have to figure out a way to leverage the new APIs and generate tokens through registerToFCM. If you already have a sender id you should also be able to get the firebase config somehow if you do have access to the firebase console. |
I just tried with both registerToFCM and subscribeToFCM and none of them receive notifications. But using push-receiver notifications get delivered. |
|
Uhm, I can't help you further without seeing how you're implementing it.
|
@alchemicas Does you use https://fcm.googleapis.com/fcm/connect/subscribe for your fcm registration? |
Hi @ychumpov , only if you use the deprecated |
If you could do a implementation like in https://github.com/BRUHItsABunny/go-android-firebase, so that I can just copy info from this mobile app and insert it there. Basixally you use different firebaseinstallations request body. |
I've just published this package: https://github.com/miafoo/fcm-web-push - it's based on this library + the rust implementation by @RandomEngy above. It's using the new APIs, is quite minimal and has very few dependencies. I've only tested it on a private electron project and it seems to work quite well there so far. |
@alchemicas I noticed that in "old" implementation the appId was generated each time with new value: Is it also the same in your lib? |
The app_id randomness is up to the integrator of @aracna/fcm |
Guys, I just completed to write FCM receive library exclusive for electron It was originally built based on this FCM library for electron, so it can be used almost as is, except that you need to add an API key. If you're interested, Please check it out. |
I too was dreading the Google API removal for FCM subscribing so I tried the @aracna/fcm library, but the receiver would error when reading the notification. I ended up porting the FCM registration from it into a fork of Happy coding! 😃 |
Has anyone able to get the notification from third party sender using the new fcm registration? As @developerfromjokela also checked, its not working.
|
With old API i just set sender ID and it just worked fine with my usecase. On newer one it doesn't. |
I'm seeing unauthorized errors or invalid authorization credentials. Does this library support the new FCM authorization changes? |
This library calls https://fcm.googleapis.com/fcm/connect/subscribe for the final FCM subscription step, which I confirmed with the Firebase team to be slated for removal on June 20, 2024. This is not in the explicit list of URLs affected but is considered part of the "Legacy Web SDK".
The text was updated successfully, but these errors were encountered: