maplibre-gl-js
maplibre-gl-js copied to clipboard
MacOS / iOS throw "null is not an object" when using v3
We are seeing in our sentry error tool errors popping up since we released a version of our website with maplibre-gl updated from v2 to v3:
React ErrorBoundary Error: null is not an object (evaluating 'e.getParameter(e.VERSION).startsWith')
Unfortunately we cannot reproduce it locally (yet). I will update this issue when we have more information or can reproduce it.
We use maplibre-gl in this library: https://github.com/goodhood-eu/goodhood/tree/master/packages/map
maplibre-gl-js version: 3.3.1
browser: ~~Safari 17, Mobile Safari 17~~ macOS Safari 16+ and iOS Safari 16+ (and browsers on ios that use safari (like firefox)
Steps to Trigger Behavior
- ?
I'm not sure this code is part of maplibre though...
I think its this line: https://github.com/maplibre/maplibre-gl-js/blob/d6fdbe449ed8f8195399490c57a2e061ba90bbb7/src/gl/webgl2.ts#L8
Here's the stacktrace from sentry report:
Hm, interesting. Yes, this was introduced in version 3 as part of the support for webgl 2. Are you using the latest version of maplibre 3? We have added back support for webgl 1 after removing it in the initial version 3 release.
Yes, we are using the latest └── [email protected] Thing is, it doesnt happen on all safari browsers. Do you know if there's a way to disable webgl on ios/macos? or to block it? which might to lead this parameter being undefined...
I think there are ways to disable hardware graphic acceleration (at least I know it can be done in chrome), but then the entire map wouldn't show up anyway. Not sure what's causing this though... :-/
I've also seen this exact error on iOS/iPadOS 17.0.x. I think it's related to this issue: https://developer.apple.com/forums/thread/737042 I've seen similar issues with other webgl libraries too, such as mapbox, arcgis, unity
Currently as a workaround I've disabled maplibre for users with iOS/iPadOS 17.0.x
Thanks for the hint @HandyMenny Could be an explanation. Only thing that doesnt fit in our reports are some that say "Mac OS X 10.15.7" as the used OS (along iwth safari 16 and 17 as their browser). Do you know if some ipads use that internally?
I think this was fixed by: #3238 Can someone check and close this issue if so?
Can check once a new version (3.5.2?) is released.
Right... my mistake, I thought this was already released...
Do you have a regular release schedule or when can we expect a new one?
We don't have a schedule, if you would like to push things forward you can create a bump version PR, I'll review, approve it and create a new release.
Created https://github.com/maplibre/maplibre-gl-js/pull/3271 to push things forward.