Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Montage cannot load images and monitor streams will not load, but API calls succeed #658

Closed
ysammy opened this issue Jun 25, 2018 · 18 comments

Comments

@ysammy
Copy link

ysammy commented Jun 25, 2018

Platform & OS Version
iOS 11.4

The version of the app you are reporting:
1.3.005

Device details:
iPhone 7

What is the nature of your issue
Montage images not loading and streams not viewable, but API calls succeed.

Details
The montage view stopped loading images and I'm unable to stream any monitors. The montage view on the zm web UI works correctly. Other screens in zmNinja (i.e. events list) seem to function and render data after successful API calls to my zm server. The montage view correctly displays the 5 monitors I have, but no camera images display and the UI is stuck at "arranging images".

I probably upgraded the app in the last month. My server configuration has not changed in a long time.

Debug Logs (if applicable)
These logs demo:

  1. from a fresh app start
  2. show events list to demonstrate successful API calls to my server
  3. show montage view--monitor names and boxes show up (collapsed), but "arranging images" remains on screen.
Jun 25, 2018 09:10:50 AM DEBUG skipping image refresh, packery is still loading
Jun 25, 2018 09:10:48 AM DEBUG skipping image refresh, packery is still loading
Jun 25, 2018 09:10:46 AM DEBUG skipping image refresh, packery is still loading
Jun 25, 2018 09:10:44 AM DEBUG skipping image refresh, packery is still loading
Jun 25, 2018 09:10:42 AM DEBUG skipping image refresh, packery is still loading
Jun 25, 2018 09:10:40 AM DEBUG skipping image refresh, packery is still loading
Jun 25, 2018 09:10:38 AM DEBUG skipping image refresh, packery is still loading
Jun 25, 2018 09:10:37 AM INFO Whoops!! Monitors have changed. I'm resetting layouts, sorry!
Jun 25, 2018 09:10:37 AM INFO Monitors that are active and not DOM hidden: 5 while grid has undefined
Jun 25, 2018 09:10:37 AM INFO Did NOT find a packery layout
Jun 25, 2018 09:10:36 AM INFO Inside Montage Ctrl:We found 5 monitors
Jun 25, 2018 09:10:36 AM DEBUG skipping image refresh, packery is still loading
Jun 25, 2018 09:10:36 AM DEBUG Setting up cycle interval of:10000
Jun 25, 2018 09:10:36 AM DEBUG bandwidth: highbw montage refresh set to: 2
Jun 25, 2018 09:10:36 AM DEBUG Forcing simulStreams off as you have disabled it
Jun 25, 2018 09:10:36 AM DEBUG Multiport=0
Jun 25, 2018 09:10:36 AM DEBUG EventCtrl: Deregistering broadcast handles
Jun 25, 2018 09:10:36 AM INFO sending Cached ZM_MIN_STREAMING_PORT 0
Jun 25, 2018 09:10:36 AM INFO Returning pre-loaded list of 5 monitors
Jun 25, 2018 09:10:36 AM DEBUG DataModel: Regenerating connkeys...
Jun 25, 2018 09:10:30 AM DEBUG doing the jiggle and dance...
Jun 25, 2018 09:10:29 AM DEBUG EventCtrl: success, got 91 events
Jun 25, 2018 09:10:29 AM DEBUG {"results":{"6":"259","7":"120","9":"312"}}
Jun 25, 2018 09:10:29 AM DEBUG EventCtrl: grabbing events for: id=0 Date/Time:-
Jun 25, 2018 09:10:29 AM DEBUG EventCtrl: found 7 pages of events
Jun 25, 2018 09:10:29 AM DEBUG {"results":{"6":"184","7":"83","9":"178"}}
Jun 25, 2018 09:10:29 AM DEBUG {"results":[]}
Jun 25, 2018 09:10:29 AM DEBUG {"results":{"6":"69","7":"18","9":"76"}}
Jun 25, 2018 09:10:29 AM DEBUG consoleEvents API:https://XXXXX/zm/api/events/consoleEvents/1%20month/AlarmFrames >=:1.json
Jun 25, 2018 09:10:29 AM DEBUG consoleEvents API:https://XXXXX/zm/api/events/consoleEvents/1%20week/AlarmFrames >=:1.json
Jun 25, 2018 09:10:29 AM DEBUG consoleEvents API:https://XXXXX/zm/api/events/consoleEvents/1%20day/AlarmFrames >=:1.json
Jun 25, 2018 09:10:29 AM DEBUG consoleEvents API:https://XXXXX/zm/api/events/consoleEvents/1%20hour/AlarmFrames >=:1.json
Jun 25, 2018 09:10:29 AM DEBUG Setting up carousel watchers
Jun 25, 2018 09:10:29 AM DEBUG EventCtrl: grabbing # of event pages
Jun 25, 2018 09:10:29 AM DEBUG getInitialEvents called
Jun 25, 2018 09:10:29 AM DEBUG All images loaded, switching to snapshot...
Jun 25, 2018 09:10:29 AM DEBUG text zoom factor is 1
Jun 25, 2018 09:10:29 AM DEBUG enabling options swipe
Jun 25, 2018 09:10:29 AM DEBUG Not sending WSS message as event server is off
Jun 25, 2018 09:10:29 AM INFO Image padding digits reported as 5
Jun 25, 2018 09:10:29 AM INFO ZM_EVENT_IMAGE_DIGITS is already configured for 5
Jun 25, 2018 09:10:29 AM DEBUG >>>height of list/scrub set to 330 and 370
Jun 25, 2018 09:10:29 AM DEBUG --> thumbnail means increasing row size
Jun 25, 2018 09:10:29 AM INFO EventCtrl called with: E/MID=0 playEvent =  false
Jun 25, 2018 09:10:29 AM INFO Returning pre-loaded list of 5 monitors
http://errors.angularjs.org/1.5.3/$rootScope/inprog?p0=%24digest caused by undefined
Jun 25, 2018 09:10:29 AM DEBUG **EXCEPTION**Error: [$rootScope:inprog] $digest already in progress
http://errors.angularjs.org/1.5.3/$rootScope/inprog?p0=%24digest caused by undefined
Jun 25, 2018 09:10:29 AM DEBUG **EXCEPTION**Error: [$rootScope:inprog] $digest already in progress
http://errors.angularjs.org/1.5.3/$rootScope/inprog?p0=%24digest caused by undefined
Jun 25, 2018 09:10:29 AM DEBUG **EXCEPTION**Error: [$rootScope:inprog] $digest already in progress
http://errors.angularjs.org/1.5.3/$rootScope/inprog?p0=%24digest caused by undefined
Jun 25, 2018 09:10:29 AM DEBUG **EXCEPTION**Error: [$rootScope:inprog] $digest already in progress
Jun 25, 2018 09:10:29 AM DEBUG skipping image refresh, packery is still loading
Jun 25, 2018 09:10:28 AM INFO Whoops!! Monitors have changed. I'm resetting layouts, sorry!
Jun 25, 2018 09:10:28 AM INFO Monitors that are active and not DOM hidden: 5 while grid has undefined
Jun 25, 2018 09:10:28 AM INFO Did NOT find a packery layout
Jun 25, 2018 09:10:27 AM INFO Inside Montage Ctrl:We found 5 monitors
Jun 25, 2018 09:10:27 AM DEBUG skipping image refresh, packery is still loading
Jun 25, 2018 09:10:27 AM DEBUG Setting up cycle interval of:10000
Jun 25, 2018 09:10:27 AM DEBUG bandwidth: highbw montage refresh set to: 2
Jun 25, 2018 09:10:27 AM DEBUG Forcing simulStreams off as you have disabled it
Jun 25, 2018 09:10:27 AM DEBUG Multiport=0
Jun 25, 2018 09:10:27 AM DEBUG Portal: Deregistering broadcast handles
Jun 25, 2018 09:10:27 AM INFO sending Cached ZM_MIN_STREAMING_PORT 0
Jun 25, 2018 09:10:27 AM DEBUG no packery profile, making sure monitors are show
Jun 25, 2018 09:10:27 AM DEBUG Loading hidden/unhidden status for profile:
Jun 25, 2018 09:10:27 AM INFO multi server list loaded{"servers":[]}
Jun 25, 2018 09:10:27 AM INFO DataModel: Extracted a stream authentication key of: XXXXX
Jun 25, 2018 09:10:27 AM INFO Monitor load was successful, loaded 5 monitors
Jun 25, 2018 09:10:27 AM DEBUG Now trying to get multi-server data, if present
Jun 25, 2018 09:10:27 AM DEBUG Inside getMonitors, will also regen connkeys
Jun 25, 2018 09:10:27 AM DEBUG no packery profile, making sure monitors are show
Jun 25, 2018 09:10:27 AM DEBUG Loading hidden/unhidden status for profile:
Jun 25, 2018 09:10:27 AM DEBUG DataModel: Getting auth from https://XXXXX/zm/index.php?view=watch&mid=1 with mid=1
Jun 25, 2018 09:10:27 AM INFO Now that we have monitors, lets get AuthKey...
Jun 25, 2018 09:10:27 AM DEBUG Monitor URL to fetch is:https://XXXXX/zm/api/monitors/index/Type !=:WebSite.json
Jun 25, 2018 09:10:27 AM DEBUG ZMS Multiport reported: 0
Jun 25, 2018 09:10:27 AM DEBUG Setting multi-port to:false
Jun 25, 2018 09:10:27 AM INFO ZM_MIN_STREAMING_PORT not supported
Jun 25, 2018 09:10:27 AM DEBUG ZM Version nag: Checking 110.0 with 1440
Jun 25, 2018 09:10:27 AM DEBUG It has been 110.0 hours since zmVersion was checked
Jun 25, 2018 09:10:27 AM DEBUG Timezone API response is:America/Los_Angeles
Jun 25, 2018 09:10:27 AM INFO ZM_EVENT_IMAGE_DIGITS is 5
Jun 25, 2018 09:10:27 AM INFO Checking value of ZM_MIN_STREAMING_PORT for the first time
Jun 25, 2018 09:10:27 AM INFO getMonitors:Loading all monitors
Jun 25, 2018 09:10:27 AM DEBUG DataModel: Regenerating connkeys...
Jun 25, 2018 09:10:27 AM DEBUG Transitioning state to: app.montage with param undefined
Jun 25, 2018 09:10:27 AM INFO No Event Server present. Not initializing
Jun 25, 2018 09:10:27 AM INFO First invocation of TimeZone, asking server
Jun 25, 2018 09:10:27 AM DEBUG Config URL for digits is:https://XXXXX/zm/api/configs/viewByName/ZM_EVENT_IMAGE_DIGITS.json
Jun 25, 2018 09:10:27 AM INFO Got API version: 1.30.4
Jun 25, 2018 09:10:27 AM DEBUG Setting server version to:1.30.4
Jun 25, 2018 09:10:27 AM DEBUG getAPIversion called
Jun 25, 2018 09:10:27 AM DEBUG PortalLogin: auth success
Jun 25, 2018 09:10:27 AM INFO Stream authentication construction: undefined
Jun 25, 2018 09:10:27 AM DEBUG Storing login time as Mon Jun 25 2018 09:10:26 GMT-0700
Jun 25, 2018 09:10:26 AM INFO Deferring auth key, as monitorId unknown
Jun 25, 2018 09:10:26 AM DEBUG auth-success broadcast:Successful
Jun 25, 2018 09:10:26 AM INFO zmAutologin successfully logged into Zoneminder
Jun 25, 2018 09:10:26 AM DEBUG current version: 1.3.005 & available version 1.3.004
Jun 25, 2018 09:10:26 AM DEBUG Latest post dated 2018-06-19 11:51:52 but you read 2018-06-19 11:51:52
Jun 25, 2018 09:10:26 AM INFO Checking if reCaptcha is enabled in ZM...
Jun 25, 2018 09:10:26 AM INFO zmAutologin called
Jun 25, 2018 09:10:26 AM DEBUG Resetting zmCookie...
Jun 25, 2018 09:10:26 AM INFO https://XXXXX/zm=>Logging out of any existing ZM sessions...
Jun 25, 2018 09:10:26 AM INFO Cancelling zmAutologin timer
Jun 25, 2018 09:10:26 AM DEBUG PIN code entered is correct, or there is no PIN set
Jun 25, 2018 09:10:26 AM DEBUG unlock called with check PIN=true
Jun 25, 2018 09:10:26 AM INFO not checking for touchID
Jun 25, 2018 09:10:26 AM INFO User credentials are provided
Jun 25, 2018 09:10:26 AM DEBUG Inside Portal login Enter handler
Jun 25, 2018 09:10:26 AM INFO Entering Portal Main
Jun 25, 2018 09:10:26 AM INFO Inside init-complete in app.js: All init over, going to portal login
Jun 25, 2018 09:10:26 AM INFO >>>> Disabling strict SSL checking (turn off  in Dev Options if you can't connect)
Jun 25, 2018 09:10:26 AM INFO DataModel init retrieved store loginData
Jun 25, 2018 09:10:26 AM INFO SlowDelay is: false
Jun 25, 2018 09:10:26 AM INFO Setting DataModel init bandwidth to: highbw
Jun 25, 2018 09:10:26 AM DEBUG timeline graph type not set. Setting to all
Jun 25, 2018 09:10:26 AM DEBUG Basic authentication detected, constructing Authorization Header
Jun 25, 2018 09:10:26 AM INFO user profile encrypted, decoding...
Jun 25, 2018 09:10:26 AM INFO Setting up pause and resume handler AFTER language is loaded...
Jun 25, 2018 09:10:26 AM INFO Setting up POST LOGIN timer
Jun 25, 2018 09:10:26 AM INFO Checking for news updates
Jun 25, 2018 09:10:26 AM INFO Checking for new version updates...
Jun 25, 2018 09:10:26 AM INFO ZMData init: checking for stored variables & setting up log file
Jun 25, 2018 09:10:26 AM INFO Language file loaded, continuing with rest
Jun 25, 2018 09:10:26 AM DEBUG isFirstUse returned: false
Jun 25, 2018 09:10:26 AM INFO >>>>Language to be used:en
Jun 25, 2018 09:10:26 AM INFO Device Language is:en
Jun 25, 2018 09:10:26 AM INFO No language set, switching to en
Jun 25, 2018 09:10:26 AM INFO App Version: 1.3.005
Jun 25, 2018 09:10:25 AM INFO Retrieving language before init is called...
Jun 25, 2018 09:10:25 AM INFO Enabling native transitions...
2018-06-25T16:10:25.990Z INFO Updating statusbar
2018-06-25T16:10:25.990Z INFO >>>>No data to import....
2018-06-25T16:10:25.987Z INFO localforage driver for storage:cordovaSQLiteDriver
2018-06-25T16:10:25.986Z DEBUG configureStorageDB:test get/set worked, this driver is ok...
2018-06-25T16:10:25.932Z DEBUG text zoom factor is 1
2018-06-25T16:10:25.919Z DEBUG configureStorageDB:Making sure this storage driver works...
2018-06-25T16:10:25.919Z INFO configureStorageDB:localforage driver for storage:cordovaSQLiteDriver
@pliablepixels
Copy link
Member

seems to be a cgi-bin issue. What is the setting at Settings->path to cgi-bin ?

@ysammy
Copy link
Author

ysammy commented Jun 25, 2018

https://XXXX/zm/cgi-bin

@pliablepixels
Copy link
Member

Few questions:

  1. Have you tried the desktop version - its easier to debug first - https://github.com/pliablepixels/zmNinja/releases
  2. Is it only the montage screen? What about thumbnails in event view or live view of a single monitor?
  3. Do you use basic auth?

@ysammy
Copy link
Author

ysammy commented Jun 26, 2018

Have you tried the desktop version - its easier to debug first - https://github.com/pliablepixels/zmNinja/releases

Not yet--I will try this tonight.

Is it only the montage screen? What about thumbnails in event view or live view of a single monitor?

It appears to be all screens. I don't see any live images and can't load any live video.

Do you use basic auth?

I do. I've verified that the information is correct. And I don't think any API calls would succeed if basic auth were failing. Historically this has not been a problem for me.

Thanks for the help!

@pliablepixels
Copy link
Member

So basic auth is the problem. The new version of zmNinja changed things for more security. See https://github.com/pliablepixels/zmNinja/wiki/FAQ#i-cant-see-streams-i-use-basic-auth

@ysammy
Copy link
Author

ysammy commented Jun 26, 2018

Thanks. Does this apply to iOS as well as Android?

If you are running zmNinja on Android
AND your Chrome version shows version 59.x and beyond
AND you are using HTTP Basic Authentication

@pliablepixels
Copy link
Member

pliablepixels commented Jun 26, 2018

Yup. I should fix that comment

@ysammy
Copy link
Author

ysammy commented Jun 26, 2018

Thank you! I should be able to fix this with my nginx install by adding the Authorization header.

@pliablepixels
Copy link
Member

Would you mind posting the config after that? I have another user who needs nginx help and I don’t use nginx.

@ysammy
Copy link
Author

ysammy commented Jun 30, 2018

Just confirmed that this works for me with nginx. Assuming /zm/ has HTTP basic auth on all paths, the following will pass basic auth credentials to the zoneminder server:

  location /zm/cgi-bin/nph-zms {
    proxy_pass http://<IP>:<PORT>/zm/cgi-bin/nph-zms;
    proxy_set_header Authorization "Basic $arg_basicauth";
  }

@pliablepixels
Copy link
Member

Thanks, would you also mind adding the lines for computing $arg_basicauth by editing your post above?

@ysammy
Copy link
Author

ysammy commented Jun 30, 2018 via email

@pliablepixels
Copy link
Member

Oh cool. Thx.

@pliablepixels
Copy link
Member

pliablepixels commented Jul 2, 2018

It also occurred to me that just /zm/cgi-bin/nph-zms may not be enough? The individual images are shown using zm/index.php?view=image - example thumbnails in event view. Do they work with just this setting?

@ysammy
Copy link
Author

ysammy commented Jul 2, 2018 via email

@pliablepixels
Copy link
Member

pliablepixels commented Jul 17, 2018 via email

@ysammy
Copy link
Author

ysammy commented Jul 18, 2018

I am not--I'm currently using 1.30.4 (basically whatever is in the Ubuntu ppa).

@pliablepixels
Copy link
Member

No problem. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants