ZoneMinder / zmNinja

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

Live view not working in zmNinja Pro but is working in web browser and another APP #594

Closed RXM307 closed 6 years ago

RXM307 commented 6 years ago

Platform & OS Version iOS 11.2.6 ZM 1.30.4

What is the nature of your issue Bug

Details Live view not working in zmNinja Pro but is working in web browsers and via Surveillance Pro App

Thanks!

pliablepixels commented 6 years ago

Do any of https://github.com/pliablepixels/zmNinja/wiki/FAQ#live-streaming--issues apply? Please use the wizard and see if it helps

RXM307 commented 6 years ago

Yes, I have worked through all of this and tried reconfiguring with the wizard from me server logs I get the below when quiting the live stream

ERR [Socket /tmp/zm/zms-584860s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information.]

but only from zmNinja Pro, web works fine.

pliablepixels commented 6 years ago

Okay, these are the likely possibilities:

  1. Your CGI-BIN is incorrect. You haven't pasted zmNinja logs so I don't know what is going on. Did the wizard succeed or did it throw an error? Can you paste a screenshot of your settings screen? You can sent it privately if you want (pliablepixels at gmail)

  2. When you are trying to view an image (and its not showing up) look at Apache's error log (not regular log). Do you see image/jpeg issues? If so, that is an indication you don't have a jpeg scaling library installed

IF its neither, please send me full zmNinja logs when you are trying to view the image. In general, always please post logs of both zmNinja and ZM - otherwise its hard to know.

RXM307 commented 6 years ago

Have emailed the zmNinja logs and settings screenshot

There are no errors in the apache errors log on either the reverse proxy or the actual server other then these ones

[:error] [pid 29703] [client xxxx:48814] PHP Notice: Constant ZM_VERSION already defined in /usr/share/zoneminder/www/includes/config.php on line 48 [:error] [pid 29703] [client xxxx:48814] ERR [Socket /tmp/zm/zms-877320s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/latest/faq.html#why-can-t-i-see-streamed-images-when-i-can-see-stills-in-the-zone-window-etc for more information.]

what is the jpeg scaling library being used?

pliablepixels commented 6 years ago

I am a little confused. The email you sent with the screenshotshows you are using basic authentication. https://github.com/pliablepixels/zmNinja/wiki/FAQ#zmninja-is-suddenly-showing-red-xs-or-green-dots-for-images---apis-are-working-zm-is-working-and-i-did-not-upgrade-zm-either describes the issue with chrome and basic authentication.

Can you remove basic auth and try? If it doesn't work, is it possible for me to access your ZM instance to test?

RXM307 commented 6 years ago

sorry for the late reply been trying to try different configs as it appears it does only work on basic auth, but still no live view, if I disable basic auth it works while the user is remembered but tends to drop off later that day or the next day..

https://github.com/pliablepixels/zmNinja/wiki/FAQ#zmninja-is-suddenly-showing-red-xs-or-green-dots-for-images---apis-are-working-zm-is-working-and-i-did-not-upgrade-zm-either

the above looks relevant as events are working and I'm even getting push notifications as I had to use the apache config from https://github.com/ZoneMinder/ZoneMinder/issues/1042#issuecomment-167420447 to get liveview working.,

I'll create you a login tomorrow and will email you, but it looks like even though I've disabled basic auth for /zm/ the reverse proxy is still applying it, so i'll keep looking at the reverse proxy config.

Thanks for your help it's really appreciated and I love the product.

nabheet commented 6 years ago

I have the same issue with zmView App (non-pro). At least I think its the same issue.

the 1.19 ip is the app on my iphone and the 1.10 is chrome on my macbook. <IrrelevantFull Disclosure>Earlier the iphone requests were showing up with its IPv6 address so I bound apache to listen on 0.0.0.0:80 and now it shows the IPv4 address.</IrrelevantFullDisclosure>

Anyways, from what I can tell the request from the app gets an HTTP 400 returned from the server but the same URL request (different user-agent) gets a 200 from the server. I think its the same url.

Do you have any suggestions on what I could try next?

I can also open a separate issue if these aren't related.

Here is the apache access log from the server:


192.168.1.19 - admin [11/Mar/2018:10:24:00 -0600] "GET /zm//index.php?skin=classic&view=watch&mid=1 HTTP/1.1" 200 2862 "-" "zmview/26 CFNetwork/894 Darwin/17.4.0"
192.168.1.19 - admin [11/Mar/2018:10:24:00 -0600] "GET /zm//index.php?skin=classic&view=watch&mid=1 HTTP/1.1" 200 2863 "-" "zmview/26 CFNetwork/894 Darwin/17.4.0"
192.168.1.19 - - [11/Mar/2018:10:24:04 -0600] "GET /zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=15&buffer=1000&auth=&user=admin&pass=admin HTTP/1.1" 400 0 "-" "zmview/26 CFNetwork/894 Darwin/17.4.0"
192.168.1.19 - - [11/Mar/2018:10:24:04 -0600] "GET /zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=15&buffer=1000&auth=&user=admin&pass=admin HTTP/1.1" 400 0 "-" "zmview/26 CFNetwork/894 Darwin/17.4.0"
192.168.1.10 - - [11/Mar/2018:10:24:58 -0600] "GET /zm/index.php?view=options&tab=skins HTTP/1.1" 200 1919 "http://stick01.local/zm/index.php?view=options&tab=logging" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
192.168.1.10 - - [11/Mar/2018:10:25:14 -0600] "GET /zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=15&buffer=1000&auth=&user=admin&pass=admin HTTP/1.1" 200 296550 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"```
nabheet commented 6 years ago

so weird, it even works via curl but not in the app:

==> /var/log/apache2/error.log <==
[Sun Mar 11 11:01:58.055534 2018] [:error] [pid 1813] [client 192.168.1.19:58316] INF [Login successful for user "admin"]

==> /var/log/apache2/access.log <==
192.168.1.19 - admin [11/Mar/2018:11:01:57 -0600] "POST /zm//index.php HTTP/1.1" 200 2954 "-" "zmview/26 CFNetwork/894 Darwin/17.4.0"
192.168.1.19 - admin [11/Mar/2018:11:01:59 -0600] "GET /zm//index.php?skin=classic&view=watch&mid=1 HTTP/1.1" 200 2862 "-" "zmview/26 CFNetwork/894 Darwin/17.4.0"
192.168.1.19 - admin [11/Mar/2018:11:02:00 -0600] "GET /zm//index.php?skin=classic&view=watch&mid=1 HTTP/1.1" 200 2859 "-" "zmview/26 CFNetwork/894 Darwin/17.4.0"
192.168.1.19 - - [11/Mar/2018:11:02:11 -0600] "GET /zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=15&buffer=1000&auth=&user=admin&pass=admin HTTP/1.1" 400 0 "-" "zmview/26 CFNetwork/894 Darwin/17.4.0"
192.168.1.19 - - [11/Mar/2018:11:02:11 -0600] "GET /zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=15&buffer=1000&auth=&user=admin&pass=admin HTTP/1.1" 400 0 "-" "zmview/26 CFNetwork/894 Darwin/17.4.0"
192.168.1.10 - - [11/Mar/2018:11:00:31 -0600] "GET /zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=15&buffer=1000&auth=&user=admin&pass=admin HTTP/1.1" 200 7569353 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
192.168.1.10 - - [11/Mar/2018:11:03:21 -0600] "GET /zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=15&buffer=1000&auth=&user=admin&pass=admin HTTP/1.1" 200 443090 "-" "curl/7.54.0"
pliablepixels commented 6 years ago

@nabheet this is not the issue tracker for zmView. It's for zmNinja.

nabheet commented 6 years ago

Oh, silly me! I am sorry I didn’t notice the difference. Thank you for your reply. Looks like this is much better Ux too. I will give this a try.

pliablepixels commented 6 years ago

closing as this issue was resolved via email

s6410 commented 4 years ago

Hi, I know it has been a while but I am experiencing a similar problem. Would you mind sharing the solution? setup: Freenas 11.3 (FreeBSD) nginx Zoneminder as plugin version 1.32.3

ZMninja on iOS and Mac OS both show green dots instead of live stream.

Videos from events also show green dots, I can download them to the phone, from ZMninja, and watch them there though.

medjaiiii commented 3 years ago

I have the same problem with zmView (pro) app. At least I think this is the same problem. How to solve it? no image transmission.

pliablepixels commented 3 years ago

This is a repo for zmNinja, not zmView. If your question was for zmNinja, it almost always is because of one of this: https://zmninja.readthedocs.io/en/latest/guides/FAQ.html#live-streaming-issues