{"record":{"id":"7aa602bc67c38f96","repo":"larksuite/cli","slug":"no-visible-worksheet-matched","errorCode":null,"errorMessage":"No visible worksheet matched","messagePattern":"No visible worksheet matched","errorType":"exception","errorClass":"LarkCliError","httpStatus":null,"severity":"error","filePath":"skills/lark-sheets/scripts/lark_chart_layout_check.py","lineNumber":455,"sourceCode":"    if report[\"data\"][\"passed\"]:\n        return 0\n    if report[\"data\"][\"summary\"][\"issue_count\"] > 0:\n        return 2\n    return 1\n\n\ndef main() -> None:\n    args = parse_args()\n    locator = _locator(args.sheet_id)\n    try:\n        workbook_data = envelope_data(\n            run_sheets(\"+workbook-info\", **locator, timeout=args.timeout)\n        )\n        sheets = resolve_target_sheets(workbook_data, sheet_id=args.worksheet_id)\n        if not args.worksheet_id:\n            sheets = [sheet for sheet in sheets if not bool(sheet.get(\"is_hidden\"))]\n        if not sheets:\n            raise LarkCliError(\"No visible worksheet matched\")\n        results = [\n            check_sheet(locator, sheet, timeout=args.timeout, sample_limit=args.sample_limit)\n            for sheet in sheets\n        ]\n    except (LarkCliError, KeyError, TypeError, ValueError) as exc:\n        emit_error(ACTION, str(exc))\n        raise SystemExit(1) from exc\n\n    report = success_envelope(results)\n    print(json.dumps(report, ensure_ascii=False, indent=2))\n    exit_code = report_exit_code(report)\n    if exit_code:\n        raise SystemExit(exit_code)\n\n\nif __name__ == \"__main__\":\n    main()\n","sourceCodeStart":437,"sourceCodeEnd":473,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/skills/lark-sheets/scripts/lark_chart_layout_check.py#L437-L473","documentation":"During suite-layout sync, syncSuite creates a temporary staging directory via vfs.MkdirTemp before staging the suite archive. If that temp-directory creation fails, the OS error is wrapped with this message. This is an environment/infrastructure failure, not a config problem.","triggerScenarios":"Running a skills sync in suite mode where vfs.MkdirTemp(\"\", \"lark-cli-suite-\") fails — no writable TMPDIR, full disk, read-only /tmp, sandbox lacking temp-dir permissions, or TMPDIR pointing at a nonexistent directory.","commonSituations":"CI containers with /tmp mounted read-only or size-limited; users running the CLI with TMPDIR set to a missing path; disk-quota exhaustion on hosts or remote/portable execution environments where FileIO/vfs is scoped.","solutions":["Check free disk space and clear space if the temp volume is full (df -h /tmp or your TMPDIR).","Ensure TMPDIR points to an existing writable directory, or unset a bad TMPDIR override.","Re-run the sync in an environment where the process can create temp directories (adjust sandbox/container permissions).","Retry the sync after fixing the environment; no config change is needed."],"exampleFix":"// before (broken env)\nexport TMPDIR=/nonexistent\n// after\nexport TMPDIR=$(mktemp -d -t lark-tmp-XXXX)/.. && mkdir -p \"$TMPDIR\"  # or simply: unset TMPDIR","handlingStrategy":"retry","validationCode":"// Pre-flight: temp dir writable?\nif f, err := os.CreateTemp(os.TempDir(), \"lark-preflight-*\"); err != nil {\n    return fmt.Errorf(\"temp dir not writable: %w\", err)\n} else { f.Close(); os.Remove(f.Name()) }","typeGuard":null,"tryCatchPattern":"if err := syncLayout(...); err != nil && strings.Contains(err.Error(), \"create suite staging directory\") {\n    // check TMPDIR and free space, then retry once after fixing the environment\n}","preventionTips":["Ensure TMPDIR points to an existing, writable directory in CI and containers.","Monitor free disk space on the temp volume before running skills sync.","Avoid read-only /tmp mounts in sandboxes used for the CLI."],"tags":["go","filesystem","temp-directory","environment"],"backgroundTag":"temp-dir-creation-failed","analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}