Skip to content

Fix #34 FCM registering problems and add TypeScript definitions#55

Open
Patrick-Remy wants to merge 6 commits into
MatthieuLemoine:masterfrom
Patrick-Remy:master
Open

Fix #34 FCM registering problems and add TypeScript definitions#55
Patrick-Remy wants to merge 6 commits into
MatthieuLemoine:masterfrom
Patrick-Remy:master

Conversation

@Patrick-Remy

@Patrick-Remy Patrick-Remy commented Jul 23, 2021

Copy link
Copy Markdown

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.

@jexe

jexe commented Aug 22, 2021

Copy link
Copy Markdown

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 messaging/internal-error when pushing to the token I've registered via push-receiver. Sending pushes to other tokens via the same mechanism (web, iOS) works just fine. Any idea what could be causing this?

Thx for any clues!

@Patrick-Remy

Patrick-Remy commented Aug 22, 2021

Copy link
Copy Markdown
Author

Which API are you using for sending pushes to FCM devices? Does it work for real Android devices? Did you properly set the senderId according to your Firebase project?

@jexe

jexe commented Aug 22, 2021

Copy link
Copy Markdown

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 admin.messaging().send({ ... payload ... })

https://firebase.google.com/docs/cloud-messaging/send-message

@Patrick-Remy

Copy link
Copy Markdown
Author

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

@jexe

jexe commented Aug 22, 2021

Copy link
Copy Markdown

I get the same kind of response from that endpoint, something like:
{"multicast_id":6378540861801009517,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InternalServerError"}]}

(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)

@MatthieuLemoine MatthieuLemoine force-pushed the master branch 2 times, most recently from c507d64 to feb64e8 Compare February 7, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FCM registering problems

3 participants