Skip to content

Troubleshooting

Christian Trey Rowell edited this page Dec 3, 2026 · 4 revisions

Troubleshooting

English | 简体中文

This page maps the error codes the plugin actually raises to their cause and fix. Codes are printed as-is in every language, so you can search this page for the code you see.

First checks

This section lists the three checks that resolve most problems before you look up a code.

  1. Run npx dsh-chatgpt-siwc doctor from the profile directory. Confirm loaded.version and loaded.root are the build you installed, registrations[].planGranted is true for the active account, and lock.exists is false when nothing is running.
  2. Run npx dsh-chatgpt-siwc discover --refresh. It says whether you are signed in, whether plan usage is granted, and whether the live catalog could be fetched.
  3. Look at the card. A failed sign-in shows Stopped at: with the step and the code; the DSH host log carries the same line.

Where the codes appear: the CLI prints <CODE>: <message>. The card prints the localized message and, for sign-in, the step and code. Model-call failures reach DSH as its own error codes (the second table below).

Installation and loading

This section covers problems that appear before any sign-in.

Symptom Cause Fix
dsh plugin fails with spawn pnpm ENOENT dsh plugin forwards to pnpm, which is not on PATH corepack enable pnpm, then run the install again
The plugin's card or route does not appear after install The running profile keeps the bundle set it started with Restart the profile; check dsh web --dump-config for the dsh-chatgpt-siwc row
doctor or the startup log shows an older version or an unexpected path Another copy of the package elsewhere on Node's module path (for example an old link in a parent node_modules) is shadowing the installed one Remove the stray copy, restart, and check loaded.root again
An import error naming siwc-core A source directory was installed instead of the npm package or a packed tarball; siwc-core only ships inside the tarball Install from npm, or npm pack and install the .tgz (see Install)
credential store … is readable by other users; run chmod 600 on it The accounts file has group or other permissions chmod 600 the file named in the message
credential store at … is not a JSON object The accounts file is damaged Restore it from a backup, or move it aside and sign in again

Sign-in and account codes

This section lists the codes from sign-in, refresh, and sign-out.

Code Meaning Fix
LOGIN_IN_PROGRESS A sign-in is already running from the card Finish it in the browser, or press Cancel sign-in
SIGN_OUT_IN_PROGRESS A disconnect is still running Wait for it, then retry
LOGIN_START_FAILED The sign-in could not start (the message carries the reason) Check network access to auth.openai.com and that a loopback port can be opened
LISTENER_FAILED The loopback listener got no port Free a local port; doctor shows whether 1455 is free (any free port also works)
CALLBACK_TIMEOUT The browser did not return to the callback within 120 seconds Sign in again and approve sooner. The browser must be on the same machine as DSH.
AUTHORIZATION_FAILED OpenAI returned an error to the callback, for example the request was denied Sign in again and approve the app and plan usage
REGISTRATION_INCOMPLETE The first-registration callback carried no issued client id, or a malformed one Sign in again
CLIENT_ID_MISMATCH A reconnect returned a different client id than the selected account Sign in again; use login --new if you meant a separate app
IDENTITY_MISMATCH The signed-in ChatGPT user is not the user of the selected account Sign in with the same ChatGPT user, or use login --new
UNKNOWN_ACCOUNT login --client-id named a registration that is not stored Check doctor for the stored client ids
TOKEN_EXCHANGE_FAILED The token response had no access token, or no ID token to verify Sign in again; if it repeats, OpenAI's token endpoint is refusing the app
an OAuth error such as invalid_grant, or HTTP_<status> The token endpoint refused the sign-in code; the code is OpenAI's own. (A refused refresh token surfaces as REAUTH_REQUIRED instead.) Sign in again once; if the same code comes back, report it
INVALID_ID_TOKEN The ID token failed verification (signature, issuer, audience, azp, expiry, not-yet-valid, nonce, or missing subject; the message says which) Check the system clock first; up to 30 seconds of difference is tolerated. Then sign in again.
JWKS_FETCH_FAILED OpenAI's signing keys could not be fetched Check network access to auth.openai.com and retry
NETWORK_TIMEOUT An OAuth or catalog request took longer than 20 seconds; the saved account was not changed Check the network and retry
REAUTH_REQUIRED No refresh token is stored, or OpenAI will not accept it again; the tokens were cleared and the registration kept Sign in again (card or login)
REFRESH_NOT_READY The access token expired but OpenAI's earliest_refresh_at has not passed yet Retry shortly; this is pacing, not a failure
PLAN_NOT_GRANTED Signed in, but plan usage was not granted for this app Sign in again and approve plan usage; check the app's access and cap under Manage usage
MISSING_CREDENTIAL Not signed in dsh-chatgpt-siwc login, or sign in from the card
STORE_LOCKED Another writer has held the accounts-file lock for longer than the 50-second wait See Stuck lock

Sign-in stopped at a step

This section tells you what to do based on the step the card names when a sign-in stops.

A failed sign-in shows Stopped at: <step> · <CODE> on the card, and the DSH host log carries the same line. Before retrying, run npx dsh-chatgpt-siwc doctor with the same DSH_HOME as the running DSH, so it reads the same accounts file (dshHomeEnv in the output shows which one it used).

Stopped at What it means Next step
waiting for ChatGPT approval The tab was closed, or the callback never reached 127.0.0.1 Check that the browser is on the same machine as DSH. doctor shows whether port 1455 is free; if it is busy the listener takes another free port, so a busy port alone is not the cause. Sign in again.
receiving the approval, or app registered The callback arrived; on a first sign-in the issued registration is already saved Sign in again. The retry reconnects the same app instead of registering a new one.
exchanging the approval for access The token endpoint refused the code; the code shown is OpenAI's own, for example invalid_grant Retry once. If the same code comes back, report it (see below).
verifying your identity The ID token was rejected (INVALID_ID_TOKEN; the message names the check) Check the system clock first, for example with timedatectl on Linux. The plugin tolerates up to 30 seconds of clock difference; beyond that a fresh token is rejected as not yet valid or issued in the future. Then sign in again.
saving the account The accounts file could not be written (STORE_LOCKED, or file permissions) doctor shows the lock's age and the file's mode. See Stuck lock, or chmod 600 the file.

Leftovers from older versions. If you upgraded from a release before 0.2.1:

  • dsh web --dump-config should show exactly one row for this package, with id dsh-chatgpt-siwc. Remove an old row with id chatgpt-siwc from your profile patch if one is still there.
  • An old copy of the package or a symlink to it in a parent node_modules (for example in your home directory) can shadow the installed one; doctor shows the version and path that actually loaded. Remove only the stray link or copy.

Duplicate app registrations. Earlier versions registered a new app on every failed retry. If ChatGPT lists several registrations for this plugin, keep the one doctor reports as active (its clientId) and disconnect the others in ChatGPT under Settings > Security and login > Sign in with ChatGPT.

Model-call errors in DSH

This section lists the codes DSH shows when a model call fails, and what each one means for this provider.

DSH code Cause Fix
AUTH Not signed in, sign-in no longer valid, plan usage not granted, the token was still refused (401) after one forced refresh, or OpenAI refused plan usage (subscription_sharing_not_entitled, subscription_sharing_plan_not_granted, subscription_sharing_usage_unavailable) Sign in again and approve plan usage. "Not eligible" means the plan does not allow third-party plan usage; identity sign-in alone does not grant it.
QUOTA subscription_sharing_usage_limit_exceeded: your plan's limit or this app's cap is reached; or OpenAI reported quota exhaustion Review limits under Manage usage (https://chatgpt.com/settings/usage)
CONTEXT_WINDOW_EXCEEDED The conversation is larger than the model's context window Compact the conversation in DSH; check contextBudget and modelOverrides are not set above what you need
UNSUPPORTED_REASONING_EFFORT The effort chosen for this call is not in the model's catalog list Pick an effort the model offers. A default effort from settings never causes this; it is dropped instead.
RATE_LIMIT OpenAI answered 429 or reported rate_limit_exceeded; a Retry-After value is passed to DSH Wait; DSH's retry policy applies
SERVER OpenAI answered 5xx or 408, or reported server_error Retry later
HTTP_<status> Any other non-success status The message carries OpenAI's detail
TIMEOUT No response headers, or no stream bytes, within streamIdleTimeoutMs (default 300000 ms). Not retried before headers, because the request may already have used plan usage. Retry the turn; raise streamIdleTimeoutMs only if long silent gaps are expected
TRANSPORT The connection failed before headers, a stream read failed, or the stream ended without a terminal event Check the network and retry
MALFORMED_RESPONSE No response body, or a function call without its id or name Retry; report it if it repeats
EMPTY_RESPONSE The response completed with no content Retry
INVALID_CONFIG A setting failed validation (see below) Fix the value
INVALID_CREDENTIAL A refresh returned an ID token that failed verification or named another user Sign in again
INVALID_CATALOG The catalog response could not be read while resolving models See Catalog codes
ABORTED You or DSH cancelled the call Nothing to fix

A 400 that names service_tier does not reach DSH the first time: the plugin marks the tier unsupported for that model and retries once without it (Configuration).

Configuration codes

This section lists the validation messages for settings.

Code Message Fix
INVALID_CONFIG provider route name must not be empty / app name must not be empty Enter a value, or reset the field
INVALID_CONFIG unsupported reasoning effort "<x>" Use one of none, minimal, low, medium, high, xhigh, max, ultra
INVALID_CONFIG unsupported service tier "<x>" default or priority
INVALID_CONFIG context budget must be a positive integer / stream idle timeout must be a positive integer in milliseconds Whole positive numbers only
INVALID_CONFIG model override contextWindow for "<model>" must be a positive integer / model override id must not be empty Fix the JSON entry
INVALID_CONFIG API base URL … (not allowed, malformed, or carries credentials, a query, or a fragment) Leave apiBaseUrl empty, or use https://api.openai.com/v1 or a loopback URL
REGISTRATION_ROLLBACK_FAILED Renaming the provider route failed and so did restoring the old name; the route was removed Save a valid provider route name to restore it

Catalog codes

This section covers problems with the model list.

Code Meaning Fix
HTTP_<status> from the catalog GET /v1/models was refused 401: sign in again. Other statuses: retry later; the picker falls back to the stored catalog.
INVALID_MODEL_CATALOG The catalog response was not an object, or had neither models nor data Retry later; the stored catalog stays in use. Report it if it persists, since OpenAI may have changed the format.
A model is missing from the picker Its visibility is hide, or it is a utility slug See Models and catalog
The picker offers no effort choice The catalog lists no efforts for that model and modelOverrides sets none Expected; the plugin does not invent efforts

Stuck lock

This section explains STORE_LOCKED and how to clear it safely.

Writers to the accounts file take accounts.json.lock, which records the holder's process id. A writer waits up to 50 seconds. If the recorded process no longer exists, the next writer removes the lock and continues on its own. The lock stays in place when the recorded process id has been reused by a live process, the holder runs as another user, or the record is incomplete.

To clear it by hand: stop every DSH and dsh-chatgpt-siwc process, confirm the process id in the lock file is not running, then delete only the .lock file next to accounts.json. Never delete or share accounts.json itself.

Reporting a problem

This section says what to include so a report can be acted on, and what never to send.

Open an issue at github.com/calisweetleaf/dsh-siwc-native/issues and include:

  • the doctor output (token-free), including the version and load path it names;
  • the exact error code and message, and for a sign-in failure the step the card named;
  • the discover --json output if the problem involves models;
  • your DSH and Node versions.

Never include a token, an authorization header, or your accounts.json file, and never a screenshot that shows any of them. Security problems go through the private process in SECURITY.md, not a public issue.

Clone this wiki locally