Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New thumbnails don't load in Events List and 24hr Preview #599

Closed
Iruberiam opened this issue Mar 15, 2018 · 8 comments
Closed

New thumbnails don't load in Events List and 24hr Preview #599

Iruberiam opened this issue Mar 15, 2018 · 8 comments

Comments

@Iruberiam
Copy link

Iruberiam commented Mar 15, 2018

Before you create an issue, please make sure you have read the FAQ at https://github.com/pliablepixels/zmNinja/wiki/FAQ. Common questions on API, no image etc are covered there.

I've read the above and didn't see my particular issue there.

Platform & OS Version
Windows 10 Pro x64

The version of the app you are reporting:
1.2.515D

Device details:
PC

What is the nature of your issue
Bug

Details
The new thumbnails do not show on the event view or in the 24hr Preview views, Instead it displays a Grey placeholder and a "loading" icon in the events list and placeholders in the 24hr Preview. however I can view the image by clicking the placeholders.
I did update the API to the recommended version and I have restarted the server several times.

Thanks for your awesome work on this project, I'd be lost if I had to go back to using the web interface.

image
image

@pliablepixels
Copy link
Member

Do you see any errors in Apache error log? This feature needs image.php in ZM which was added in 1.30

@Iruberiam
Copy link
Author

Iruberiam commented Mar 16, 2018

Yes, this

[Fri Mar 16 01:37:06.696371 2018] [:error] [pid 2625] [client 192.168.1.4:57553] PHP Fatal error: Uncaught Error: Call to undefined function imagecreatefromjpeg() in /usr/share/zoneminder/www/views/image.php:138\nStack trace:\n#0 /usr/share/zoneminder/www/index.php(213): require_once()\n#1 {main}\n thrown in /usr/share/zoneminder/www/views/image.php on line 138

Is show repeatedly at the end of the log. I'm running ZM v1.30.4

I am also getting these errors

[Fri Mar 16 02:14:42.497733 2018] [:error] [pid 2514] [client 192.168.1.4:60432] PHP Warning: file_put_contents(/usr/share/zoneminder/www/api/app/tmp/logs/cake_error.log) [<a href='http://php.net/function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: No such file or directory in /usr/share/php/Cake/Log/Engine/FileLog.php on line 142

[Fri Mar 16 02:14:42.497916 2018] [:error] [pid 2514] [client 192.168.1.4:60432] PHP Warning: file_put_contents(/var/log/zmerror.log) [<a href='http://php.net/function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: Permission denied in /usr/share/php/Cake/Log/Engine/FileLog.php on line 142

`

@pliablepixels
Copy link
Member

pliablepixels commented Mar 16, 2018

These look like Zoneminder installation issues.
Given you are having general image issues across multiple screens (not live, I suppose) this means your ZM install has issues.

There are several threads in the ZM forum for missing packages. Did you check the forum?
Some threads I found:

a) For the image error: https://forums.zoneminder.com/viewtopic.php?t=23073&start=60
b) For Cake issues, looks like permissions are not set properly

@Iruberiam
Copy link
Author

Iruberiam commented Mar 16, 2018 via email

@pliablepixels
Copy link
Member

pliablepixels commented Mar 16, 2018

Your original post says "Events" and "24 hr preview". If its events, then its not only new features. Which part of events is working and which part is not?

Edit: ah you mean the new event thumbnail. Ok looking into my code

@pliablepixels
Copy link
Member

pliablepixels commented Mar 16, 2018

So both the events thumbnail and the 24hr montage rely on this feature:

view=image&fid=XXXX where fid is the "frameId". This feature was added in May 2016, and was part of 1.30.

So yes, please look at your ZM backed to make sure you are not missing libraries, especially php5-gd

zmNinja scales images (while the ZM web console does not by default) so the offending code in ZM doesn't get called in ZM console
https://github.com/ZoneMinder/zoneminder/blob/ed3e975e5a854088e05c90547db6a430dae06b0d/web/views/image.php#L135

@Iruberiam
Copy link
Author

Iruberiam commented Mar 17, 2018

I've reinstalled PhP with GD and installed libgd which was apparently missing, I'm running on Debian 9 and this seems to be a thing.

The new thumbnails now display, so I'm very happy. You do a great job, thanks so much.

Edit: Sorry for doubting your code.

@pliablepixels
Copy link
Member

glad you got it resolved. Feel free to bring up potential issues - that's how I'll iron out bugs in the code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants