ZoneMinder / zmNinja

High performance, cross platform ionic app for Home/Commerical Security Surveillance using ZoneMinder
http://zmninja.zoneminder.com
Other
1.01k stars 270 forks source link

No preview picture while on tmobile LTE? #1075

Closed aaronsta1 closed 2 years ago

aaronsta1 commented 3 years ago

is there any reason why preview pictures would have stopped working while on mobile data? they still work while on wifi..

everything else works.. i get the notification.. it says detected person and the time and everything. there is no pic tho unless my phone is on wifi. i can access the app and see all the cameras, download the videos and check the events.

i can also access the website from my phone and log in and everything with the chrome app.

has tmobile blocked something?

ghost commented 3 years ago

This is a known issue. Been reported many times but no response or solution yet.

Actually you just helped me diagnose the issues I hadn't coincided mobile data = no picture and wifi = picture but after you saying that, I am certain that is what's happening for me as well.

Are you on android?

aaronsta1 commented 3 years ago

yeah android 10. oneplus 6t. it has worked just fine until earlier this month.

ghost commented 3 years ago

Android as well. Sometimes what would work for me is long pressing the notification to open the options and turning zmninja off then back 9n again

ghost commented 3 years ago

It's been hit or miss for me always. I have everything configured correctly, so I'm assuming it's something with how Google's FCM is receiving or trying to pass the image but that's just speculation. I don't think I've seen an iOS user complain about this. One thing that you can do but it isn't as streamlined is use pushover to receive your pushes and image/gif of objdetect. Pushover is rock solid but it uses a badge instead of a thumbnail of the image we want to see.

Screenshot_20210624-155920_Chrome

ghost commented 3 years ago

Changed pic to hummingbird, commented out picture-portal-password etc. in zmeventnotification.ini. wifi = image, mobile data = no image. If you find anymore clues or suggestions/solution please reply so maybe one of us users can fix it and get the word out to other users.

Screenshot_20210624-202112_zmNinja Screenshot_20210624-201902_Chrome

lucasnz commented 3 years ago

Hmm - I sometimes don't get images in push notifications. In my case (looking at the logs on my reverse proxy and ZM ES) shortly after the push notification is sent, the image is requested. But it is sometimes not displayed (despite being requested). I haven't been able to see a pattern yet... Maybe unrelated to this, but I will monitor if I'm on/off Wi-Fi more closely next time the issue occurs.

pliablepixels commented 3 years ago

This is a known issue. Been reported many times but no response or solution yet.

Really? Please post links where they have been posted many times. If it were a known issue (config perfect, but no images), I'd see many posts about it, from different people. This is the first issue I've seen about it happening consistently. And I'll respond when I have time. May be a few weeks before I get to things. That is how it is, like it or not.

is there any reason why preview pictures would have stopped working while on mobile data? they still work while on wifi.. has tmobile blocked something?

That depends. No one here posted logs yet

But here are some thoughts:

So, what seems to be the case is when the message arrives on the device, the system is not able to resolve the URL. Why? I have no idea and I'll need you to pull adb logs from your device to track down system logs on why that may be happening.

In my case, I see that in the following case (iOS):

In your case, if it happens all the time on mobile connections, pull adb logs and lets see what is going on. There are multiple reasons why loading the image in the device may mail:

ghost commented 3 years ago

Call me.crazy but when you charge for a piece of software your users are probably going to expect support. Get off your high horse wanker.

sentiment-bot[bot] commented 3 years ago

Please be sure to review the code of conduct and be respectful of other users. cc/ @pliablepixels Keep in mind, this repository uses the Contributor Covenant.

ghost commented 3 years ago

Pretty sad the 9nly way to get a response or support is when you have to throw shade. Good job bud.

pliablepixels commented 3 years ago

Call me.crazy but when you charge for a piece of software your users are probably going to expect support. Get off your high horse wanker.

Pretty sad the 9nly way to get a response or support is when you have to throw shade. Good job bud.

Really? Look back at your own github posts and my responses as well as your posts in slack and ZM forums and my responses and decide for yourself if its your childishness and name calling that is the problem or if its my lack of responses.

sentiment-bot[bot] commented 3 years ago

Please be sure to review the code of conduct and be respectful of other users. cc/ @pliablepixels Keep in mind, this repository uses the Contributor Covenant.

aaronsta1 commented 3 years ago

Call me.crazy but when you charge for a piece of software your users are probably going to expect support. Get off your high horse wanker.

dont be rude, im getting the logs now to email. im pretty sure its not this software but tmobile is blocking it for some reason.

aaronsta1 commented 3 years ago

ok i just sent the adb log. i made sure to run it long enough to get a few alerts and to get some with pics and some without.

pliablepixels commented 3 years ago

What's the eid of one that did not download?

aaronsta1 commented 3 years ago

if i remember correctly when i closed the log there was 2 back to back from the main driveway camera. the 1st one showed a preview but the 2nd one didnt. looking at the events it should have been 2912733 that showed a preview and 2912735 that didnt.

if you need i can leave it hooked to adb longer to get a more detailed log.

pliablepixels commented 3 years ago

Okay, so here is what I'm seeing:

message 1:

06-25 13:23:00.983  8165 24183 I FirebaseMessaging: Starting download of: https://yourIP:8999/zm/index.php?view=image&eid=ç&fid=objdetect&width=600&username=zmninja&password=xxxx
06-25 13:23:00.986   568   568 E SELinux : avc:  denied  { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1340 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
06-25 13:23:00.988   568   568 E SELinux : avc:  denied  { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1340 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
06-25 13:23:03.169  8165 24142 W FirebaseMessaging: Failed to download image: java.net.ConnectException: Failed to connect to yourIP:8999
06-25 13:23:03.278  1340  1340 V NotificationService: Interrupting!

This tells us the device was not able to reach your server

I see that for 2912668, 2912671, and 2 others. In all cases it can't reach you server.

But there are ones it can.

So it's a connectivity issue to your server, sporadically. Doesn't answer why, but thats what I am seeing so far.

aaronsta1 commented 3 years ago

hmm.. maybe tmobile switched something with their always on internet connection and its just timing out in the short time it takes to add the preview pic?

i didnt have any issues before, it just started doing it a couple weeks ago.

if i go to that url in a browser the pic is there. i do have the battery saver thing turned off on zmninja.

ghost commented 3 years ago

Android battery optimization off?

lucasnz commented 3 years ago

Hmm - I sometimes don't get images in push notifications. In my case (looking at the logs on my reverse proxy and ZM ES) shortly after the push notification is sent, the image is requested. But it is sometimes not displayed (despite being requested). I haven't been able to see a pattern yet... Maybe unrelated to this, but I will monitor if I'm on/off Wi-Fi more closely next time the issue occurs.

My intermittent issue must be slightly different - It occurs both on Wi-Fi and mobile data. Mostly images are displayed, but occasionally they are not. I suspect my problem relates to the performance (or lack of) of the VM.

aaronsta1 commented 3 years ago

I still can't figure this out. On Mobile Data it always times out. Even tho it works just fine on wifi.

Is there a way in the app to increase the time out?

pliablepixels commented 3 years ago

In dev settings, there is a "use large http timeouts" however I'm not sure that is the issue.

aaronsta1 commented 3 years ago

ill give it a try, i am at a loss here. it works 100% of the time when im on wifi.. even wifi that is miles away from my house. it doesnt time out on wifi, even if the phone is sleeping on the charger. i still get the message with a pic.

on LTE i get no pic. even if i have the phone unlocked. the only thing i see in the logs is the timeout. like LTE is blocking the port or DNS or something. but on LTE i can go to url:port/zm and it works.

pliablepixels commented 3 years ago

No idea either. Just FYI, the code that displays the image isn't part of zmNinja (zmNinja isn't even running at that time). Android handles the notification by itself.

Last thing, try setting the ttl value to 0 or some other numbers (ES restart) https://github.com/pliablepixels/zmeventnotification/blob/d041b4fe61574627fd99f784c5a864738d818d14/zmeventnotification.ini#L110

FYI, when the ES sends a message, my cloud function sends it to GCM - source is here https://gist.github.com/pliablepixels/0fc298303a740b8f1a6f7cb53d7221b4

Also read up on https://firebase.google.com/docs/reference/admin/python/firebase_admin.messaging to see if there are any message tweaks that can be done

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.