Skip to content

Login fails: 'object is not a function' in the OAuth encrypt path (getPublicKeyThumbprint → encrypt) — fresh/re-login blocked #9673

Description

@proggeramlug

Hit in live manual testing of cc_manual @ f6aac9e5c4 (macOS aarch64, sandboxed HOME=/tmp/sbs_home_p). Onboarding ran (theme picker), then cc asked to log in, and the login fails:

ERROR object is not a function

  at Lw5 (<anonymous>)
  at WN8.calculateLayout (<anonymous>)
  at get destination (<anonymous>)
  at ZT8 (<anonymous>)
  at getPublicKeyThumbprint (<anonymous>)
  at encrypt (<anonymous>)
  at new hy6__class_expr_7524 (<anonymous>)
  at YNY (<anonymous>)
  at da7.add (<anonymous>)
  at BtY (<anonymous>)

After the error the process is idle-parked (verified: CPU delta 0.01 s over 10 s; sample shows 3510/3513 main-thread samples in kevent), so this is a hard failure of the login flow, not a hang.

Severity: blocks first-time and re-login. An already-authenticated sandbox HOME works fine — earlier the same binary ran a full authenticated session — so the broken path is specifically the login/token-encryption flow, which the 196-case stress suite cannot reach (it runs unauthenticated by design).

The real frames

getPublicKeyThumbprint and encrypt are the meaningful ones: cc encrypts the OAuth token for storage. Something in that path resolves to a non-callable — the #9485 shape (a native-module method that answers undefined without throwing, so the call is what fails) is a prime suspect; likely candidates are crypto.subtle/webcrypto exports (importKey, exportKey, digest, encrypt) or a node:crypto namespace method reached in a spelling perry's dispatch doesn't cover. Worth checking against #9498's fix (CJS-default namespace method calls) — the same drifted-table class could leave a different module's methods unreachable.

Second finding: the stack names are mis-attributed

WN8.calculateLayout is the bundle's pure-JS yoga replacement (identified in the binary census) and get destination/da7.add are unrelated — a layout call cannot be between ZT8 and a crypto thumbprint. This is #9521's documented limitation in the field: "an address inside a function codegen emits but does not name borrows the preceding name". Two consequences: (a) don't trust the middle frames of this trace when debugging, and (b) it argues for the Tier-2 work (or at least denser name registration) since frame names are now load-bearing for exactly this kind of report.

Repro path

Fresh sandbox HOME (no .credentials.json), run the binary, complete onboarding, choose login. Compare against node cli_2.1.112.js in an identical fresh HOME — if node completes the same login, the divergence is perry-side and the failing call is isolatable by instrumenting the crypto dispatch. Evidence sample: /Users/amlug/projects/perry/wedge-9590/authfail_sample.txt.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions