RangeError: Bad value is thrown on Mac/iOS after updating to 3.10.0
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
After updating to 3.10.0 a RangeError: Bad value is occurring. This seems to be happening only on iOS/Mac. The error occurs after having the application open for a while and seems to be related to the loading / refreshing of vector tiles.
Stack trace
RangeError: Bad value
at decode([native code])
at <anonymous>(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:31:338233)
at t(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:31:338379)
at e.prototypereadFields(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:32:2576)
at e(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:31:337888)
at e(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:31:338777)
at e.prototypereadFields(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:32:2576)
at Qc(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:31:338877)
at Nv.loadVTLayers(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:32:209572)
at bt.updateBuckets(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:36:100247)
at bt.refreshFeatureState(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:36:100125)
at Et.initializeTileState(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:36:113469)
at St._tileLoaded(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:36:118225)
at Qy.processTask(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:32:157691)
at Qy.receive(.../../../../common/temp/node_modules/.pnpm/mapbox-gl@3.11.0/node_modules/mapbox-gl/dist/mapbox-gl.js:32:157532)
mapbox-gl-js version: 3.10+
browser: Safari 18.1+, Chrome Mobile iOS, Mobile Safari, Edge Mobile
Expected Behavior
The map should not crash (when refreshing / reloading tiles) on Mac/iOS
Actual Behavior
The map crashes on iOS/Mac with 3.10.0 and 3.11.0 with a RangeError: Bad value
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the mapbox-gl.js stack trace, especially Nv.loadVTLayers, updateBuckets, refreshFeatureState, and initializeTileState, and compare behavior in mapbox-gl-js 3.10.0 and 3.11.0. Reproduce tile loading or refreshing on Safari 18.1+, Chrome Mobile iOS, Mobile Safari, or Edge Mobile; done means the map no longer crashes with RangeError: Bad value on Mac or iOS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100