Export to GitHub

fbug - issue #4291

Error message: Image corrupt or truncated: <unknown>


Posted on Mar 26, 2011 by Massive Dog

I often see this message in Firebug's console and don't know what causes it.

32-bit Windows 7 Firefox 4 Firebug 1.7.0

Comment #1

Posted on Mar 26, 2011 by Quick Elephant

I am not able to see the message using your test case.

Comment #2

Posted on Mar 27, 2011 by Massive Dog

Comment deleted

Comment #3

Posted on Mar 27, 2011 by Massive Dog

Comment deleted

Comment #4

Posted on Mar 27, 2011 by Massive Dog

While I am working on a test case, maybe you could contact the author of https://profiles.google.com/anorwood/posts/UNnuaNTsrL9 for details about his case. I found that post via Google. Evidently, I am not the only one experiencing this.

Comment #5

Posted on Mar 28, 2011 by Helpful Camel

i'm getting this message as well on a wordpress site http://www.trailtail.com/wordpress/

Comment #6

Posted on Mar 28, 2011 by Massive Dog

So am I. Thanks, Sarah. Now the devs have a public site to test with.

Comment #7

Posted on Mar 28, 2011 by Happy Rhino

I have been seeing this too, particularly on sites running on localhost (although I see it on Sarah's WP site too). For me, it seemed connected to the favicon. If I remove the line:

the error message disappears. What's strange is that other sites WITH favicons work correctly - could there be some problem with the format of the favicon.ico file? Just a guess, but trying to provide some clue...

My setup is the same as Roman's, except that I am running 64-bit Win7

Comment #8

Posted on Mar 28, 2011 by Quick Elephant

I can see it with the link in comment 5.

Probably a Firefox problem. No line number or file name on error.

Comment #9

Posted on Mar 29, 2011 by Helpful Panda

I had the same problem on an intranet site but when I remove type="image/x-icon" from the link tag no more errors occured.

Comment #10

Posted on Mar 29, 2011 by Quick Elephant

Reported to Mozilla https://bugzilla.mozilla.org/show_bug.cgi?id=646090

Comment #11

Posted on Mar 30, 2011 by Massive Ox

Comment deleted

Comment #12

Posted on Mar 30, 2011 by Quick Elephant

Hi, I think the problem is really in favicon (Win7, FF4) - error pops up even if no favicon is set in document header. Once line added AND .ico file is valid (16x16px) AND in correct place - error disappears.

Pifon

Comment #13

Posted on Apr 6, 2011 by Grumpy Panda

@pifon

Not for me.

Comment #14

Posted on Apr 7, 2011 by Happy Kangaroo

I have the same problem. I have added the information as przemek in comment 12 did, but the problem is still with me.

Comment #15

Posted on Apr 7, 2011 by Quick Elephant

This is a problem which must be fixed by Firefox, see comment 10

Comment #16

Posted on May 2, 2011 by Happy Lion

Comment deleted

Comment #17

Posted on May 4, 2011 by Grumpy Ox

I fixed the problem as per comment 12.

Another thing, you have to make sure that the line is not added twice to your page. Just right click and view page source to search for the particular line with .

I also had the same problem, but adding this line with correct path of .ico file disappeared my problem.

@Raj

Comment #18

Posted on May 4, 2011 by Happy Rhino

Or maybe it's just that FF does not like the icon to be anywhere OTHER than the root dir...? Adding the link with the href value pointing to the favicon file in the root /may/ not make any difference (have not checked - perhaps I should... ;))

Comment #19

Posted on May 6, 2011 by Happy Cat

Fiexed this problem by refering to the absolute location of the favicon (example http://localhost/favicon.ico) instad of just favicon.ico.

Looks like FB/FF is not handeling the URL for favicons correctly.

Comment #20

Posted on May 6, 2011 by Happy Rhino

Tried this absolute url fix:

and it still gives me the error. Which still leads me to believe that the problem is when the favicon is located in some place other than the root.

Comment #21

Posted on May 6, 2011 by Helpful Kangaroo

FBug showed me this error when i tried to load an imagen from my folder. This img doesn't was the favicon. you know something about this? thanks

Comment #22

Posted on May 6, 2011 by Helpful Kangaroo

Comment deleted

Comment #23

Posted on May 15, 2011 by Happy Dog

It's happening because of the caching of the wrong favicon.

In order to get around this problem, clear recent history of everything.

Comment #24

Posted on May 15, 2011 by Massive Dog

Clear history for just the problematic website or everything? The latter isn't practical for me as I've decided to keep history for a long time. So, this can't be a solution.

Comment #25

Posted on May 15, 2011 by Quick Elephant

I'll just repeat: this is not a firebug bug. The only role Firebug has here is to copy the error message into the Firebug console. Please make you comments on the bugzilla bug from comment 10

Comment #26

Posted on May 15, 2011 by Happy Dog

Comment deleted

Comment #27

Posted on May 15, 2011 by Happy Dog

If you can clear only history of problematic site, go ahead. However it is not possible in Firefox to clear only selected website history since it offers time period. For further discussion I strongly agree with John, go ahead and take a ticket on bugzilla.

Comment #28

Posted on May 24, 2011 by Grumpy Panda

I had this problem. I opened the favicon in Irfan and it told me that it was infact a .PNG file with a renamed extension.

I saved the file as in .ICO, put it in my web root and now it all works fine - no Firebug errors.

Not using any tag in the HTML.

Comment #29

Posted on May 26, 2011 by Helpful Lion

As put in comment 28, this is not a Firebug or Firefox error - it's actually a correct response in reading an image that has had it's extension changed from it's original saved format.

In the same way that changing a jpeg's extension to ".gif" doesn't make it a gif, giving a png a ".ico" extension doesn't make it an icon file.

Comment #30

Posted on Jun 6, 2011 by Happy Panda

I solved by converting a png to ico via http://digg.com/news/story/ConvertIcon_Convert_PNG_files_to_ICO_files. Previously, I had saved as png and renamed to ico (my graphic software doesn't allow save as .ico). Actually converting solved.

Comment #31

Posted on Jun 22, 2011 by Quick Kangaroo

I had this problem to on my localhost. As said above the problem was the icon file-type, although it was displayed correctly.

I had converted the image to base64 and rendered it with data:image/gif;base64,[image base64:d]. When it actually should have been data:image/ico;base64,[image base64:d]

Comment #32

Posted on Jul 4, 2011 by Happy Monkey

grrr your right! i did renamed my favicon.png to favicon.ico when i renamed it back to favicon.png. error doesn't appear anymore. thanks!

Comment #33

Posted on Jul 8, 2011 by Grumpy Dog

I renamed my favicon.ico to favicon.gif and it worked.

I got an animated moogle picture :}

Comment #34

Posted on Sep 23, 2011 by Happy Rhino

I have the same problem with a picture that I refresh each 2 seconds (a screenshot of a webcam).

Comment #35

Posted on Oct 7, 2011 by Happy Giraffe

Just changed standard label for platform issues.

Comment #36

Posted on Jan 3, 2012 by Helpful Lion

I have this problem with php extension in random image which I call from img tag.

Comment #37

Posted on Jan 3, 2012 by Helpful Lion

I have this problem with php extension in random image which I call from img tag.

Comment #38

Posted on Jan 3, 2012 by Happy Dog

Completely useless comment without knowing what your img.php actually sends...

Comment #39

Posted on Jan 3, 2012 by Helpful Lion

img.php seds this: header('content-type:image/jpg'); readfile('../pictures/torty/'.$row['src']);

url is corect...

Comment #40

Posted on Jan 3, 2012 by Massive Wombat

Please attach a complete/simple page + description how to use it so, we can run it on our machines and see the problem.

Honza

Comment #41

Posted on Jan 3, 2012 by Helpful Lion

Sorry, but i have it onlz on localhost and i am lazy to do it... Now everithink is ok, but i don't know why. Url was correct, couse if url is incorrect, that error is not avaliable. I realy don't know why. Have a nice deň Honza!

Comment #42

Posted on Feb 7, 2012 by Helpful Lion

was receiving several of these errors seems to have gone when I changed my image paths to load statically from the live web-server instead of a relative path to the images folder. This seems to be an issue with Firefox as the error console also displays this error with no line number.

Comment #43

Posted on Jul 30, 2012 by Happy Ox

a sample code is below. the stackoverflow question that gives more details: http://stackoverflow.com/questions/11727219/image-corrupt-or-truncated-in-firefox

(function (window) { var frames = [ "http://upload.wikimedia.org/wikipedia/commons/6/65/Duerer_%28Marter_der_zehntausend_Christen%29.jpg", "http://upload.wikimedia.org/wikipedia/commons/0/0c/St.Cristopher-D%C3%BCrer.jpg", "http://upload.wikimedia.org/wikipedia/commons/b/b9/D%C3%BCrer-_Rhinoceros.jpg" ];

window.onload = function () {
    var frame_num = 0;
    var image = document.getElementById("image");

    image.onclick = function () {
        frame_num = (frame_num + 1) % frames.length;
        image.src = frames[frame_num];
        return false;
    };
};

})(window);

Comment #44

Posted on Jul 31, 2012 by Massive Wombat

I put the test file (from comment 43) online here: https://getfirebug.com/tests/manual/issues/4291/issue4291.html

But I don't see any warnings. Firebug 1.10 + Firefox 17

Can you verify?

Honza

Comment #45

Posted on Mar 16, 2014 by Swift Ox

Per Raj's comment #17 I had two installations of my site. One for production(live) and one that was a subdomain mirror of the site. They were replicas as one is use to develop on and test new code. At any rate, I had an additional favicon.ico in that installation. Getting rid of it, cleared up my Firebug error.

Status: OtherComponent

Labels:
Type-Defect FF4.0 1.7 Test-case-available platform