MatthieuLemoine / push-receiver

A library to subscribe to GCM/FCM and receive notifications within a node process.
https://medium.com/@MatthieuLemoine/my-journey-to-bring-web-push-support-to-node-and-electron-ce70eea1c0b0
MIT License
198 stars 75 forks source link

PHONE_REGISTRATION_ERROR #17

Closed alexryd closed 6 years ago

alexryd commented 6 years ago

Hi and thanks for a great project! I've been trying to use push-receiver in my own project but when I run this:

const { register } = require('push-receiver')
register(mySenderId)

I get Register request has failed with Error=PHONE_REGISTRATION_ERROR fives times followed by Error: GCM register has failed. I've tried this on both macOS (node v7.10) and a Raspberry Pi (node v8.5) but I always get the same error. What am I doing wrong?

alexryd commented 6 years ago

I'm not sure why but it's working now, so never mind.