Hi,
I've upgraded from 1.36.33 to 1.37.47 and the system is working but zmNinja isn't. I've checked the API settings from here: https://zmninja.readthedocs.io/en/lates ... g-api.html but the monitors.json returns the following:
{
"success": false,
"data": {
"name": "Not Authenticated",
"message": "Not Authenticated",
"url": "/zm/api/monitors.json",
"exception": {
"class": "UnauthorizedException",
"code": 401,
"message": "Not Authenticated"
}
}
}
This is from a second tab in my browser with the first tab logged in to Zoneminder.
The settings were all correct except for AUTH_HASH_IPS which I had to disable. Not sure if this got changed during the upgrade but still get Not Authenticated. Restarted the Zoneminder service too.
zmNinja seems to suggest it authenticates but can't load the events list.
API - Not Authenticated after upgrade
Re: API - Not Authenticated after upgrade
Reading this https://zmninja.readthedocs.io/en/lates ... ort-errors some of the event log is below.
The email button in the app doesn't work so I had to copy/paste what looks to be the log entry where the error occurs into an email.
Nov 23, 2023 05:26:31:667 PM ERROR Error fetching events for page 2 Err: {"status":500,"headers":{"strict-transport-security":"max-age=15552000; includeSubDomains","server":"Apache/2.4.52 (Ubuntu)","content-type":"application/json; charset=UTF-8","content-length":"551","connection":"close","date":"Thu, 23 Nov 2023 17:26:31 GMT"},"url":"https://<<url removed>>/zm/api/events/index/AlarmFrames%20%3E=:1.json?&sort=StartTime&direction=desc&page=2&token=<removed>&direction=desc&page=2&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNzAwNzUzOTI3LCJleHAiOjE3MDA3NjExMjcsInVzZXIiOiJhZG1pbiIsInR5cGUiOiJhY2Nlc3MifQ.Y4qjzj6F2JMVH4RBddG8Wjor1ItDCNrbWM1PgnYx9I8\",\"exception\":{\"class\":\"TypeError\",\"code\":0,\"message\":\"count(): Argument #1 ($value) must be of type Countable|array, null given\"}}}"}
The email button in the app doesn't work so I had to copy/paste what looks to be the log entry where the error occurs into an email.
Nov 23, 2023 05:26:31:667 PM ERROR Error fetching events for page 2 Err: {"status":500,"headers":{"strict-transport-security":"max-age=15552000; includeSubDomains","server":"Apache/2.4.52 (Ubuntu)","content-type":"application/json; charset=UTF-8","content-length":"551","connection":"close","date":"Thu, 23 Nov 2023 17:26:31 GMT"},"url":"https://<<url removed>>/zm/api/events/index/AlarmFrames%20%3E=:1.json?&sort=StartTime&direction=desc&page=2&token=<removed>&direction=desc&page=2&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNzAwNzUzOTI3LCJleHAiOjE3MDA3NjExMjcsInVzZXIiOiJhZG1pbiIsInR5cGUiOiJhY2Nlc3MifQ.Y4qjzj6F2JMVH4RBddG8Wjor1ItDCNrbWM1PgnYx9I8\",\"exception\":{\"class\":\"TypeError\",\"code\":0,\"message\":\"count(): Argument #1 ($value) must be of type Countable|array, null given\"}}}"}
Re: API - Not Authenticated after upgrade
Other functions in zmNinja (Live view, Status etc) seem to be working ok just the retrieving of events using Events List.
Re: API - Not Authenticated after upgrade
I actually fixed that last night but hadn't pushed it yet.
Packages building now.
Packages building now.
Re: API - Not Authenticated after upgrade
Perfect, updated and fixed.
Many thanks
Many thanks