Firefox 65: possible PNG regression related to WEBP
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
People
(Reporter: gustavo, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
Tried to load this URL:
https://static-common.isoftbet.com/certification_spain/fun/dev/assets/asset_logo_all_r0.png?lid=338
and the image seems to be regarded as WEBP, even though it is a PNG and the server sends image/png as the mimetype.
Tried to load this game:
https://stage-game-launcher-lux.isoftbet.com/338/881521?lang=EN&cur=EUR&mode=0
and it gets stuck at the end of the progress bar.
Actual results:
The image is seen by Firefox as WEBP. One can see that by
right click on the image -> view image info
The game gets stuck ad the end of the progress bar.
Expected results:
The image should be seen as PNG and the game should load.
Game developers say that the game not loading is related to the handling of the PNG image assets described above.
This problem has been introduced by Firefox 65, This has been reproduced on both Ubunt 16.04 and 18.04 64 bits. Firefox 64 and Chrome work fine.
Important notes
- downgrading to version 64 makes the game load
- upgrading the version 65 with a new profile makes the game not load
- under unknown circumstances the game loads with Firefox 65 even if the cache was cleared (something is stored somewhere?
| Reporter | ||
Comment 1•6 years ago
|
||
The PNG image mimetype was checked with:
curl -s -I https://static-common.isoftbet.com/certification_spain/fun/dev/assets/asset_logo_all_r0.png?lid=338 |grep Content-Type
| Reporter | ||
Comment 2•6 years ago
|
||
Support question which might be related:
| Reporter | ||
Comment 3•6 years ago
|
||
| Reporter | ||
Comment 4•6 years ago
|
||
Possible solution would be removing image/webp from:
network.http.accept.default text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
but not clear why.
Comment 5•6 years ago
|
||
hi, i am no longer able to reproduce that behaviour in firefox 66 - possibly due to bug 1417463...
could you try out beta or nightly and confirm that?
| Reporter | ||
Comment 6•6 years ago
|
||
I will try, thanks for the suggestion.
Meanwhile, do you understand what is going on and why it would be fixed on 66?
From the changesets on bug 1417463 is seems that the "image/webp" component is removed from the preference above.
https://hg.mozilla.org/mozilla-central/rev/74e1cead8dcf#l8.12
https://hg.mozilla.org/mozilla-central/rev/2a7dce7a42ea#l1.8 (test code)
| Reporter | ||
Comment 7•6 years ago
|
||
I confirm that on Firefox 66.0b6 with a clean profile:
- the PNG image is no longer seen by Firefox as webp
- the game loads
Also, the preference:
network.http.accept.default
does not exist on Firefox 66.0b6.
Comment 8•6 years ago
|
||
The URL https://static-common.isoftbet.com/certification_spain/fun/dev/assets/asset_logo_all_r0.png?lid=338 loads fine for me in Firefox65 and Firefox66 on windows 10.
Please reload the image with a ctrl+f5 (forced reload) while you have the developer tools (F12) networking tab open.
You should see that the server sends the image back as "content-type image/webp" with Firefox65.
This would be a server bug if the content is PNG server sends image/webp as header.
You mime type checking with curl doesn't matter because you request the URL with different headers.
| Reporter | ||
Comment 9•6 years ago
|
||
On Firefox 65 on Ubuntu the image is sent as webp and the content of the image is also webp. The URL has png but the actual content that is sent seems to be webp.
| Reporter | ||
Comment 10•6 years ago
|
||
network tab
| Reporter | ||
Comment 11•6 years ago
|
||
| Reporter | ||
Comment 12•6 years ago
|
||
If I save the image on Firefox 65 I get a file with .webp extension. The command line utility named 'file' detects type:
RIFF (little-endian) data, Web/P image
| Reporter | ||
Comment 13•6 years ago
|
||
Further info:
curl -s -I -H "Accept: image/webp" https://static-common.isoftbet.com/certification_spain/fun/dev/assets/asset_logo_all_r0.png?lid=338 |grep Content-Type
returns
Content-Type: image/webp.
It seems that the server actually sends webp if the client declares to support it. Does Firefox 65 on Windows Behave differently?
Interestingly, Chrome also sees the image as webp, however it loads the game correctly.
Comment 14•6 years ago
|
||
The image URL works for me using Firefox65 on linux (Ubuntu build).
Is it possible that you use a build that doesn't have the support for webp ?
Can you check the result with this build: http://ftp.mozilla.org/pub/firefox/releases/65.0/linux-x86_64/en-US/ ?
Extract the archive to /tmp/ , close the current Firefox version and start the Firefox from /tmp/
| Reporter | ||
Comment 15•6 years ago
|
||
(In reply to Matthias Versen [:Matti] from comment #14)
The image URL works for me using Firefox65 on linux (Ubuntu build).
The image URL also works for me, but the image appears as webp.
Does the game load for you?
Is it possible that you use a build that doesn't have the support for webp ?
It has support for webp and the image appears we webp. I was told that, as a consequence, the game does not load.
Can you check the result with this build: http://ftp.mozilla.org/pub/firefox/releases/65.0/linux-x86_64/en-US/ ?
Extract the archive to /tmp/ , close the current Firefox version and start the Firefox from /tmp/
The image appears as wepb, the game does not load.
Comment 16•6 years ago
|
||
It has support for webp and the image appears we webp. I was told that, as a consequence, the game does not load.
Sorry, that was a misunderstanding from my side. I thought the image would not work at all.
This doesn't seem to be a browser bug if the game doesn't work if the server sends a webp image instead of a png.
If the game expects a PNG it should send a png and not a webp image.
| Reporter | ||
Comment 17•6 years ago
|
||
(In reply to Matthias Versen [:Matti] from comment #16)
It has support for webp and the image appears we webp. I was told that, as a consequence, the game does not load.
Sorry, that was a misunderstanding from my side. I thought the image would not work at all.This doesn't seem to be a browser bug if the game doesn't work if the server sends a webp image instead of a png.
If the game expects a PNG it should send a png and not a webp image.
That makes sense. However, could it be something subtle?
For example, with Chrome the image is also sent as webp but the game loads without problem (same Flash version 32.0.0.114 but PPAI instead of NPAPI).
And on Firefox 66b6 the game also loads (see above about the missing preference https://bugzilla.mozilla.org/show_bug.cgi?id=1526500#c7).
Should I expect that on Firefox 66 final the situation does not occur?
(because the content negotiation policy is going to be changed?)
Comment 18•6 years ago
|
||
Yes, the game should work with Firefox66 final.
This is the accept header for Firefox65 for the image:
Accept text/html,application/xhtml+xm…ml;q=0.9,image/webp,/;q=0.8
Firefox65 accepts image/webp with the same priority (0.8) as everything else (/) and that includes png.
The server sends a webp image with this accept header and that itself should not be a problem.
I do not know why the game doesn't work with a loaded webp image but you have to ask the developers of this game about the reasons.
This is the changed accept header from Firefox66:
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
image/webp isn't explicit mentioned but it's included in the general part of the header (/).
The server is sending a png image and the game seem to work. I didn't test because I do not have flash installed.
I will mark this report worksforme because it works with Firefo66.
This report looks more or less invalid for Firefox65 because the game should work with webp images or it should not send this image as png despite the changed accept header.
| Reporter | ||
Comment 19•6 years ago
|
||
Hi Mathias,
I'm note sure I follow your description of the accept header situation on Firefox 65. Please forgive me for some possible inaccuracies on my side as the first time I became aware of formats depending on browser negotiation was some days ago, in front of this problem.
It seems to be that Firefox 65 is priorizing WEBP over PNG, isn't it?
I investigated a bit more and found this:
http://kb.mozillazine.org/Network.http.accept.default
"A comma-seperated list of MIME types with optional "q" (quality) values. A quality value says that the application prefers one type over another, but supports both. Quality values can be from 0 (not supported) to 1 (preferred format). If a quality value is omitted, it defaults to 1. "
On Firefox 65, inside the value of network.http.accept.default the entry image/webp does not have a "q" value, therefore it should be assumed to be 1. Which means WEBP images will have priority over any other images.
On Firefox 66 I don't have the pref set but looking at the header you posted that does not list WEBP specifically, it seems that both WEBP and PNG fall into the same "q" value, i.e., 0.8. Probably that is why the server is defaulting to PNG.
In regards to what we should expect from Firefox 66 final... do you know if the BETAs have the same configuration than the finals, in terms of preferences? I am asking this because I found two online references of with current (Firefox 65) preference value:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept
If you look for webp on the links above you will see the image/webp string without the "q" value. If this is the official configuration could it be that it gets applied for 66 before it is final? Or will these documents be aligned with the (at least apparent) change of policy between 65 and 66?
| Reporter | ||
Comment 20•6 years ago
|
||
I do not know why the game doesn't work with a loaded webp image but you have to ask the developers of this game about the reasons.
I will contact the developers of the game as soon as soon I understand what image negotiation policy will be in place for Firefox >= 66. This is necessary to decide what can be requested to them (having in mind that for Chrome the game loads with WEBP images so the reason for the game not loading in Firefox being still unclear - clarification could be relevant or not to clarify depending on which image negotiation policy prevails).
Comment 21•6 years ago
|
||
It seems to be that Firefox 65 is priorizing WEBP over PNG, isn't it?
Why would it matter if Firefox would indeed prefer Webp (it's not the case) ?
Right, nothing as long as Firefox accepts PNG and it does that with the general "* / *" header.
Some day the Firefox developers may change the accept header again and give webp a higher priority and that would not be wrong.
The game should either accept image/webp or the server should not serve that image format to Firefox.
image/webp is in a list with "/" in the 0.8 group and that means it it has the same priority.
The difference between 64+66 and 65 is that in 65 the png format gets explicit mentioned in the accept header.
The only valid bug in Firefox would be if something is wrong with the webp support in Firefox but it's unknown why webp breaks this game in Firefox and only the developers of that game can answer that question.
Another change in the accept header for 66 Beta is very unlikely and that means that the current header should be the same as in 66.
| Reporter | ||
Comment 22•6 years ago
|
||
Hi Mathias,
Thanks. I hear you!
The game should either accept image/webp or the server should not serve that image format to Firefox.
I fully agree. The difficulty is that for Chrome (and probably others) games work with WEBP, so it might be something subtle on Firefox or something subtle in their game that has always been there and was merely uncovered by the initial Firefox WEBP support from 64 to 65. And doesn't seem to be practical do serve things based on User Agent so either the server serves WEBP to browsers that prefer it to other formats or it doesn't serve to any.
Some day the Firefox developers may change the accept header again and give webp a higher priority and that would not be wrong.
I agree. For sure it would not be wrong. I'd say it is good to have some mid-term stability on this type of thing.
The difference between 64+66 and 65 is that in 65 the png format gets explicit mentioned in the accept header.
WEBP is mentioned with "w" which implicitly means "q=1", whereas "p=0.8" for the general content "/".
Another change in the accept header for 66 Beta is very unlikely and that means that the current header should be the same as in 66.
I think Flash games will gradually disappear. Therefore, if these games run on Firefox >=66 with the default settings (receiving PNG...) it is probably best to leave things as they are.
I will check Firefox 66 as soon as it gets released.
Thanks a lot for your support! :-)
| Reporter | ||
Comment 23•6 years ago
|
||
ERRATA:
WEBP is mentioned with "w" which implicitly means "q=1", whereas "p=0.8" for the general content "/".
WEBP is mentioned without "q" which implicitly means "q=1", whereas "p=0.8" for the general content "/".
Description
•