zmNinjaNg version and build number
1.3.0 (1820)
Platform
Linux (desktop)
OS / browser version
Slackware linux 15.0 and Android 12.0
Device
No response
ZoneMinder version
1.38.3
Event Server (ES) version
No response
zm_detect version
No response
Describe the bug
Hello!
ZoneMinder 1.38.3, zmNinjaNg fails to load the monitor list. The error is: api response validation failed for GET /monitors.json. Debug logs show validation error paths: monitors.X.Monitor.V4LMultiBuffer with message Invalid input.
The V4LMultiBuffer field is only relevant for analog cameras (Type = Local), but ZoneMinder 1.38.3 now includes it in the API response for all camera types, including Ffmpeg and File. The field also has inconsistent data types across monitors in the JSON response:
null for some cameras
false (boolean) for others
0 (integer) for the rest
The app does not expect this field for non-Local cameras and fails validation.
There are also potential secondary issues once V4LMultiBuffer is resolved:
Event_Summary returns all null values for monitors with zero events (including MonitorId), while monitors with events return proper integers.
Several other fields (ControlId, TrackDelay, ReturnDelay, TotalEvents) also have inconsistent null/integer types across monitors.
All of my cameras are configured with the FFmpeg source type (there are no analog or local cameras).
I'm using a multi-server configuration with CNAME records pointing to the same physical server (to bypass browser limits on the number of simultaneous connections).
Steps to reproduce
- Upgraded ZoneMinder 1.36.33 to ZoneMinder 1.38.3.
- Installed and configured zmNinjaNg to connect to the server.
- Launched the application.
- An error message appears: zmninjang failed to load monitors: API response validation failed for the GET /monitors.json request
Expected behavior
In my opinion, the app should:
- Ignore the irrelevant V4LMultiBuffer field for non-Local camera types.
- Handle null values in Event_Summary, ControlId, TrackDelay, ReturnDelay, and TotalEvents.
- Load the monitor list successfully after a ZoneMinder upgrade.
Screenshots / logs
Validation error:
API response validation failed
{
"endpoint": "/monitors.json",
"method": "GET",
"errors": [
{
"path": "monitors.1.Monitor.V4LMultiBuffer",
"message": "Invalid input"
},
{
"path": "monitors.2.Monitor.V4LMultiBuffer",
"message": "Invalid input"
},
... (repeats for all cameras)
]
rawResponse": "{"monitors":[{"Monitor":{"Id":2,"Name":"Cam-1","Deleted":false,"Notes":null,"ServerId":6,"StorageId":0,"ManufacturerId":12,"ModelId":null,"Type":"Ffmpeg","Function":"Record","Capturing":"Always","Enabled":0,"DecodingEnabled":1,"Decoding":"Always","Go2RTCEnabled":false,"RTSP2WebEnabled":false,"RTSP2WebType":"WebRTC","StreamChannel":"CameraDirectPrimary","DefaultPlayer":"","JanusEnabled":false,"JanusAudioEnabled":false,"Janus_Profile_Override":"","Restream":false,"RTSP_User":null,"Janus_Use_RTSP...[truncated]"
}
Database query result:
MariaDB [zm]> SELECT Id, Name, Type, V4LMultiBuffer FROM Monitors;
+----+-------------------+-----------+---------------------+
| Id | Name | Type | V4LMultiBuffer |
+----+-------------------+-----------+---------------------+
| 2 | Cam-1 | Ffmpeg | NULL |
| 3 | Cam-2 | Ffmpeg | 0 |
| 4 | Cam-3 | Ffmpeg | 0 |
| ... |
+----+-------------------+-----------+---------------------+
V4LMultiBuffer type mismatch between database and JSON response:
The database stores V4LMultiBuffer as integer 0 for most cameras and NULL for some. However, the ZoneMinder 1.38.3 API serializes these values incorrectly:
+------------------+------------------+-------------+-------------------+
| Database value | JSON output | JSON type | Monitors affected |
+------------------+------------------+-------------+-------------------+
| NULL | null | null | some cameras |
| 0 | false | boolean | some cameras |
| 0 (expected) | 0 (not returned) | integer | None |
+------------------+------------------+-------------+-------------------+
No camera returns integer 0 in JSON. The zmNinjaNg schema likely expects integer 0 or 1 for this field, so both null and false fail validation.
Event_Summary with all nulls (monitors with zero events):
"Event_Summary": {
"MonitorId": null,
"TotalEvents": null,
"TotalEventDiskSpace": null,
"HourEvents": null,
"HourEventDiskSpace": null,
"DayEvents": null,
"DayEventDiskSpace": null,
"WeekEvents": null,
"WeekEventDiskSpace": null,
"MonthEvents": null,
"MonthEventDiskSpace": null,
"ArchivedEvents": null,
"ArchivedEventDiskSpace": null
}
Inconsistent types across monitors (examples):
+------------------+---------------------------+---------------------------+
| Field | Monitors with events | Monitors without events |
+------------------+---------------------------+---------------------------+
| ControlId | 0 (integer) | null |
| TrackDelay | 0 (integer) | null |
| ReturnDelay | 0 (integer) | null |
| TotalEvents | 4187 (integer) | null |
| Event_Summary | All fields populated with | All fields null, |
| | proper integers | including MonitorId |
+------------------+---------------------------+---------------------------+
Environment:
ZoneMinder version: 1.38.3
zmNinjaNg platform: Electron (desktop)
Server: Apache/2.4.68, PHP/8.2.32 (PHP/8.3.13 - Same Errors), OpenSSL/1.1.1zh
Additional context
All cameras are of type Ffmpeg. No analog/Local cameras exist.
Database stores 0 and NULL for V4LMultiBuffer, but API returns false and null — two different JSON types, neither of which the app expects.
Direct request to api/monitors.json returns HTTP 200 with valid JSON.
zmNinjaNg version and build number
1.3.0 (1820)
Platform
Linux (desktop)
OS / browser version
Slackware linux 15.0 and Android 12.0
Device
No response
ZoneMinder version
1.38.3
Event Server (ES) version
No response
zm_detect version
No response
Describe the bug
Hello!
ZoneMinder 1.38.3, zmNinjaNg fails to load the monitor list. The error is: api response validation failed for GET /monitors.json. Debug logs show validation error paths: monitors.X.Monitor.V4LMultiBuffer with message Invalid input.
The V4LMultiBuffer field is only relevant for analog cameras (Type = Local), but ZoneMinder 1.38.3 now includes it in the API response for all camera types, including Ffmpeg and File. The field also has inconsistent data types across monitors in the JSON response:
null for some cameras
false (boolean) for others
0 (integer) for the rest
The app does not expect this field for non-Local cameras and fails validation.
There are also potential secondary issues once V4LMultiBuffer is resolved:
Event_Summary returns all null values for monitors with zero events (including MonitorId), while monitors with events return proper integers.
Several other fields (ControlId, TrackDelay, ReturnDelay, TotalEvents) also have inconsistent null/integer types across monitors.
All of my cameras are configured with the FFmpeg source type (there are no analog or local cameras).
I'm using a multi-server configuration with CNAME records pointing to the same physical server (to bypass browser limits on the number of simultaneous connections).
Steps to reproduce
Expected behavior
In my opinion, the app should:
Screenshots / logs
Validation error:
API response validation failed
{
"endpoint": "/monitors.json",
"method": "GET",
"errors": [
{
"path": "monitors.1.Monitor.V4LMultiBuffer",
"message": "Invalid input"
},
{
"path": "monitors.2.Monitor.V4LMultiBuffer",
"message": "Invalid input"
},
... (repeats for all cameras)
]
rawResponse": "{"monitors":[{"Monitor":{"Id":2,"Name":"Cam-1","Deleted":false,"Notes":null,"ServerId":6,"StorageId":0,"ManufacturerId":12,"ModelId":null,"Type":"Ffmpeg","Function":"Record","Capturing":"Always","Enabled":0,"DecodingEnabled":1,"Decoding":"Always","Go2RTCEnabled":false,"RTSP2WebEnabled":false,"RTSP2WebType":"WebRTC","StreamChannel":"CameraDirectPrimary","DefaultPlayer":"","JanusEnabled":false,"JanusAudioEnabled":false,"Janus_Profile_Override":"","Restream":false,"RTSP_User":null,"Janus_Use_RTSP...[truncated]"
}
Database query result:
MariaDB [zm]> SELECT Id, Name, Type, V4LMultiBuffer FROM Monitors;
V4LMultiBuffer type mismatch between database and JSON response:
The database stores V4LMultiBuffer as integer 0 for most cameras and NULL for some. However, the ZoneMinder 1.38.3 API serializes these values incorrectly:
No camera returns integer 0 in JSON. The zmNinjaNg schema likely expects integer 0 or 1 for this field, so both null and false fail validation.
Event_Summary with all nulls (monitors with zero events):
Inconsistent types across monitors (examples):
Environment:
ZoneMinder version: 1.38.3
zmNinjaNg platform: Electron (desktop)
Server: Apache/2.4.68, PHP/8.2.32 (PHP/8.3.13 - Same Errors), OpenSSL/1.1.1zh
Additional context
All cameras are of type Ffmpeg. No analog/Local cameras exist.
Database stores 0 and NULL for V4LMultiBuffer, but API returns false and null — two different JSON types, neither of which the app expects.
Direct request to api/monitors.json returns HTTP 200 with valid JSON.