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

No monitors visible after upgrade to 1.36.0 #1066

Closed pcdiks closed 3 years ago

pcdiks commented 3 years ago

The version of zmNinja you are reporting:

example: 1.6.008 (iOS)

The version and OS of ZoneMinder you are using:

example: 1.36.0, Ubuntu Focal

Platform zmNinja is running on

example: IOS

Did you build the package from source code yourself? N

Describe the bug This morning the app worked perfectly with zoneminder 1.34.26 but after upgrading to 1.36.0 it stopped. If I start the app it logs in and then tries to load the monitors. They never show up.

Debug logs


May 15, 2021 08:24:59:685 PM INFO --------->Setting up global key handler...
May 15, 2021 08:24:59:684 PM INFO --------->Setting up network state handlers....
May 15, 2021 08:24:57:376 PM DEBUG CACHE: cached monitor data type is:object
May 15, 2021 08:24:57:375 PM INFO CACHE: error with http get {"status":500,"headers":{"content-length":"530","content-type":"application/json; charset=UTF-8","server":"Apache/2.4.41 (Ubuntu)","date":"Sat, 15 May 2021 18:24:57 GMT"},"url":"https://abc.abc.nl/zm/api/monitors/index/Type%20!=:WebSite.json?&token=<removed>
May 15, 2021 08:24:57:374 PM DEBUG ***  Inside native HTTP error for url:{"status":500,"headers":{"content-length":"530","content-type":"application/json; charset=UTF-8","server":"Apache/2.4.41 (Ubuntu)","date":"Sat, 15 May 2021 18:24:57 GMT"},"url":"https://abc.abc.nl/zm/api/monitors/index/Type%20!=:WebSite.json?&token=<removed>
May 15, 2021 08:24:57:342 PM DEBUG CACHE: NOT found for:cached_monitors reverting to HTTP
May 15, 2021 08:24:57:340 PM DEBUG Monitor URL to fetch is:https://abc.abc..nl/zm/api/monitors/index/Type !=:WebSite.json?&token=<removed>
May 15, 2021 08:24:57:340 PM DEBUG ZMS Multiport reported: 0
May 15, 2021 08:24:57:337 PM INFO ZM_MIN_STREAMING_PORT not configured, disabling
May 15, 2021 08:24:57:337 PM DEBUG Setting multi-port to:false
May 15, 2021 08:24:57:337 PM DEBUG CACHE: cached value for key:cached_multi_port is good as 26666 <86400
May 15, 2021 08:24:57:336 PM DEBUG CACHE: found for key: cached_multi_port with expiry of:86400s
May 15, 2021 08:24:57:334 PM INFO Checking value of ZM_MIN_STREAMING_PORT for the first time
May 15, 2021 08:24:57:253 PM DEBUG Timezone API response is:Europe/Amsterdam
May 15, 2021 08:24:57:253 PM DEBUG CACHE: cached value for key:cached_timezone is good as 26666 <86400
May 15, 2021 08:24:57:252 PM DEBUG CACHE: found for key: cached_timezone with expiry of:86400s
May 15, 2021 08:24:57:250 PM DEBUG obfuscate: original:7707 obfuscated:2227 scheme:lzs
May 15, 2021 08:24:57:245 PM DEBUG ZM State has not changed, still at default
May 15, 2021 08:24:57:238 PM DEBUG Real value of PRIVACY is:0
May 15, 2021 08:24:57:207 PM INFO getMonitors:Loading all monitors
May 15, 2021 08:24:57:207 PM DEBUG NVR: Regenerating connkeys for all monitors at 1621103097207
May 15, 2021 08:24:57:205 PM DEBUG Transitioning state to: app.montage with param {"minimal":false,"isRefresh":false}
May 15, 2021 08:24:57:203 PM INFO EventSever: No Event Server present. Not initializing
May 15, 2021 08:24:57:203 PM INFO First invocation of TimeZone, asking server
May 15, 2021 08:24:57:202 PM INFO Got API version: 1.36.0
May 15, 2021 08:24:57:200 PM DEBUG getAPI version succeeded with 1.36.0
May 15, 2021 08:24:57:200 PM DEBUG Setting server version to:1.36.0
May 15, 2021 08:24:57:200 PM DEBUG obfuscate: original:7707 obfuscated:2227 scheme:lzs

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

pliablepixels commented 3 years ago

The monitor API is not working What happens if you try https://abc.abc.nl/zm/api/monitors/index/Type%20!=:WebSite.json in a browser?

pcdiks commented 3 years ago

I get this when I’m not logged in:

{"success":false,"data":{"name":"Not Authenticated","message":"Not Authenticated","url":"\/zm\/api\/monitors\/index\/Type%20!=:WebSite.json","exception":{"class":"UnauthorizedException","code":401,"message":"Not Authenticated"}}}

and this when I’m logged in:

{"success":false,"data":{"name":"An Internal Error Has Occurred.","message":"An Internal Error Has Occurred.","url":"\/zm\/api\/monitors\/index\/Type%20!=:WebSite.json","exception":{"class":"PDOException","code":"42S22","message":"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Monitor.HourEvents' in 'field list'"}}}
pliablepixels commented 3 years ago

So your 1.36 APIs are not working for some reason (logged in response). You'll need to resolve that first.

pcdiks commented 3 years ago

Ok, thanks for the help. I will look in to this.

the check in the documentation gives a good reply: https://abc.abc.nl/zm/api/host/getVersion.json

{"version":"1.36.0","apiversion":"2.0"}
pcdiks commented 3 years ago

Clearly a zoneminder issue so I close this issue.