dezoomify icon indicating copy to clipboard operation
dezoomify copied to clipboard

blank image (TypeError: Argument 1 is not valid)

Open amadvance opened this issue 4 years ago • 8 comments

Downloading images from www.asmilano.it always fails with "TypeError: Argument 1 is not valid."

An example page is: http://www.asmilano.it/Divenire/document.htm?idDoc=10643414&idUa=10643413&first=0&last=0

The proposed link by Dezoomify is: http://www.asmilano.it/fast/iipsrv.fcgi?FIF=/opt/divenire/files/./tifs/05/36/536992.tif

Downloading that link with Dezoomify always fails. It takes few minutes, and you see that the tiles download gets to 100%, but at the end of the process you always get:

TypeError: Argument 1 is not valid for any of the 1-argument overloads of URL.createObjectURL.

(https://ophir.alwaysdata.net/dezoomify/zoommanager.js:133)

amadvance avatar Mar 03 '20 15:03 amadvance

Thank you for the report ! I am moving it to the dezoomify repository, since the problem seems to be with dezoomify.

Edit. See: https://github.com/lovasoa/dezoomify/wiki/Very-large-images

lovasoa avatar Mar 03 '20 15:03 lovasoa

Which browser are you using ? I could not reproduce the issue in the latest versions of chrome and firefox. The image just loads, then the loading message disappears and I can right-click on the image and choose "Save As...". Can you also provide a screenshot ? And does this error occur only on with asmilano.it ?

lovasoa avatar Mar 03 '20 15:03 lovasoa

This is the error I get on Windows 7 with Firefox 73. The connection is behind a proxy.

windows_error

amadvance avatar Mar 04 '20 07:03 amadvance

I've also tried on an Ubuntu 16.04 with Firefox 63. With direct connection to Internet.

It loads the tiles and reach 100% but then it gets stuck with this page. Clicking on the button do nothing. No CPU usage. Just this fixed page.

linux_error

amadvance avatar Mar 04 '20 07:03 amadvance

And the image doesn't appear in any case ? On dezoomify's side, what we can do is provide a better error message.

The root problem seems to be that firefox is refusing to load a large canvas in memory. On your side, you may want to read the page on our wiki about very large images, and either reduce UI.MAX_CANVAS_AREA in the console of increase gfx.max-alloc-size in about:config, which can be dangerous

lovasoa avatar Mar 04 '20 09:03 lovasoa

I made a change in dezoomify, so that if the browser gives it invalid image data, it stops trying to create a download link. Can you try again, if possible with firefox's javascript console opened, and provide a new screenshot ?

lovasoa avatar Mar 08 '20 01:03 lovasoa

This is a new screenshot. The page is completely blank. The console shows the canvas error.

windows_error_2

amadvance avatar Mar 09 '20 13:03 amadvance

OK, the only remaining problem is that firefox doesn't display the canvas. You can fix that by changing gfx.max-allox or UI.MAX_CANVAS_AREA : https://github.com/lovasoa/dezoomify/wiki/Very-large-images

lovasoa avatar Mar 09 '20 14:03 lovasoa