Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Saturday, May 7, 2016

Images failing to load in IE with DOM: 7009 error (unable to decode) in console

Images failing to load in IE with DOM: 7009 error (unable to decode) in console


When loading many images on a single page in IE (reproduced in IE11), some of them begin to fail to load, and have something similar to the following warning in the console:

DOM7009: Unable to decode image at URL: '[some unique url]'.

When I look at the network traffic, there does appear to valid responses received for each of these images from the server. It's not always the same images each time. If I use the dev tools to force the image to reload (example: I update the url to include some some extraneous url parameter "&test=1"), it loads/renders normally without error. I've reproduced this behavior with different types of images (jpegs/pngs; example png included below). It seems to happen more frequently as the number of images go up, and may also have some correlation with the size of each image.

Any thoughts as to what might be causing this? Potential work-arounds? Any help is appreciated.

Sample PNG

Answer by drew for Images failing to load in IE with DOM: 7009 error (unable to decode) in console


I get the same issue frequently with IE11 and I can't pinpoint what is causing it. However, it starts to happens right after JavaScript has crashed. I'ts not an imgur problem, its an IE11 problem.

The only way that I have been able to get out of the issue is to crash explorer and reload it or reboot.

Answer by dougajmcdonald for Images failing to load in IE with DOM: 7009 error (unable to decode) in console


If it's of any use I have been seeing this on my WinJS application and I believe it's a way of renderer reporting that it's out of memory (albeit cryptically!)

Reason I say that is that if I load an compressed png image which is say 500KB, but large in terms of pixel dimensions I get this problem.

E.g.

If I try this with a 20000 x 6000 image I get this error sporadically, which I'm guessing is because it's 20000 x 6000 x 4 (480,000,000 bytes) or ~480MB.

If I try this with a 14000 x 6000 it would be ~336MB which seems OK and I have yet to get the error.

If I try this with a 35000 x 20000 image ~2.8GB it always happens.

Answer by user1069816 for Images failing to load in IE with DOM: 7009 error (unable to decode) in console


I had this problem in a site hosted in IIS due the X-Content-Type-Options header being set in a parent applications web.config like this:

                                             

Removing it in the applications web.config fixed it:

    

Answer by rfontoura for Images failing to load in IE with DOM: 7009 error (unable to decode) in console


The problem I was facing off was similar. I have a Java web application which shows pages and thumbnails of a document through Servlet requests, which responds to the browser sending PNG images. Like @user1069816 said, the responses were arriving with a header that was causing the problem "Unable to decode image":

X-Content-Type-Options: nosniff  

In my case, this header were introduced by Spring Security. Besides this is a security mechanism for Internet Explorer to avoid XSS attacks, the fastest solution to disable this header on response were putting the following line on the application context file of Spring Security, headers section:

                                  

This problem were only happening on Internet Explorer 11. Not in Chrome or Firefox.

Answer by pnairn for Images failing to load in IE with DOM: 7009 error (unable to decode) in console


I experienced this same error on a page that was essentially an image gallery, where each image was being loaded at full resolution as the thumbnail. The page weight was approx 220mb. Some of the thumbnails weren't loading, and the "unable to decode image at url" error was being given as the reason.

However, IE could load up each image individually by viewing the image's URL directly, which I think means there wasn't a problem with the image type/encoding. So while IE11 could load up the individual image, it couldn't load up all the images as thumbnails (and the images that weren't loaded changed each time the page was refreshed).

My workaround was to display a low res thumbnail on the page (page weight changed to 220kb), and have the thumbnail link to the full, hi-res image.

It would be worth checking if you can reduce the dimensions of the images served, and also the file size.

Answer by ivanreese for Images failing to load in IE with DOM: 7009 error (unable to decode) in console


I've encountered this error as well ?IE 11.0.9600.18059. According to my testing, it was almost certainly due to the amount of memory consumed by the tab (eg: adding extra DOM elements increases the memory usage) ?not to be confused with the amount of data loaded over the network.

Using the memory profiler, I found that errors occurred once memory usage hit a ceiling around 1.5GB. This caused the following weirdness:

  1. Some images would be loaded, but wouldn't render. They'd show up as an empty space in the page (with the correct dimensions), as though the image had been set to visibility: hidden.
  2. Some images would be loaded, but would fail to decode. They'd show up as a small black box with an X. These images would also show a DOM7009 error in the console.
  3. Flash SWFs would show up as black boxes.
  4. Other random weirdness.

Different images/SWFs would be affected each time I reloaded the page.

The solution for me was to simply adjust the way the page is designed, so it's not causing IE to consume as much memory.

Answer by Richard Jones for Images failing to load in IE with DOM: 7009 error (unable to decode) in console


I had a similar problem where a file was reported in the HTTP headers as a JPEG but was in fact a PNG. Changing the filetype to match the file or removing the "X-Content-Type-Options" header fixed the problem.

Answer by Trilok Pathak for Images failing to load in IE with DOM: 7009 error (unable to decode) in console


Yes i got same issue in the IE11 when i load images it was giving me error "

  • DOM7009: Unable to decode image at URL and in all other browser it work like a charm,

After lot of googling finally came on the conclusion as below :

in the Web.config file ::

                                                                                     

Please see the commented code i have removed the "X-Content-Type-Options" and it works !!!


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.