Skip to content

Report worker script failures through map error events - #8156

Closed
NearlCrews wants to merge 1 commit into
maplibre:mainfrom
NearlCrews:fix/report-worker-load-errors
Closed

Report worker script failures through map error events#8156
NearlCrews wants to merge 1 commit into
maplibre:mainfrom
NearlCrews:fix/report-worker-load-errors

Conversation

@NearlCrews

@NearlCrews NearlCrews commented Aug 12, 2026

Copy link
Copy Markdown

What changed

  • forward worker error and messageerror events through the dispatcher to the map
  • preserve the configured worker URL so diagnostics identify the failing script
  • include bundler configuration guidance for worker load and execution failures
  • remove worker listeners when the dispatcher is removed
  • add dispatcher, worker factory, and map event regression coverage

Fixes #8018.

Verification

  • Focused unit tests: 3 files, 96 tests
  • Type-check
  • ESLint on every changed TypeScript file
  • git diff --check

Launch Checklist

  • These changes do not include backports from Mapbox projects.
  • Tests cover the new behavior.
  • No public API changes are introduced.
  • No visual changes are introduced.
  • No benchmark-adjacent code is changed.
  • A CHANGELOG.md entry is included.
  • I have read the project contribution policy.

@NearlCrews

Copy link
Copy Markdown
Author

Disclosure per the project contribution policy: Generated-By: OpenAI Codex (GPT-5).

@NearlCrews
NearlCrews force-pushed the fix/report-worker-load-errors branch from 98d34d7 to 97ef769 Compare August 12, 2026 10:22
@HarelM

HarelM commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Make sure that there's no open PR on this already when using AI.

@HarelM HarelM closed this Aug 12, 2026
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.28%. Comparing base (2a940c1) to head (97ef769).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8156      +/-   ##
==========================================
- Coverage   93.28%   93.28%   -0.01%     
==========================================
  Files         301      301              
  Lines       25081    25104      +23     
  Branches     6578     6582       +4     
==========================================
+ Hits        23397    23418      +21     
- Misses       1684     1686       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@NearlCrews

Copy link
Copy Markdown
Author

You are right. I missed #8024 before opening this. I compared the implementations: this branch leaves WorkerPool unchanged and attaches error and messageerror listeners in Dispatcher, but it still overlaps the same issue. I am closing it to avoid duplicate review. The all-green branch remains available if the narrower approach is useful for #8024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Map hangs silently when the worker script fails to load: no error event, no console message, 'load' never fires

2 participants