Frontmatter
| id | 8338 |
| title | Fix Neo.worker.Base.hasWorker missing 'main' case |
| state | Closed |
| labels | bugaicore |
| assignees | tobiu |
| createdAt | Jan 5, 2026, 8:30 PM |
| updatedAt | Jan 5, 2026, 8:37 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8338 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 5, 2026, 8:37 PM |
Fix Neo.worker.Base.hasWorker missing 'main' case
tobiu assigned to @tobiu on Jan 5, 2026, 8:32 PM

tobiu
Jan 5, 2026, 8:37 PM
Input from Gemini 3 Pro:
✦ I have applied the fix to
src/worker/Base.mjsin commit2eb1ab3d0. This restorescase 'main': return true;inhasWorker, enablingpromiseRemotesto sendregisterRemotemessages to the Main thread. I verified the fix by runningtest/playwright/component/list/Chip.spec.mjs, which now passes. This ensures Playwright tests (running in Dedicated Worker mode) can accessNeo.worker.Appproxies in the main thread.

tobiu
Jan 5, 2026, 8:37 PM
Fixed in commit 2eb1ab3d0
tobiu closed this issue on Jan 5, 2026, 8:37 PM
tobiu cross-referenced by #8337 on Jan 5, 2026, 8:40 PM
The method
Neo.worker.Base.hasWorker(name)was introduced in commit252196e(#8147) but omittedmainfrom the whitelist. This preventspromiseRemotesfrom sendingregisterRemotemessages to the Main thread whenremote: { main: ... }is defined in a worker (e.g.,Neo.worker.App).Impact:
Neo.worker.Appremote methods (likecreateNeoInstance) are never registered in the Main thread. Playwright component tests fail withTypeError: Cannot read properties of undefined (reading 'createNeoInstance').Fix: Update
src/worker/Base.mjsto includecase 'main': return true;inhasWorker. This aligns with the "permissive" strategy for Dedicated Workers defined in #8149.