RTL text plugin permanently set to "error" when a map is removed while `syncRTLPluginState` is pending (`AbortError: Actor removed`)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- frontend, internationalization
Research direction
Start in src/style/style.ts at the syncRTLPluginState catch and inspect how triggerPluginCompletionEvent handles AbortError: Actor removed. Reproduce the issue with setRTLTextPlugin, immediate map.remove(), and getRTLTextPluginStatus(); done means removing a loading map does not permanently set the plugin to error, and a later Arabic map still renders street names.
Written by the indexing model from the issue text.
Description
mapbox-gl-js version
3.31.0, 3.32.0 (also current main)
Browser and version
Chrome 151 (not browser-specific)
Expected behavior
RTL (Arabic and Hebrew) street names keep showing on a map, even after map was removed before it finished loading
Actual behavior
map.remove() rejects the pending syncRTLPluginState request with AbortError: Actor removed
The catch in the src/style/style.ts passes it to triggerPluginCompletionEvent(err), which:
- sets the plugin status to error for the rest of the page session
- calls the
setRTLTextPlugincallback with the error (react-map-gl logs it with console.error)
After that, maps using RTL labels render no street names. This did not happen for example in 3.15.0, before Actor/Dispatcher became promise-based
Link to the demonstration
https://jsbin.com/zicefegita/1/edit?html,output
Steps to trigger the unexpected behavior
- Call
mapboxgl.setRTLTextPlugin(url, cb, true) - Create a map and call
map.remove()right away getRTLTextPluginStatus()returns "error", and the callback getsAbortError: Actor removed- Create a new map with language: 'ar'. It has no street names
Relevant log output
AbortError: Actor removed
- Dominant language
- TypeScript
- Stars
- 12.5k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from mapbox/mapbox-gl-js
-
TypeError: Cannot read properties of undefined (reading 'get') when a map is removed while a color-theme LUT is decodingPossibly taken @Piyush495 claimed this 18 days ago. Openauto-triaged bug :lady_beetle:
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
mapbox/mapbox-gl-js#13737 · 1 comment ·
-
auto-triaged bug :lady_beetle:
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
mapbox/mapbox-gl-js#13723 · 2 comments ·
-
auto-triaged bug :lady_beetle:
Difficulty 1/5 Under an hour Newbie friendliness 86/100
mapbox/mapbox-gl-js#13717 ·
-
>= v3.21 Symbol layer without feature-state expression crash the mapPossibly taken @liueric-dev claimed this 60 days ago. Openauto-triaged bug :lady_beetle:
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
mapbox/mapbox-gl-js#13714 · 1 reaction ·
-
auto-triaged feature :green_apple:
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
mapbox/mapbox-gl-js#13676 · 2 comments ·
All issues in mapbox/mapbox-gl-js
Similar issues
-
a10y a10y-audit ai-driven-qa claude
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
linagora/twake-directory-manager#219 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
0️⃣ phase/new
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Pulse v7: buildPreferencesFromTelos() bypasses telosSectionOrFile(), renders empty on unified-TELOS installsPossibly taken @zephyr91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
danielmiessler/LifeOS#2393 ·
Maintainers usually reply within 4 days