Viewing event in zmninja causes this error..

Forum for questions and support relating to the 1.31.x releases only.
canbikehere
Posts: 16
Joined: Tue Feb 27, 2018 6:09 pm

Re: Viewing event in zmninja causes this error..

Post by canbikehere »

I see the same errors in mine:

Code: Select all

2018-03-22 09:14:19 Error: [ParseError] syntax error, unexpected ';', expecting ')'
Request URL: /zm/api/events/5739.json
Stack Trace:
#0 [internal function]: App::load('Group')
#1 [internal function]: spl_autoload_call('Group')
#2 /usr/share/zoneminder/www/api/lib/Cake/Utility/ClassRegistry.php(146): class_exists('Group')
#3 /usr/share/zoneminder/www/api/lib/Cake/Model/Model.php(1077): ClassRegistry::init('Group')
#4 /usr/share/zoneminder/www/api/lib/Cake/Model/Model.php(886): Model->_constructLinkedModel('Group', 'Group', NULL)
#5 /usr/share/zoneminder/www/api/lib/Cake/Model/Model.php(919): Model->__isset('Group')
#6 /usr/share/zoneminder/www/api/lib/Cake/Model/Datasource/DboSource.php(1132): Model->__get('Group')
#7 /usr/share/zoneminder/www/api/lib/Cake/Model/Model.php(3031): DboSource->read(Object(Event), Array)
#8 /usr/share/zoneminder/www/api/lib/Cake/Model/Model.php(3003): Model->_readDataSource('first', Array)
#9 /usr/share/zoneminder/www/api/app/Controller/EventsController.php(120): Model->find('first', Array)
#10 [internal function]: EventsController->view('5739')
#11 /usr/share/zoneminder/www/api/lib/Cake/Controller/Controller.php(491): ReflectionMethod->invokeArgs(Object(EventsController), Array)
#12 /usr/share/zoneminder/www/api/app/Plugin/Crud/Lib/CrudControllerTrait.php(31): Controller->invokeAction(Object(CakeRequest))
#13 /usr/share/zoneminder/www/api/lib/Cake/Routing/Dispatcher.php(193): AppController->invokeAction(Object(CakeRequest))
#14 /usr/share/zoneminder/www/api/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(EventsController), Object(CakeRequest))
#15 /usr/share/zoneminder/www/api/app/webroot/index.php(107): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#16 {main}
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Viewing event in zmninja causes this error..

Post by rockedge »

that looks like some problem in the API. I have not seen this error before... did anything change as far as URL re-writes goes?
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Viewing event in zmninja causes this error..

Post by bbunge »

You might want to try the fix Rockedge came up with for Bionic with PHP7.2. I suspect that some changes have been made to Ubuntu 17.10 in prep for 18.04.
canbikehere
Posts: 16
Joined: Tue Feb 27, 2018 6:09 pm

Re: Viewing event in zmninja causes this error..

Post by canbikehere »

bbunge wrote: Fri Mar 23, 2018 12:04 am You might want to try the fix Rockedge came up with for Bionic with PHP7.2. I suspect that some changes have been made to Ubuntu 17.10 in prep for 18.04.
My environment is on 16.04 and PHP7.0, so unlikely to be related.

rockedge wrote: Thu Mar 22, 2018 11:49 pm that looks like some problem in the API. I have not seen this error before... did anything change as far as URL re-writes goes?
In my case I did nothing other than upgrading the zoneminder packages to v1.31.39.
juanmoura
Posts: 91
Joined: Fri Nov 24, 2017 11:46 am

Re: Viewing event in zmninja causes this error..

Post by juanmoura »

I see the same errors in mine. 16.04 and PHP7.0
canbikehere wrote: Fri Mar 23, 2018 1:24 am
bbunge wrote: Fri Mar 23, 2018 12:04 am You might want to try the fix Rockedge came up with for Bionic with PHP7.2. I suspect that some changes have been made to Ubuntu 17.10 in prep for 18.04.
My environment is on 16.04 and PHP7.0, so unlikely to be related.

rockedge wrote: Thu Mar 22, 2018 11:49 pm that looks like some problem in the API. I have not seen this error before... did anything change as far as URL re-writes goes?
In my case I did nothing other than upgrading the zoneminder packages to v1.31.39.
canbikehere
Posts: 16
Joined: Tue Feb 27, 2018 6:09 pm

Re: Viewing event in zmninja causes this error..

Post by canbikehere »

If I try requesting the same URL directly (in my error log above it was /zm/api/events/5739.json) I get the same error, so this is definitely an API issue as opposed to a ZMNinja issue...
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Viewing event in zmninja causes this error..

Post by asker »

Yup its an API issue with Isaac's Storage Areas branch. I've let him know.
https://github.com/connortechnology/Zon ... /issues/90
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Viewing event in zmninja causes this error..

Post by asker »

The problem was with an invalid Group Model. It was partially coded. I've commented it out. See https://github.com/connortechnology/ZoneMinder/pull/91

Updated: Its merged so if you pull and build, you should have the API working
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Locked