X
Tap here to go to the mobile version of the site.
Scheduled maintenance: Thursday, April 2, between 3pm and 5pm UTC. This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn’t solve your issue and you want to ask a question, we have our support community waiting to help you at @firefox on Twitter

Support Forum

Why does FireFox incorrectly report "The image /path/imageFileName cannot be displayed because it contains errors."

  • No replies
  • 1 has this problem
  • 6 views
Posted

Running FireFox Quantum 67.0.4 on Windows 10.

While developing a .NET Core 3.x WebAPI I was attempting to retrieve an image from the root and getting the following error: "The image /path/imageFileName cannot be displayed because it contains errors."

I then attempted to retrieve the image using Google Chrome and it provided a more correct error message: This localhost page can’t be found No webpage was found for the web address: https://localhost:5001/tmp547E.jpg

I noticed that even if I change the path to a file that doesn't exist FireFox still gives me this error.

Also, if I attempt to retrieve an HTML page that doesn't exist (https://localhost:5001/doesNotExist.htm) I see no error or any content at all in FireFox.

I do see one error message in FireFox console but it really isn't relevant to non-existent content: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." doesNotExist.htm

However, in contrast, if I attempt to retrieve the page via Google Chrome then I get a valid error: This localhost page can’t be found No webpage was found for the web address: https://localhost:5001/doesNotExist.htm HTTP ERROR 404

Why doesn't FireFox provide 404 (not found) errors on localhost?

Running FireFox Quantum 67.0.4 on Windows 10. While developing a .NET Core 3.x WebAPI I was attempting to retrieve an image from the root and getting the following error: "The image /path/imageFileName cannot be displayed because it contains errors." I then attempted to retrieve the image using Google Chrome and it provided a more correct error message: This localhost page can’t be found No webpage was found for the web address: https://localhost:5001/tmp547E.jpg I noticed that even if I change the path to a file that doesn't exist FireFox still gives me this error. Also, if I attempt to retrieve an HTML page that doesn't exist (https://localhost:5001/doesNotExist.htm) I see no error or any content at all in FireFox. I do see one error message in FireFox console but it really isn't relevant to non-existent content: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." doesNotExist.htm However, in contrast, if I attempt to retrieve the page via Google Chrome then I get a valid error: This localhost page can’t be found No webpage was found for the web address: https://localhost:5001/doesNotExist.htm HTTP ERROR 404 Why doesn't FireFox provide 404 (not found) errors on localhost?
Quote

Additional System Details

Application

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0

More Information

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.