fix: stub app.configureWebAuthn no-op to prevent launch crash (#128)#131
Merged
Conversation
Newer Claude Desktop asar versions call app.configureWebAuthn() during main-process init. We spoof process.platform=darwin, so this darwin-gated callsite fires on Linux, where Electron has no such method -- it throws TypeError and crashes the app before any window opens. Add it to the existing _macOnlyAppMethods no-op loop alongside the Handoff/NSUserActivity stubs (same root cause as #104/#106). The typeof guard means we only fill the gap when the method is absent, so a platform with a real implementation is never clobbered. Closes #128. Supersedes the two-file approach in #129 and the COMPAT version bump in #130; this is the minimal single-line fix. https://claude.ai/code/session_01LxAaF3raqdkyZyTPHBG8f4
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a Linux launch crash caused by newer Claude Desktop asar builds calling app.configureWebAuthn() while the wrapper spoofs process.platform as Darwin.
Changes:
- Adds
configureWebAuthnto the existing guarded list of macOS-only Electronappmethods stubbed as no-ops when absent. - Documents why the stub is needed for the launch-crash scenario tracked in #128.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced May 31, 2026
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.
Problem
Newer Claude Desktop asar versions call
app.configureWebAuthn()during main-process init. Because we spoofprocess.platform === "darwin", this darwin-gated callsite fires on Linux — where Electron has no such method — and throws an uncaughtTypeError, crashing the app before any window opens.This is issue #128:
The crash trace shows
gA.app— the Electronappobject, which is exactly what the existing_macOnlyAppMethodsno-op loop inframe-fix-wrapper.jsalready handles for the Handoff / NSUserActivity methods (#104 / #106, same root cause).Fix
One line: add
'configureWebAuthn'to that existing array. The loop'stypeof _earlyApp[_m] !== 'function'guard means we only stub the method when it's genuinely absent, so a platform that ships a real implementation is never clobbered. WebAuthn (passkey / security-key) setup is macOS-only and was never going to function on Linux Electron, so a no-op is the truthful and correct stand-in — no security feature is being disabled.Why this instead of #129 / #130
Both open PRs fix the same crash but do more than necessary:
@ant/claude-nativestub exports). The crash is on the Electronappobject, so the wrapper edit alone resolves it.COMPAT.mdlast-tested to 1.9659.2 — a version its own note marks[PARTIAL]with "full feature exercise pending," so that claim isn't fully backed.This PR is the minimal change: one string in the existing guarded loop, no new files, no unverified version claims.
Testing
node --check stubs/frame-fix/frame-fix-wrapper.js— syntax OKnode --test tests/node/current-path/*.test.cjs— 488 pass, 0 failCloses #128.
https://claude.ai/code/session_01LxAaF3raqdkyZyTPHBG8f4
Generated by Claude Code