-
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
Fix #34 FCM registering problems and add TypeScript definitions #55
base: master
Are you sure you want to change the base?
Conversation
Some developers just need a valid gcm token to work with some APIs.
Thank you for this PR @Patrick-Remy - it's not quite fixed for me but your fork gets me much closer, as at least I can register tokens successfully - However, when trying to send a push, I'm receiving Thx for any clues! |
Which API are you using for sending pushes to FCM devices? Does it work for real Android devices? Did you properly set the |
Unfortunately don't have a real Android handy to test on, but has been working just fine for both iOS and web pushes.. I'm trying to send from a firebase function via the firebase messaging lib - something along the lines of https://firebase.google.com/docs/cloud-messaging/send-message |
In my tests I used the HTTP API, you could easily test it via curl: https://firebase.google.com/docs/cloud-messaging/http-server-ref |
I get the same kind of response from that endpoint, something like: (and verified that we get other kinds of appropriate errors for bad tokens if we send them, so, the token is legit but something else weird is happening) |
This PR fixes #34 and makes this project work now again (at least for me). Probably the README should be updated with the new options.
endpoint
and refactor duplicate escapesbundleId
on register, to use a custom bundleId instead of the hardcodedreceiver.push.com
skipFcmRegistration
on register (from typescript type declarations, option to register without registerFCM() #35 @selfisekai, I just renamed the option to be more convenient)