Skip to content

Common Errors

Quick lookup for the errors you'll hit most often. Each entry is symptom → cause → fix.

Generation errors

"connection refused" from the runner

Cause: G-Labs isn't running on localhost:8765, or it crashed.

Fix: Hit http://localhost:8765/health in a browser. If it fails, restart G-Labs. See G-Labs Setup if you can't get it running.

"522 Connection timed out" from cloudflared

Cause: The tunnel is up but G-Labs isn't responding on the target port.

Fix: Same as connection refused. Check G-Labs health endpoint.

Tunnel URL works for ~30 minutes then stops

Cause: Quick tunnels (cloudflared --url mode) can drop after extended use.

Fix: Restart cloudflared tunnel --url http://localhost:8765. Update the new URL wherever you'd set the previous one (runner --server arg, PatchWork settings).

"API key invalid" from generations

Cause: The --api-key value doesn't match what G-Labs expects, or the key was rotated.

Fix: Check the key registry and update. API keys are separate from tunnel URLs — tunnels rotate every session, keys stay the same until rotated.

Content policy violation

Cause: Prompt tripped a safety filter (rare).

Fix: The runner auto-retries — usually succeeds on second attempt with a slightly different seed. If it keeps failing, tweak the prompt language.

Node timeout

Cause: A single node took longer than its timeout setting.

Fix: Either bump the timeout property on the node, or rerun the node individually after the main pass completes. Logged in errors.json if it happens.

PatchWork import errors

"r.trim is not a function" toast when importing a .nbflow

Cause: One of several schema mismatches. Common ones:

  • Veo3 node has negativePrompt: undefined instead of a string
  • Dynamic Prompt has dynamicRows: [{label, text}, ...] (objects) instead of flat strings
  • Veo3 node has 2 input slots instead of 3
  • Input slot name uses underscore (start_frame) instead of space (start frame)

Fix: Run the pre-generation sanity check — it catches all of these and tells you which node is broken. See PatchWork Import Bugs for the full list.

Generated images look unrelated to the prompt — generic supermarket / kitchen / cafe scenes

Cause: A Dynamic Prompt's variableName doesn't match the template's {placeholder}. The literal string {scene} is being sent to NanoBanana as the prompt.

Fix: Set the Dynamic's variableName to a short lowercase identifier matching the placeholder (e.g. scene, dialogue, pose). The pre-generation sanity check catches this — if it's slipping through, your sanity check script is stale. See Architecture Patterns.

Avatar reference images aren't appearing in the generated output

Cause: Per-node link refs are stale — the central links array has the edge but node.outputs[].links / node.inputs[].link don't reflect it. PatchWork's UI renderer reads the per-node refs, so the UI-driven generation flow silently drops the reference.

Fix: Run manager/scripts/_lib_link_refs.py — call resync_link_refs(tab) on every tab, then assert_clean(workflow). Re-save the file. See PatchWork Import Bugs.

Cached Media node missing input slots after a generation pass

Cause: The Generation Runner swapped a NanobananaAPI node with a Media node holding the cached URL, but the Media node has 0 input slots while the original API node had 3. Incoming edges from avatar / setting refs now target slots that don't exist.

Fix: Restore from the pre-runner backup, bake the cached URL into the original NanobananaAPI node's _savedImages property instead of swapping types. See PatchWork Import Bugs.

Generation Runner errors

errors.json has entries after the run

Open the file. Each entry has the node ID, attempt count, and error message. Common entries:

Error Fix
content_policy Rerun (usually succeeds on retry)
timeout Bump node timeout, rerun manually
connection refused Restart G-Labs
model not available Check model: "nano_banana_2" is set
dangling link Run sanity check, fix the link, resave, rerun
Runner exits without an output file

Cause: Either the .nbflow is malformed (failed to parse) or the runner crashed early.

Fix: Check the console output for the actual error. If JSON parsing failed, the .nbflow is corrupted — restore from backup. If the runner crashed, the stack trace will name the file/line.

Generated images are NB1 quality, not NB2

Cause: model field on the NanobananaAPI node is missing or set to something other than nano_banana_2. G-Labs defaults to NanoBanana 1 when the field is unset.

Fix: Set model: "nano_banana_2" on every NanobananaAPI node. The sanity check catches this — run it before every generation pass.

Workflow / build errors

Find-and-replace dialogue swap clobbered per-account customizations

Cause: A Lvl ½ variant rewrite shipped canonical dialogue to every tab, overwriting per-account persona pivots (e.g. "for my mom" vs "for one of my patients").

Fix: After a variant lands, re-apply per-account CUSTOMIZED dialogue items. Run the fanout script's transforms as a post-variant pass, or re-apply the per-account swaps manually before publishing.

STANDARD content drift detected across tabs after fan-out

Cause: Someone changed a STANDARD item in one tab without promoting the change to all tabs.

Fix: Decide whether the change should be STANDARD (apply to all tabs) or CUSTOMIZED (document why this account needs the override). Never silently diverge a single tab. See Fan-out Protocol.

General debugging steps

When something fails and the error message isn't obvious:

  1. Run the pre-generation sanity check on the .nbflow. Eight out of ten issues surface here.
  2. Check G-Labs is up and the tunnel URL is current.
  3. Check the API key is valid.
  4. Inspect errors.json if one exists — it has per-node failure details.
  5. Try running with --concurrency 1 to make failures attributable to a specific node.
  6. Open the .nbflow in PatchWork's web UI to inspect the graph visually — broken edges, missing inputs, and misconfigured properties all show up there.