Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

<mapframe> allows bigger width values than Kartotherian (snapshot) can handle
Open, Needs TriagePublicBUG REPORT

Description

I have a mapframe with karthographer showing the results of a wikidata sparql query. It works for some users (for me) and it doesn't for others without obvious reason. It also seems to be depending on the browser (map not shown in Firefox, but shown in Edge for some users).

Klicking on the map and opening the map in full size seems to work for all users.

Browser console error reported: OpaqueResponseBlocking: nosniff is true and mimeType is an opaque-blocklisted MIME type or its essence is 'text/plain

The mapframe also does not show in the Wikipedia App on the mobile (for me). - just a remark, nobody investigated it on the mobile and the behaviour might have a different cause.


The map is generated via https://de.wikipedia.org/wiki/Vorlage:Karte_von_Denkm%C3%A4lern_(%C3%96sterreich). An example call is included. I do not think that the map is the root cause, as the problem is user dependent.

Event Timeline

New observations (hint to reproduce the problem):

the empty map is shown, when the text size in the browser window is enlarged to values > 100%.
Everything is ok, if text size is smaller than 100%.

I observe the same error as mentioned above.

fails unexpectedly by OpaqueResponseBlocking: "nosniff is true and mimeType is an opaque-blocklisted MIME type or its essence is 'text/plain'

This just means that an HTML json error page was returned instead of the image.

curl 'https://maps.wikimedia.org/img/osm-intl,a,a,a,1200x250@2x.png?lang=de&domain=de.wikipedia.org&title=Vorlage%3AKarte+von+Denkm%C3%A4lern+%28%C3%96sterreich%29&revid=241226507&groups=_cd662694171e2e8dffd9daba590026964ed57f21'

The request returns "image created from bytes must be 2048 pixels or fewer on each side". This is a limit in node_mapnik, used by Maps (Kartotherian) which defaults to 2048. As we limit to 1200, that default is too low and should be 2400.

This is likely due to the usage of width=100%. Combined with some people having retina screens (and thus requesting images twice the size of other users) explaining the user variance.

What's strange is that this was never reported before... I wonder what changed.

This is likely due to the usage of width=100%

Width is set to 1200px here as workaround to T354239. width=full appears to use 800px wide static image, as Thiemo wrote earlier.

I suppose Kartographer shouldn't allow width values that snapshot service can't handle (both with and without scaling), and snapshot service shouln't try to scale to widths that exceed its width limit?

Pikne renamed this task from <mapframe> (karthographer) fails unexpectedly by OpaqueResponseBlocking: "nosniff is true and mimeType is an opaque-blocklisted MIME type or its essence is 'text/plain' to <mapframe> allows bigger width values than Kartotherian (snapshot) can handle.Jan 16 2024, 1:54 PM

ok. then set it to 1024. That's the max that will work right now.

I set the max width now to 1024 and it works also when zoom > 100%.
Thanks.

Can somebody please document the limit on all appropriate places.
At least https://www.mediawiki.org/wiki/Help:Extension:Kartographer.