Page MenuHomePhabricator

Error: Invalid LatLng object: (NaN, NaN)
Open, LowPublic

Description

This error appears inside the map overlay for example https://fr.wikipedia.org/wiki/Le_Mans#/maplink/1 on mobile safari on an iPhone

https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.12.03/clienterror/?id=AXYpvjOYISDMpKoGUS3K

It seems to mostly occur on Wikimedia Commons on mobile on iPhone devices.

at new L.LatLng  URL1:175:442
at Object.unproject  URL1:180:333
at Object.pointToLatLng  URL1:180:826
at NewClass.unproject  URL1:195:615
at NewClass.layerPointToLatLng  URL1:195:760
at NewClass._fireDOMEvent  URL1:202:145
at NewClass._handleDOMEvent  URL1:201:409
at HTMLAnchorElement.handler  URL1:211:775

URL1: https://commons.m.wikimedia.org/w/load.php?lang=en&modules=dataValues%2Cjquery%2Cmapbox%2Coojs%2Coojs-router%2Coojs-ui-core%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%7CdataValues.DataValue%7Cext.categoryTree%2CeventLogging%2Ckartographer%2CnavigationTiming%2CwikimediaEvents%7Cext.centralNotice.choiceData%2CgeoIP%2CstartUp%7Cext.centralauth.ForeignApi%2Ccentralautologin%7Cext.kartographer.box%2Cdata%2Cframe%2Csite%2Cutil%7Cext.kartographer.lib.topojson%7Cext.wikimediaEvents.wikibase%7Cjquery.client%2Ccookie%2Cthrottle-debounce%7Cmediawiki.ForeignApi%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Crouter%2Cstorage%2Ctemplate%2Cuser%2Cutil%2Cviewport%7Cmediawiki.ForeignApi.core%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.mustache%2Cmustache%2Bdom%7Cmediawiki.ui.anchor%7Cmobile.init%2Cstartup%7Cmobile.messageBox.styles%7Cmobile.ooui.icons%7Cmobile.pagelist.styles%7Cmobile.pagesummary.styles%7Cmobile.placeholder.images%7Cmobile.startup.images%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-media%2Cindicators%7Cskins.minerva.icons.images.scripts%7Cskins.minerva.icons.images.scripts.misc%7Cskins.minerva.icons.page.issues.default.color%7Cskins.minerva.icons.page.issues.medium.color%7Cskins.minerva.icons.page.issues.uncolored%7Cskins.minerva.options%2Cscripts%7Cuser.defaults%7Cutil.inherit%7Cwikibase.api.RepoApi%7Cwikibase.datamodel%7Cwikibase.mediainfo.base%2Csearch&skin=minerva&version=1nmnl

Event Timeline

thcipriani added subscribers: egardner, thcipriani.

Adding Structured-Data-Backlog per @egardner in triage meeting.

Error is still present in 1.36.0-wmf.31

Happens mostly on commons (but not limited to commons)
139 messages in the logs in the past 24 hours (not super common)

Invalid LatLng object sounds like an error from the Leaflet.js library (which is used by Kartographer to produce interactive maps).

I thought this might have something to do with the Structured Data UI on Commons File pages (which uses Kartographer to display and edit coordinate data on files). However, after poking around on Commons file pages that include coordinate data & Kartographer UI elements (including using the iOS simulator and mobile safari), I'm not seeing this error. Not sure what the cause of the underlying problem is, but I don't think WikibaseMediaInfo (our extension) has anything to do with it.

Error is thrown here: https://gerrit.wikimedia.org/g/mediawiki/extensions/Kartographer/+/ef6964df043285e91fb7c6e69ff48c9db2969582/lib/external/mapbox/mapbox-lib.js#1720

This seems hard to track without the failing browser to see more
It seems not a issue with validation of the input data for the map, more an issue on the client side when looking at the data.