feat: wxt#151
Merged
Merged
Conversation
The custom browser-install script replaced `playwright install --with-deps` but only downloaded and extracted the binaries, dropping the OS shared libraries (libnss3, libgbm, libasound2, …) that chromium/firefox need to launch. In CI every ext-e2e test failed with "browserType.launchPersistentContext: Target page, context or browser has been closed". Run `playwright install-deps <browsers>` after extraction — it apt-installs the deps only (no browser download, so it stays clear of the btrfs extractor deadlock). Gated on CI: the Dagger image is Debian/Ubuntu and runs as root, while dev machines already have the libs and may not use apt. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ServerDrivenTrpcChannelProvider.stop() resolved only when httpServer.close() drained every connection, but it never force-closed keep-alive/active sockets. With the m3 (MV3) extension still connected at teardown — service worker kept warm by the content-script keepalive, auto-reconnecting and health-polling — the sockets never drained, so stop() blocked until the ~30s WS keepalive reaped them. That surfaced as a 30s Playwright teardown timeout on every m3 tool test (mis-attributed to the adjacent client.close() line). - stop(): call httpServer.closeAllConnections() (Node >=18.2) so close() completes promptly, and drop broadcastReconnectNotification() on shutdown so clients aren't told to re-dial sockets we're closing. - McpClientPageObject.disconnect(): also call mcpServer.stop() to detach the BrowserResources onChange listener (stops the "sendResourceUpdated failed" log spam) and null the transports. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Zod v4 rejects `undefined` for required fields even when typed z.any(). Every void-returning extension tool call (clickOnElement, scrollPage, fillTextToElement, hitEnterOnElement, closeTab, ...) resolves with `result: undefined`, so relaying that back to the server via the defer.resolve mutation failed input validation — the resolve message never reached the server, leaving the original tool-call request pending until the test's 30s timeout. Root-caused via local e2e runs with content-script/service-worker console capture: the extension performs the action and logs the resolve attempt, but the mutation call itself throws a TRPCClientError (invalid_type/expected: nonoptional) before reaching the server. Fix: make `result` optional in the resolve input schema (and the resolveDefer handler's opts type to match). Confirmed locally — full ext-e2e suite went from 24 failed/44 passed (17.7m) to 68 passed/16 skipped (8.5m). Also keep the disconnect() cleanup from the teardown-hang fix (mcpServer.stop() to detach the BrowserResources listener before tearing down the transport). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
browser-install.ts duplicated work-dirs.ts's root-path computation (same import.meta.dirname math). Give work-dirs.ts the same MOON_WORKSPACE_ROOT env-var override browser-install.ts already had — a no-op under moon (moon sets that var to the same value the path math produces) and a correctness improvement for standalone runs — then have browser-install.ts consume workDirs.path instead of re-deriving root itself. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Matches how every other work-dirs.ts consumer references it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
work-dirs.ts already pre-computes target/apps/etc paths; add the same for tmp/browsers, tmp/pw-dl, tmp/pw-resolve so browser-install.ts (and any future consumer) reads them instead of recomputing path.join calls inline. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.