Skip to content

Diagnostics follow-up (requested) + new bug: exitCode=21 persistent context lock conflict — 0.8.44 #8

@luvher

Description

@luvher

Product

VS Code extension (perplexity-vscode)

Version

perplexity-user-mcp 0.8.44-universal

MCP Client (if applicable)

Other

Perplexity tier

Pro

OS

Windows 11 Pro 10.0.26200, Node.js v22.21.1

Browser used by the MCP server

Chrome 148.0.7778.167

What happened?

Thank you again for the incredibly detailed analysis and the patience with every follow-up — and for the diagnostic improvements that land with each release. The daemon-status error surfacing added in 0.8.44 immediately identified the new failure mode described below. That kind of iteration is genuinely appreciated.

After updating to 0.8.44 and performing a clean reinstall with a fresh login (email one-time code, browser opened and closed correctly, meta.json confirms tier: Pro, lastLogin: 2026-05-14T16:04:24Z), the daemon remains permanently in anonymous mode. The vault decrypts cleanly (PR #4 fix confirmed working), but every Chrome launch via launchPersistentContext fails immediately with exitCode=21 before any page loads.

Steps to reproduce:

  1. Install 0.8.44 on Windows 11, Antigravity (Claude Code MCP client), stdio-daemon-proxy transport
  2. Run Perplexity: Login from VS Code command palette
  3. Browser opens → enter email one-time code → browser closes (login confirmed, tier: Pro in meta.json)
  4. Call any Pro tool (perplexity_reason, perplexity_models) → Account tier: Anonymous
  5. Perplexity: Login repeated → same result

Root cause hypothesis:
The daemon holds personal/browser-data/Default/LOCK and personal/browser-data/lockfile open via launchPersistentContext. Every subsequent Chrome launch against the same --user-data-dir — whether from a reinit cycle, a Pro tool call, or the Doctor probe — fails immediately with exitCode=21 (ERROR_NOT_READY, Windows profile lock conflict). This creates a self-reinforcing deadlock: the daemon cannot recover on its own because every reinit attempt hits the same lock it holds itself. The only escape is a full VS Code restart or manually killing the daemon process, after which the cycle begins again from scratch.

This behavior was not present in 0.8.39/0.8.42 with the non-persistent launch path — Chrome ran through to Cloudflare resolution before failing. The regression appears to have been introduced by the switch to launchPersistentContext as part of the Bug 2 / cf_clearance handoff fix.

Requested diagnostics (from your previous reply):
Active profile: personal

Profile directory structure:
default/ ← present but empty (no vault.enc — inert leftover from prior reinstall)
personal/
meta.json
vault.enc
models-cache.json
daemon-status.json
cookies.json
.reinit
login-browser-data/
browser-data/
Environment variables (User + Machine scope):

PERPLEXITY_PROFILE = (not set)
PERPLEXITY_HEADLESS_ONLY = (not set)

Bug 1 (HEADLESS_ONLY leak) is not active in this configuration.

Doctor output (optional, recommended)

# Perplexity Doctor report -- [X] FAIL
Generated 2026-05-14T19:14:59.396Z in 730ms
Active profile: `personal` (probe ran)

## [OK] runtime -- pass
- [OK] node-version -- Node.js v22.21.1
- [OK] platform -- win32 x64
- [OK] arch -- x64
- [OK] package-version -- perplexity-user-mcp 0.0.0

## [OK] config -- pass
- [OK] config-dir -- Config dir present at C:\Users\coding\.perplexity-mcp
- [OK] active-pointer -- personal

## [!] profiles -- warn
- [OK] profile-count -- 1 profile(s): personal
- [OK] personal/meta -- valid
- [OK] personal/vault -- encrypted
- [OK] personal/models-cache -- 0d old
- [!] personal/daemon-status -- daemon last init: 2026-05-14T18:51:14.433Z — authenticated: false (tier: Anonymous), error: browserType.launchPersistentContext: Target page, context or browser has been closed

  <launching> chrome.exe ... --user-data-dir=...personal\browser-data --headless
  <launched> pid=2412
  [pid=2412] <gracefully close start>
  [pid=2412] <kill>
  [pid=2412] <will force kill>
  taskkill stderr: FEHLER: Der Prozess "2412" wurde nicht gefunden.
  [pid=2412] <process did exit: exitCode=21, signal=null>

- personal/login-browser-data -- login-browser-data directory present (leftover from a past login session; safe to ignore)

## [OK] vault -- pass
- [OK] encryption -- AES-256-GCM (vault.enc)
- [OK] unseal-path -- env var (keychain unavailable — expected on headless Linux)
- [OK] unseal-verify -- vault.enc decrypts cleanly with the active unseal material

## [OK] browser -- pass
- [OK] chrome-family -- 148.0.7778.167

## [OK] native-deps -- pass
- [OK] patchright -- patchright v1.59.4
- [OK] got-scraping-chain -- header-generator -> dot-prop -> is-obj resolves
- [OK] impit -- impit 0.14.0

## [OK] network -- pass
- [OK] dns -- www.perplexity.ai -> 2606:4700::6812:1b30
- [OK] https -- HEAD / status 403
- [OK] cf-challenge -- no challenge detected

## [OK] mcp -- pass
- [OK] enabled-tools -- default profile 'full'

## [X] probe -- fail
- [X] probe-search -- probe failed: browserType.launchPersistentContext: Target page, context or browser has been closed

  <launching> chrome.exe ... --user-data-dir=...personal\browser-data --headless
  <launched> pid=8272
  [pid=8272] <gracefully close start>
  [pid=8272] <kill>
  [pid=8272] <will force kill>
  taskkill stderr: FEHLER: Der Prozess "8272" wurde nicht gefunden.
  [pid=8272] <process did exit: exitCode=21, signal=null>

Relevant logs or errors

[perplexity-mcp] No authenticated session (anonymous mode)
browserType.launchPersistentContext: Target page, context or browser has been closed
[pid=2412] <process did exit: exitCode=21, signal=null>
taskkill stderr: FEHLER: Der Prozess "2412" wurde nicht gefunden.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions