zmninja issue

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
Post Reply
alabamatoy
Posts: 349
Joined: Sun Jun 05, 2016 2:53 pm

zmninja issue

Post by alabamatoy »

Zmninja version 1.7.004 pointed at zm server version 1.37.30 cant seem to get past "loading monitors". Wife is running zmninja 1.6.009 pointed at same server and it works fine. Obviously 2 different phones.

The 1.7.xxx has worked up till the last few days, no changes to the server in months.Thoughts?

Interesting log entries on 1.7.004:
≠========
Jan 18, 2024 08:44:36:094 PM INFO CACHE: error with http get {"status":500,"url":"https://[server name].com/zm/api/monitors/index/Type!=:WebSite/Deleted=:0/Capturing!=:None.json?&token=<removed>
Jan 18, 2024 08:44:36:093 PM DEBUG *** Inside native HTTP error for url:{"status":500,"url":"https://[servername].com/zm/api/monitors/index/Type!=:WebSite/Deleted=:0/Capturing!=:None.json?&token=<removed>
Jan 18, 2024 08:44:36:062 PM DEBUG CACHE: NOT found for:cached_monitors reverting to HTTP
Jan 18, 2024 08:44:36:061 PM DEBUG Monitor URL to fetch
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: zmninja issue

Post by iconnor »

status 500 means a crash on server. Check /var/log/zm/cake_error.log
alabamatoy
Posts: 349
Joined: Sun Jun 05, 2016 2:53 pm

Re: zmninja issue

Post by alabamatoy »

2024-01-18 20:44:37 Error: [PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Deleted' in 'where clause'
Request URL: /zm/api/monitors/index/Type!=:WebSite/Deleted=:0/Capturing!=:None.json?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNzA1NjI3MjAxLCJleHAiOjE3MDU2MzQ0MDEsInVzZXIiOiJoZXJuZG9uIiwidHlwZSI6ImFjY2VzcyJ9.bjLwFpHFqi0utHskTaNWKOTgGlJ3IL2sZk4rquI59zY
Stack Trace:
#0 /usr/share/zoneminder/www/api/lib/Cake/Model/Datasource/DboSource.php(502): PDOStatement->execute(Array)
#1 /usr/share/zoneminder/www/api/lib/Cake/Model/Datasource/DboSource.php(468): DboSource->_execute('SELECT `Monitor...', Array)
#2 /usr/share/zoneminder/www/api/lib/Cake/Model/Datasource/DboSource.php(715): DboSource->execute('SELECT `Monitor...', Array, Array)
#3 /usr/share/zoneminder/www/api/lib/Cake/Model/Datasource/DboSource.php(1226): DboSource->fetchAll('SELECT `Monitor...', Array)
#4 /usr/share/zoneminder/www/api/lib/Cake/Model/Model.php(3053): DboSource->read(Object(Monitor), Array)
#5 /usr/share/zoneminder/www/api/lib/Cake/Model/Model.php(3025): Model->_readDataSource('all', Array)
#6 /usr/share/zoneminder/www/api/app/Controller/MonitorsController.php(67): Model->find('all', Array)
#7 [internal function]: MonitorsController->index()
#8 /usr/share/zoneminder/www/api/lib/Cake/Controller/Controller.php(499): ReflectionMethod->invokeArgs(Object(MonitorsController), Array)
#9 /usr/share/zoneminder/www/api/app/Plugin/Crud/Lib/CrudControllerTrait.php(31): Controller->invokeAction(Object(CakeRequest))
#10 /usr/share/zoneminder/www/api/lib/Cake/Routing/Dispatcher.php(193): AppController->invokeAction(Object(CakeRequest))
#11 /usr/share/zoneminder/www/api/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(MonitorsController), Object(CakeRequest))
#12 /usr/share/zoneminder/www/api/app/webroot/index.php(117): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
alabamatoy
Posts: 349
Joined: Sun Jun 05, 2016 2:53 pm

Re: zmninja issue

Post by alabamatoy »

There's probably stuff you don't need in that, it's difficult to do this with fat fingers on a phone, sorry!

Please advise how to remedy the error.
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: zmninja issue

Post by iconnor »

I can fix zmNinja, clearly I got the version wrong for which to add the Deleted filter...

Or you could update to the latest... we are up to 1.37.50 now....

Or manually run the db update for 1.37.39 which will add the Deleted column.

mysql -u zmuser -p zm < /usr/share/zoneminder/db/zm_update-1.37.39.sql
alabamatoy
Posts: 349
Joined: Sun Jun 05, 2016 2:53 pm

Re: zmninja issue

Post by alabamatoy »

I'm stuck with the server I have for a while longer until I can upgrade hardware. Ths OS is outa support and the hardware is like an 80s Yugo. But it works reliably (ahem) as long as I don't turn all the monitors on at once! Embarrassed grin.

But doesn't this mean the new zmninja has a server version requirement.... something beyond the 1.37.30 that I'm running? Perhaps a warning, or an error alert? "Hey, that server needs to be upgraded NOW!" :-)
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: zmninja issue

Post by iconnor »

Newer versions of 1.37 should only take less resources, although I havn't yet gotten to the major improvements.

It just means that I screwed up the version check. I basically say if zm_version > 1.37.31 which is where I though I introduced the Deleted column. Maybe it should be > 1.37.34. I'll just have to double check.
Post Reply