Skip to content

v1.0.5 - Fix Account Index Sync

Choose a tag to compare

@Anna-SAP Anna-SAP released this 15 Mar 16:18
· 7 commits to main since this release
74e6375

Fix: Google Account Index Sync (authuser mapping)

Resolved the persistent bug where the extension's account index (u/#) was misaligned with Google's actual authuser index in Chrome.

Root Cause

Chrome MV3 service workers cannot send cookies with fetch() — the Cookie header is a forbidden header in the Fetch API spec and is silently dropped, causing ListAccounts API to return 400/403.

Solution

Uses chrome.scripting.executeScript with world: 'MAIN' to run the ListAccounts fetch inside a real Google page context where cookies are naturally available via the browser's cookie jar.

Changes

  • Replaced service worker direct fetch with MAIN world script injection
  • Added scripting, cookies permissions and www.google.com host permission
  • Simplified background.ts (544 → 180 lines)