-
Notifications
You must be signed in to change notification settings - Fork 25
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
It looks like the registration at Google/Firebase for push is not always working... Not sure why. #78
Comments
Thanks for testing, but yeah the FCM registration error occurs randomly but not clear why... Your theory sounds plausible, does it work now in July? |
It does. I also tested by swapping out all the credentials for a new firebase / GCM project. That worked as expected with no other code changes. At this point, I think my theory is pretty solid. If the google firebase project gets more than 10K new auths or re-auths, it starts denying a new one. They are not included in the free plan. Maybe the best approach is to allow creds for a new firebase project in the config file? I'll post my test FCM test project config so you can test if you want to.
|
But then you would have the credentials for the "wrong" project, and you would not get the push notifications from Eufy right? The whole script depends on these push notifications, so that won't really be a solution then... |
Yeah. You're right. I was down in the weeds figuring out why the auth was failing. I was not getting push notifications, but I think that is the root issue for the GCM error. |
btw, eufy-node-client is deprecated and the project's readme recommends using eufy-security-client instead. From brief skimming it looks like they handle FCM/GCM registration differently - is there anything that can be 'borrowed' from that code to make it work? |
Main driver behind this change are issues with Firebase registration - see matijse#78 for details. Aside from different name, the main change is how the registration is handled. Eufy-security-client's new `PushNotificationService` class handles the registration itself if needed and emits the 'credential' event when it happens. On our side, we just listen to this event and persist credentials to disk. In future, we may want to stop listening to raw events and use normalized messages provided by `PushNotificationService` instead. This would potentially allow supporting more devices.
Main driver behind this change are issues with Firebase registration - see matijse#78 for details. Aside from different name, the main change is how the registration is handled. Eufy-security-client's new `PushNotificationService` class handles the registration itself if needed and emits the 'credential' event when it happens. On our side, we just listen to this event and persist credentials to disk. In future, we may want to stop listening to raw events and use normalized messages provided by `PushNotificationService` instead. This would potentially allow supporting more devices.
I would like to help test this. It looks like the original app is on the spark plan and it only allows 10K registrations per month.
Once users have cached credentials, they can re-use them. Let's see if this fixes itself at the start of the new month - July in our case.
I completed a new install, and can't get past this error. I think you may be able to replace the firebase / GCM auth keys in the code to get a round this.
I am testing.
The text was updated successfully, but these errors were encountered: