mapbox-gl-js started to log `unknown command X` error into chrome console

Created on 26 Feb 2019  Â·  14Comments  Â·  Source: mapbox/mapbox-gl-js

Without any updates to our production we got strange issues logged into Chrome console. In current release, in previous, tried to reject several version and still have issues which didn't exist before.

Issues themself are weird. It's hard to understand what's wrong. It might be not mapbox but zone.js problem (we use angular 7.1.4), or the way how mapbox is built and connected in our project (webpack task).

I found the source of issue here:
https://github.com/mapbox/mapbox-gl-js/blob/e0c4d4679d06be7c0f51970b26a184f8d9ed6d5b/src/util/evented.js#L136

First debugger comes to line 130 then on the next call gets to 136. And issue is logged. Event type is
'error' but which error, who knows.

Question:
Is this possible that the way mapbox tileserver works is changed?
It seems we got tiles (or tiles data) loading issues logged.

mapbox-gl-js version:
Both 0.52.0 & 0.53.0

browser:
Chrome Version 72.0.3626.119 (Official Build) (64-bit)

Steps to Trigger Behavior

  1. Just render map with connected custom style which has hidden layers with data
  2. Open Chrome console

Expected Behavior

No issues logged, or at least issues with sane description

Actual Behavior

Issues logged, map works as expected

release blocker

Most helpful comment

@cammanderson we're investigating this ASAP — thanks for the thorough description. This likely has to do with our vector tile compositing server; we'll roll back to the previous version while we're figuring out what's going on.

All 14 comments

The errors look like they're about badly encoded vector tiles, but we won't be able to diagnose the issue with just the screenshots — we would need a minimal reproducible live test case (e.g. on JSFiddle).

Hi @mourner ,

Yesterday we noticed the same issue. I have raised this with the mapbox support but there hasn't been any response yet. I don't think this is a mapbox gl js issue as such, as it spans across multiple versions and has happened without code changes.

It appears that yesterday (about maybe 8-12 hours ago), that combined tiles using tilesets uploaded to mapbox started causing the "unknown command" in the loadGeometry call. Our JS tracking/graphs has spiked which alerted us to the issue. When we remove custom vector tiles and leave the standard mapbox streets etc the issue goes away. (e.g. unable to reproduce just using basic mapbox styles using the streets/terrain vector tiles).

We saw this issue on our production code across a spectrum; multiple releases of mapbox - from before 0.50.0 right up to 0.53.0 etc - codebase from years ago as well as current. It also is happening inside Mapbox Studio on affected styles. We tried to remove some of our vector tiles which seemed to lower the chances of the issue - and so far have pushed a new style reducing map data as an attempt to mitigate - but we still occasionally get these loadGeometry/unknown command issues.

The affected tilesets even were not modified since 2016. The styles were not modified either and no new data uploaded/added. It's not a style update/source vector tile update that is causing it.

We could see the issue quickly by zooming in on a label (e.g. from zoom 10 through to zoom 16), but only on certain parts of the world - as I assume is due to bad tileset encoding in some areas.

I think this is possibly a widespread issue with custom tilesets combined into styles currently being served.

@cammanderson we're investigating this ASAP — thanks for the thorough description. This likely has to do with our vector tile compositing server; we'll roll back to the previous version while we're figuring out what's going on.

@cammanderson @rantiev we've deployed a fix while we investigate the exact cause deeper — can you confirm that's working properly now?

We also had the error but now it's gone. Thanks!

@mourner thanks it appears the issues are resolved! Thanks!

@mourner
Unfortunately we still get this. (tried in Chrome incognito mode)
If you find any info on the way tiles generation can cause this problems could you please let us know?

Might be an issue in our data, or the way we upload tiles, create styles. As usual we create tilesets and styles through mapbox API, we have many styles and tilesets.

I have just tried to use another style we created through the studio - no issues logged (but it's empty - only default layers colors changed a bit).

I'm going to create more styles with custom data (buildings shapes geojson) and check when i get the error. If have any update will post it here.

@rantiev can you share the style id for which it's still happening? Does it throw errors after clearing the cache too?

@mourner
It's more hardly reproducible now, i cleared cache, tried incognito mode. Now it requires layers show/hide triggering and sometimes when you zoom out/in many times and then drag map it appears. So, definitely not as it was yesterday, now you need to spend time to see logs. But it's there.

Unfortunately i'm not allowed to share styleID, i will send it to your email or anyhow in private if i can (asked for permission)

Several our devs reported that they can't reproduce it. But i can (might be my personal problem but i believe i cleared cache at least 10 times :), cache only without a cookies and forms data)

@rantiev please send the details to Mapbox Support, linking to this issue: https://support.mapbox.com/hc/en-us

I'm closing the ticket because apparently this was resolved for most people, and it's also not on the GL JS side. Please contact Mapbox support if you experience this again.

Deal, Thank You for your effort.

@mourner Can a better error message be output for corrupt vector tiles?
Maybe indicating the tile Id in the message to help debug this issue better

Was this page helpful?
0 / 5 - 0 ratings