push notifications not working on android

Have some questions or having issues with Amcrest View Pro, Post them here for the mods and other users to assist you.
fil50
Posts: 14
Joined: Thu Jan 24, 2019 1:16 pm

Re: push notifications not working on android

Post by fil50 »

STILL DOWN HERE TOO!!!
Roy
Posts: 13
Joined: Sat Mar 24, 2018 8:52 pm

Re: push notifications not working on android

Post by Roy »

Same here. Amcrest servers are terrible.
fil50
Posts: 14
Joined: Thu Jan 24, 2019 1:16 pm

Re: push notifications not working on android

Post by fil50 »

Any updates?
Systemuser
Posts: 25
Joined: Sun Jan 27, 2019 4:12 pm

Re: push notifications not working on android

Post by Systemuser »

Push notifications still not working on our phones also, Both LG phones Android Version 8 and ver 5.
Quite a few people mentioning same problem on Google Play store for this APP when comments are sorted to show newest comments first. Haven't seen any working solution here or there yet. I tried installing some other brand apps which didn't work for notifications, Dahua gDMSS almost works except it has the same problem the gDMSS app not showing notifications according to that app reviews. I updated FW on cameras, NVR again even though was current, router FW. Reset my phone back to it's default install, deleted and reinstall app, try battery settings, wifi settings, notify settings, app permissions, still nothing. Have not been able to tell for sure if NVR has stopped sending them or Phone app stopped receiving them, or push notification getting lost in the cloud by Amazon or Google GCM-Firebase notification service before delivery? Result of Google updating their cloud software, changes or exceeding a push quota limit, for notifications or Token expiring or not getting passed. I never had this problem with the previous Amcrest View Pro 3.43.0103 app from Mar 28, 2018. Would try it again except could not find the older version any where to download and try. I wonder if that prior version of the app would be having the same problem. Will update here if it starts working again, or find any thing out.
jack7
Posts: 904
Joined: Tue May 29, 2018 7:46 pm

Re: push notifications not working on android

Post by jack7 »

Push Notifications work for me and always have since this thread started. I have a LG phone android 7.0, View Pro version 4.1 dated 2018-10-3, and use Push video. I just started using push notifications when this thread started. I really like it.
I suspect the problem is the push server(s). Why does it work for me?
Perhaps its because I did my first push to the server after the problem started.
Or perhaps I'm taking a different path through the server for geographical reasons or something.

UPDATE: Another reason why my Push Notifications work may be because I don't use a NVR.
Last edited by jack7 on Wed Feb 20, 2019 11:09 pm, edited 1 time in total.
bava
Posts: 1
Joined: Mon Feb 18, 2019 7:43 am

Re: push notifications not working on android

Post by bava »

I also have no push notifications working. They haven't been for around a week. Has anyone managed to get them up and running again?
JHELMS
Posts: 4
Joined: Wed Jan 18, 2017 8:58 am

Re: push notifications not working on android

Post by JHELMS »

Push notifications on all my android devices stopped in late January. My last update to view pro was October 7th 2018. I have re-installed the app on all devices and even tried on a new device. No push notifications. I also changed NVR's to a new 16channel 4k model. Same issue.

Samsung models S8, S8+, S9 and S2 tablet.
fil50
Posts: 14
Joined: Thu Jan 24, 2019 1:16 pm

Re: push notifications not working on android

Post by fil50 »

Still nothing on my end, except for Sunday for about 10 minutes.....
Systemuser
Posts: 25
Joined: Sun Jan 27, 2019 4:12 pm

Re: push notifications not working on android

Post by Systemuser »

I have not found a solution only a few things that could be related, If not for something in the apps code that might have depreciated. Google placed new restrictions in Jan 2019 on some apps in their app store. Amcrest tech or the app developer who uploaded or has access to their Google Play Console account for that app is the only one who can log into it and check to see if Google placed restrictions on it causing these notification problems.

Paragraph below is from Google Firebase page,
Supposed to affect newer android versions 7 or higher, seems to affect all versions, and could explain why notifications only works for some users.

"Background Restricted Apps (Android P or newer)
Starting Jan 2019, FCM will not deliver messages to apps which were put into background restriction by the user (such as via: Setting -> Apps and Notification -> [appname] -> Battery). Once your app is removed from background restriction, new messages to the app will be delivered as before. In order to prevent lost messages and other background restriction impacts, make sure to avoid bad behaviors listed by the Android vitals effort.
https://developer.android.com/topic/performance/vitals/ These behaviors could lead to the Android device recommending to the user that your app be background restricted. Your app can check if it is background restricted using: isBackgroundRestricted(). "
https://firebase.google.com/docs/cloud- ... id/receive

On that same page linked above it also says
"Override onDeletedMessages"
In some situations, FCM may not deliver a message. This occurs when there are too many messages (>100) pending for your app on a particular device at the time it connects, another thing that could explain why notifications only works for some users. I may have gone over that limit?

The app developer or someone at Amcrest should log into the apps Google play console and check. Only they can clear it up if that's the case.
https://support.google.com/googleplay/a ... er/7385505

I see one item they flag, Excessive Mobile Network Usage in Background of over 50 MB in an hour which could put their app in restricted status. Not sure if this app when playing live view or playback of video is considered to be pulling it from the background or foreground. Easy to reduce data usage for playback and live view, to set NVR to record Extra Stream1 as well as main stream. Then app if set for Extra stream will retrieve Extra stream1 using far less bandwidth and better connection on slower network. https://developer.android.com/topic/per ... usage.html

Phone we have with android ver 8 was not set to use battery in background however turning battery back on there for background use there did not solve the problem. Later Thursday afternoon it did get some push alerts except it could not play video link from alert since I had P2P turned off on NVR. At the time I enabled P2P on a single camera and my phone to see if push alerts would work from an individual camera but they would not, they came from NVR. Then I re-enabled P2P on NVR and the phone did not receive any more alerts after that. I could not replicate getting alerts going again, just a coincidence?

Older phone with Android ver 5.0.2 under battery settings shows a little bar graph of battery usage but does not tell if it is foreground or background usage. No setting that can be changed for battery usage other than stop or force stop but those two choices are greyd out for some reason. And I think I saw it a couple days earlier in battery settings it said battery usage 0 even though I had been using it on battery. But no way to re-enable it there if that is the problem. Older Android version also does not have any setting for app preferences. Some apps in app store claim solve that with an app wrapper to allow turning off preferences that you don't want on. However app wrapper apps not able to turn on preference you do want on. Have already tried removing and reinstalling app and setting phone back to defaults.

Also as far as the app working for some people, another thing I noticed that could effect that on the Firebase website is onNewToken has to be called to create a new token if,
The registration token may change when:
The app deletes Instance ID
The app is restored on a new device
The user uninstalls/reinstall the app
The user clears app data.
https://firebase.google.com/docs/cloud- ... st-message

Firebase Cloud Messaging makes changes all the time like mentioned in their release notes.
https://firebase.google.com/support/rel ... es/android
Last edited by Systemuser on Sun Feb 24, 2019 4:09 pm, edited 6 times in total.
Systemuser
Posts: 25
Joined: Sun Jan 27, 2019 4:12 pm

Re: push notifications not working on android

Post by Systemuser »

Still not found a solution just things that could be related. Saved the network packet capture from the NVR while making motion on camera that would normally send push notifications. Had to install Wireshark and it's 2 other included programs in order to read network traffic and some packet info off of NVR. I later uninstalled everything when our network slowed to a crawl around 1.5MB per second. Might not have been caused by those programs but also all the router logging, various port forwarding, changes to router, Installing required browser plugins, had 3 installed.

When my NVR makes the outgoing connection to firebase -> fcm.googleapis.com which usually shows as 172.217.X.X range. Messages going out from my NVR usually transmit OK except a for a couple reset requests to start sending them again.

When firebase -> fcm.googleapis.com tries to make an incoming connection to my NVR, it appears that firebase wants to connect to my NVR using TLS v1.2 and my NVR is not able to match that for the incoming connection.
Every few IP packets received from Firebase server say Alert (Level: Fatal, Description: Inappropriate Fallback) which repeats every few packets I read a server certificate is needed to allow TLS v1.2 connections to be made. So I tried the create your own certificate option that is included with the NVR and also tried it on a camera. On NV4108-HS a browser plugin is required to access the area to create your own certificate and install it, except NVR does not have a spot to put your email address or use a third party certificate like cameras do. Tried creating all 3 certificate types, one with my custom Amcrest DDNS name. then again my private IP 192.168.X.X, then again created a certificate to my public facing IP. Did not make any difference still saw these errors when Firebase tries to make incoming connections to my NVR. Not sure if TLS v1.2 can be accomplished on the hardware chips in future or in the software like in a NVR OS update? Tested it with UPnP enabled and P2P used on NVR, and also enabled port forwarding 443 to NVR but did not make any difference. IE and Chrome don't like the self created certificates either and both say invalid because it's self signed. I guess signed certificates are real expensive to buy and not sure if that would solve that problem anyhow.

The NVR makes like a thousand network connections and packet transfers in a few minutes of packet capture. Firebase messaging incoming to my NVR was the only connection with this type of error. Alert (Level: Fatal, Description: Inappropriate Fallback). which repeats every few packets or so. So I looked up TLS v1.2 and see that more of the big software companies like Google, Microsoft, Banks, card processors, are making connection with TLSv 1.2 mandatory. I am not sure how much of a problem it could be causing with incoming Firebase connections or just giving a warning that TLS v1.2 can not be made and the fallback method needs to be fixed. Is it possible Google Firebase might have just recently made TLS v1.2 mandatory when they connect out to individual servers? Also wonder if the data is transferred successfully when Firebase tries to connect even though it gives that message? The data in the exchanges between them do look encrypted. Also see in picture below that Firebases is using their 443 port to try to connect to my 55712-55719 port even though those were not forwarded. Rather than trying to connect to my 443 port. The connections in the picture below are all sorted by the firebase server incoming IP address to my NVR and is why they are all shown together in picture.

Then searched Firebase for TLS and see some results regarding TLS but could not tell if required when Firebase connects out to individual application server or not.
https://firebase.google.com/s/results/?q=TLS&p=%2F
Have screen capture pictures.
Attachments
TLSv1-2err.jpg
TLSv1-2err.jpg (148.98 KiB) Viewed 1426 times
Last edited by Systemuser on Sun Feb 24, 2019 4:22 pm, edited 5 times in total.
Post Reply