Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

RTL text plugin permanently set to "error" when a map is removed while `syncRTLPluginState` is pending (`AbortError: Actor removed`)

Open
#13,733 0 comments 0 reactions 0 assignees View on GitHub

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

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

auto-triaged bug :lady_beetle:
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 setRTLTextPlugin callback 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
  1. Call mapboxgl.setRTLTextPlugin(url, cb, true)
  2. Create a map and call map.remove() right away
  3. getRTLTextPluginStatus() returns "error", and the callback gets AbortError: Actor removed
  4. 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/mapbox-gl-js

All issues in mapbox/mapbox-gl-js

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.