Solved: FCM push message Error:301 Moved Permanently

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
Post Reply
BigKuma
Posts: 15
Joined: Fri Jan 21, 2022 8:48 pm

Solved: FCM push message Error:301 Moved Permanently

Post 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!
Last edited by BigKuma on Wed Sep 11, 2024 5:41 am, edited 1 time in total.
BigKuma
Posts: 15
Joined: Fri Jan 21, 2022 8:48 pm

Re: FCM push message Error:301 Moved Permanently

Post 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).
BigKuma
Posts: 15
Joined: Fri Jan 21, 2022 8:48 pm

Re: FCM push message Error:301 Moved Permanently

Post 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.
MechanicMike
Posts: 9
Joined: Sat Sep 14, 2024 3:01 pm

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

Post 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!
Post Reply