Page 1 of 1

Solved: FCM push message Error:301 Moved Permanently

Posted: Mon Sep 09, 2024 2:40 pm
by BigKuma
Before I start digging in, I wanted to check if this is some issue that everyone is having.
I had notifications working for years, and I already forgot how I have set it up.
Then, they stopped working recently, and I get this "Moved Permanently" error in the logs.

I noticed on the FCM site there is this:
Caution: Sending messages (including upstream messages) with the FCM XMPP and HTTP legacy APIs was deprecated on June 20, 2023, and will be removed starting June 2024. If you are using the legacy FCM send APIs, we strongly recommend that you migrate to the HTTP v1 API or consider using the Admin SDK to build send requests.

Thanks!

Re: FCM push message Error:301 Moved Permanently

Posted: Tue Sep 10, 2024 10:05 pm
by BigKuma
I guess I was the only one still using the "legacy FCM", and now that it shut off, I need to figure out something else.
https://forums.zoneminder.com/viewtopi ... 2#p127052

Is pushover comparable to FCM ? Is it going to send notifications even if the phone is in sleep state ?
I have read that MQTT would not. (I hope I am using the right terms).

Re: FCM push message Error:301 Moved Permanently

Posted: Wed Sep 11, 2024 5:40 am
by BigKuma
In zmeventnotification.ini I had to change to:

use_fcmv1 = yes

It was "no" before for some reason.
Now I get notifications again.

Re: Solved: FCM push message Error:301 Moved Permanently

Posted: Mon Sep 16, 2024 4:54 am
by MechanicMike
Hey BigKuma, it sounds like you might be facing the issue due to the deprecation of the FCM legacy APIs. The "Moved Permanently" error could be a result of this change. Considering that the legacy APIs were deprecated in June 2023 and are being removed starting June 2024, migrating to the HTTP v1 API or using the Admin SDK as suggested on the FCM site could be a good solution to get your notifications back up and running smoothly. It's always a good idea to stay updated with the latest changes from Google to avoid such disruptions. Good luck with the migration process!