0
Fixed

[2.0] pdf thumbnails missing in safari

Matthieu 8 years ago updated by Tom 8 years ago 13

Hi again Tom,


For me all pdf are missing their thumbnails. It was working before, with latest release 1.x.

I have the thumbnails for all other types (cbr, epub, ...)


I tried several rescan, server reboot as well as entire library deletion. Still the same.


Java version: 1.8.0_121

Max heap size available: 910 MB

OS name: Linux

OS version: 3.16.0-4-686-pae

OS architecture: i386

Ubooquity 2.0.0 built on 2017-04-15 at 09:21


Cleared the browser cache (safari). NIL help.

While I was writing this, I checked via Firefox... it works there... :-(

Safari on Mac & iOS does not display them.


I remember we faced this before, due to OS X bug, and could be resolved using https. But that was not related to pdf (any thumbnail was affected)

As I said, I did not change any thing on my side except ubooquity to 2.0 (I still have https from web to apache then http from apache to jetty)


Thanks for your usual support

Matthieu

Under review

That's weird.

I guess one could understand that due to a version change of the PDF rendering library some covers are not generated, but that PDF thumbnails are missing only in Safari, I don't get it.

Once they are generated, there is absolutely no difference between the thumbnail of a PDF and the thumbnail of a CBR/Z.


The Safari specific bug you mentionned (HTTP pipelining) has has been fixed in 2.0.0 (and in Safari for iOS 10 by the way) thanks to the use of Jetty as internal web server, so it's a different problem.


I will need a bit more data to understand what's going on. Perhaps you could try a few "variations" (try with a direct connection, on other PDF, I don't know...) and see if a pattern emerges.



I can confirm this reproduces for me as well on 2.0.2.
Safari Version 10.0 (12602.1.50.0.10) on MacOS Sierra 10.12.
The thumbnails for PDFs show up fine in Google Chrome Version 57.0.2987.133 (64-bit) on the same machine.


Noteworthy perhaps that folders that contain nothing but PDFs still get a thumbnail (this is of course without having a folder.jpg), so something is generating fine for that case but not the other. You can then drill down into the folder and none of the PDFs theselves have a thumbnail.



"Good" :s to know that it's not specific to me ;-)


Tom, tell me what you need and I'll give, even admin access. But for now I'm struggling to identify what I could do to support you...


Perhaps I missed to say that I have the same behavior via http et https, via direct or proxy access.

I have many PDF, from various sources and ages, therefore do not expect the issue to be file settings or name related.


Thanks,

Mat

This one's really a mystery to me.

So yes, having acces to the admin panel of a Ubooquity instance that has the problem could help.


You can contact me directly by email (and in french ;)) at the usual adress: tom at vaemendis dot net.


Keep in mind that providing admin access potentially exposes the whole file system to me.

I won't abuse that of course, but you have only my word, no technical protection.

Tom,

Dummy question but... I could not find in the admin HMI how to change the admin pwd??

(I want to do so before giving you the access)


EDIT: will create a dedicated thread...

I though about the reverse proxy setting. Nop, no joy...

I'm not using reverse proxy FWIW.

+1

I am also getting this issue. On ios it happens on Safari, Chunky browser and the Chrome browser.

So, Tom... I think I find something for you, and that should be in your code :-)


I did some code inspection in safari & firefox, just to compare.


Fox cbs/cbr, thumbnails are visible. Code is something like:

<img src="/comics/comics/1408/Terminus%201%20-%20T01%20-%20L%27Homme%20a%20la%20valise%20%282016%29.cbr?cover=true">


For pdf, thumbnails are missing in safari, not in firefox. Code is something like:

<img src="/comics/comics/1413/Titania%20One%20Shot%20%281987%29.pdf?cover=true">


I could update in safari the interpreted code for pdf (just above) and replace ".pdf" by ".cbr".

And then... tadaaaaa: it works! Thumbnail appears! :-)


Therefore I suspect, at the same time:

- a typo error somewhere in your code for rendering/management of pdf thumbnail links (but not creation)

- the usage of such img src information to be more strict in safari and OS X / iOS webkit than in other browser & webkit (as usual ;-))


Could you dig in your code with such info & advise?


Thanks

Matthieu

Thanks for the investigation !

I'll take a look asap (got a baby last week, so I don't have much time for anything else these days :) ).

obvious priorities! Félicitations! :-)

+1
Fixed

Thanks ! :)


So, this one was tricky.

Turns out Safari doesn't like images with a application/pdf MIME type.

That's understandable.

Fixed, will be part of next release (2.0.3).

congratulations! :)