b7d66c79afb4

fix: receiver's createVaultFromRootKey was chrome.runtime.sendMessage'ing from the SW to itself, which MV3 returns undefined for. Switched to a direct import call. Vault creation now completes, ending the inverse-pairing 'create_vault_no_response' failure. (v4.3.18)

time
2026-07-28 18:20 UTC · 3 months ago
machine
koh2
agent
claude-MiniMax-M3
session
sync red indicator port from browser
parent
f788ea070b4b
4 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1src/background/relay-adoption-source-bg.ts+8 −14
manifest.firefox.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach Password Manager",4-  "version": "4.3.17",4+  "version": "4.3.18",55   "description": "Zero-knowledge password manager",66   "browser_specific_settings": {77     "gecko": {

view file

manifest.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach Password Manager",4-  "version": "4.3.17",4+  "version": "4.3.18",55   "description": "Zero-knowledge password manager",66   "action": {77     "default_popup": "src/popup/index.html",

view file

package.json+1 −1
@@ -1,6 +1,6 @@11 {22   "name": "peach",3-  "version": "4.3.17",3+  "version": "4.3.18",44   "description": "Zero-knowledge password manager",55   "license": "GPL-3.0-only",66   "type": "module",

view file

src/background/relay-adoption-source-bg.ts+8 −14
@@ -31,7 +31,7 @@3131 import { getDeviceName, getLocalPairingIdentity } from "./device-identity";3232 import { getSyncSettings, relayInForce } from "./sync-settings";3333 import { getLicenseKey, isProUser } from "./license";34-import { getRootKeyHex, isUnlocked } from "./vault";34+import { createVaultFromRootKey, getRootKeyHex, isUnlocked } from "./vault";3535 import { computeVaultId } from "../shared/sync-identity";3636 import { upsertPairedDevice } from "./paired-devices";3737 import { triggerSyncIfReachable } from "./sync-trigger";@@ -322,19 +322,13 @@322322         return true;323323       },324324       async createVaultFromRootKey(rootKeyHex) {325-        console.log("[Peach diag] sendMessage CREATE_VAULT_FROM_ROOT_KEY starting");326-        const response = (await chrome.runtime.sendMessage({327-          type: "CREATE_VAULT_FROM_ROOT_KEY",328-          payload: { password, rootKeyHex },329-        })) as { ok: boolean; data?: { vaultId?: string }; error?: string } | undefined;330-        console.log("[Peach diag] sendMessage CREATE_VAULT_FROM_ROOT_KEY returned:", response);331-        if (!response) {332-          throw new Error("create_vault_no_response");333-        }334-        if (!response.ok) {335-          throw new Error(response.error ?? "create_vault_failed");336-        }337-        return { vaultId: response.data?.vaultId ?? "" };325+        // Direct call, not chrome.runtime.sendMessage — a service worker326+        // calling sendMessage does not reach its own listener (returns327+        // undefined), and the receiver already lives in the same SW context328+        // as the vault module. Round-tripping through the message bus was329+        // the root cause of "create_vault_no_response".330+        const { vaultId } = await createVaultFromRootKey(password, rootKeyHex);331+        return { vaultId };338332       },339333       async applyLicense(license) {340334         const response = (await chrome.runtime.sendMessage({

view file