Problem
When lark-cli fails in certain conditions, it exits with code 1 but produces
absolutely no output — stdout and stderr are both empty. This makes it impossible
to diagnose the root cause in automated/scripted contexts.
Reproduction
The following scenarios trigger silent failure (observed on macOS, using
spawnSync from Node.js with detached: true):
-
Large --data payload — api POST ... --data <json> fails silently when
the JSON body exceeds ~100KB (works at ~24KB / 100 records, fails at ~132KB /
500 records for a bitable/v1/.../records/batch_create call).
-
Keychain session conflict — when lark-cli is spawned as a child of a
Node.js process that has already opened a macOS Keychain session (e.g. via
keytar), lark-cli cannot decrypt its stored token and fails silently.
In both cases: exit code = 1, stdout = "", stderr = "".
Impact
Because there is zero diagnostic output, the only way to find the root cause is
binary search (e.g. bisecting record count, isolating fields one by one). What
should be a 5-minute debug took several hours.
Expected behavior
Any non-zero exit should write a human-readable error to stderr. Examples:
Error: request body too large (132KB), consider splitting into smaller batches
Error: failed to decrypt token — Keychain session may be locked or inherited
Error: API returned 400 — {"code":1254015,"msg":"field type mismatch"}
Environment
- macOS Sonoma
- lark-cli / @larksuite/cli (latest)
- Called via Node.js
spawnSync with stdio: ['ignore','pipe','pipe']
Problem
When
lark-clifails in certain conditions, it exits with code 1 but producesabsolutely no output — stdout and stderr are both empty. This makes it impossible
to diagnose the root cause in automated/scripted contexts.
Reproduction
The following scenarios trigger silent failure (observed on macOS, using
spawnSyncfrom Node.js withdetached: true):Large
--datapayload —api POST ... --data <json>fails silently whenthe JSON body exceeds ~100KB (works at ~24KB / 100 records, fails at ~132KB /
500 records for a
bitable/v1/.../records/batch_createcall).Keychain session conflict — when
lark-cliis spawned as a child of aNode.js process that has already opened a macOS Keychain session (e.g. via
keytar),lark-clicannot decrypt its stored token and fails silently.In both cases:
exit code = 1,stdout = "",stderr = "".Impact
Because there is zero diagnostic output, the only way to find the root cause is
binary search (e.g. bisecting record count, isolating fields one by one). What
should be a 5-minute debug took several hours.
Expected behavior
Any non-zero exit should write a human-readable error to stderr. Examples:
Error: request body too large (132KB), consider splitting into smaller batchesError: failed to decrypt token — Keychain session may be locked or inheritedError: API returned 400 — {"code":1254015,"msg":"field type mismatch"}Environment
spawnSyncwithstdio: ['ignore','pipe','pipe']