Skip to content

fix: Windows 1.2.14 RC — 3 pair failure fixes#106

Merged
BitHighlander merged 3 commits into
release/1.2.14from
fix/windows-1.2.14-rc
Apr 9, 2026
Merged

fix: Windows 1.2.14 RC — 3 pair failure fixes#106
BitHighlander merged 3 commits into
release/1.2.14from
fix/windows-1.2.14-rc

Conversation

@BitHighlander
Copy link
Copy Markdown
Collaborator

Summary

Addresses all 3 findings from the HANDOFF-1.2.14-WINDOWS-PAIR.md smoke test:

  • Finding 1: Bump hdwallet submodule to include keepkey/hdwallet#37 — validates Features version fields before semver.gte(), preventing Invalid Version: vundefined.undefined.undefined crash on WebUSB pair
  • Finding 2: Race pairRawDevice() against usb.on('detach') — if device unplugs mid-write, rejects cleanly instead of letting libusb segfault the bun process
  • Finding 3: Move port 1646 collision check before BrowserWindow creation — exits before splash appears so user doesn't see an unresponsive window

Changes

File What
modules/hdwallet Submodule bump 92ea4dac0c4c73 (includes #37 merge)
engine-controller.ts raceWithDetach() helper + wrap WebUSB pair call
index.ts Pre-window port probe + move deferredInit() before window creation

Test plan

  • Windows 10: launch with device connected — should pair without vundefined crash
  • Windows 10: unplug device during pair attempt — should log "Device disconnected during USB operation" and fall back to HID, not crash
  • Launch second Vault instance while first is running — should exit immediately with no ghost window
  • macOS: verify no regression — normal pair flow, OOB wizard, firmware update
  • Verify HID fallback still works when WebUSB detach race fires

BitHighlander and others added 3 commits April 8, 2026 15:37
Captures the diagnostic work from a 1.2.14 Windows install session for
the next agent to act on. Three distinct failure modes, all surfacing
to the user as the same "splash never advances" symptom but caused by
unrelated bugs in different layers.

1. `Invalid Version: vundefined.undefined.undefined` on WebUSB pair —
   defensive fix in flight at keepkey/hdwallet#37 (with regression
   tests). Bumping the submodule pointer here is a follow-up after
   that PR merges.

2. Native crash on USB unplug during in-flight WebUSB write — bun
   process disappears with no JS error after libusb's `bad write`.
   Same family as the existing macOS attach-time SIGTRAP guard in
   engine-controller.ts:251-254. Open; suggested approach in the doc
   ranges from a process-supervisor band-aid to moving USB I/O into a
   child process.

3. Splash hangs forever when port 1646 is already bound — the FATAL
   exit message is in the backend log but the BrowserWindow is created
   before the port collision check, leaving an undecorated splash on
   screen. Open; fix is to move the collision probe before window
   creation and/or surface a "Vault is already running" UI state.

Doc includes log evidence for each finding, root-cause file pointers,
reproduction recipes, and an explicit "what is NOT broken" section to
prevent the next agent from re-investigating the verified-intact
download, the 1.2.14 @noble/hashes fix, the protobuf schema, and the
frontend bundle.
docs: handoff for v1.2.14 Windows pair failures (3 findings)
… race

Three fixes for Windows pair failures documented in HANDOFF-1.2.14:

1. Bump hdwallet submodule to include #37 (Features version validation).
   Prevents `Invalid Version: vundefined.undefined.undefined` crash on
   WebUSB pair when device returns malformed Features.

2. Move port 1646 collision check before BrowserWindow creation.
   Previously the check ran in deferredInit() after the splash was
   visible — user saw an unresponsive window they had to force-kill.
   Now exits cleanly before any window appears.

3. Race WebUSB pairRawDevice against USB detach event. If the device is
   unplugged mid-write, the native usb addon segfaults (libusb "bad
   write"). The detach race rejects the promise cleanly before the
   native crash can occur.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BitHighlander BitHighlander changed the base branch from develop to release/1.2.14 April 9, 2026 20:02
@BitHighlander BitHighlander merged commit a6acb31 into release/1.2.14 Apr 9, 2026
3 checks passed
BitHighlander added a commit that referenced this pull request Apr 9, 2026
Bump version to 1.2.15 and pin hdwallet submodule to master (includes
keepkey/hdwallet#37 — Features version validation).

Changes since v1.2.14 pre-release:
- fix(win10): skip POSIX heartbeat watchdog on Windows (#107)
- fix: sync file logger — crash logs now survive native exceptions (#107)
- fix: boot environment dump for launch-context diagnostics (#107)
- fix: JS↔native boundary logging in engine-controller (#107)
- fix: port 1646 collision check before window creation (#106)
- fix: USB detach race guard on WebUSB pair (#106)
- fix: hdwallet Features version validation (hdwallet#37)
- docs: handoff for 1.2.14 Windows pair failures (#105)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant