{"record":{"id":"e9e79fe3abecc66c","repo":"larksuite/cli","slug":"skills-update-timed-out-after-s","errorCode":null,"errorMessage":"skills update timed out after %s","messagePattern":"skills update timed out after (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/selfupdate/updater.go","lineNumber":421,"sourceCode":"\t\treturn u.SkillsCommandOverride(args...)\n\t}\n\tr := &NpmResult{}\n\tdet := u.DetectInstallMethod()\n\tlauncher, cmdArgs := skillsInvocation(det.Method, det.PnpmAvailable, args)\n\tbinPath, err := exec.LookPath(launcher)\n\tif err != nil {\n\t\tr.Err = fmt.Errorf(\"%s not found in PATH: %w\", launcher, err)\n\t\treturn r\n\t}\n\tctx, cancel := context.WithTimeout(context.Background(), skillsUpdateTimeout)\n\tdefer cancel()\n\tcmd := exec.CommandContext(ctx, binPath, cmdArgs...)\n\tcmd.Dir = dir\n\tcmd.Stdout = &r.Stdout\n\tcmd.Stderr = &r.Stderr\n\tr.Err = cmd.Run()\n\tif ctx.Err() == context.DeadlineExceeded {\n\t\tr.Err = fmt.Errorf(\"skills update timed out after %s\", skillsUpdateTimeout)\n\t}\n\treturn r\n}\n\n// VerifyBinary checks that the installed binary reports the expected version\n// by running \"lark-cli --version\" and comparing the version token exactly.\n// Output format is \"lark-cli version X.Y.Z\"; the last field is extracted and\n// compared against expectedVersion (both stripped of any \"v\" prefix).\nfunc (u *Updater) VerifyBinary(expectedVersion string) error {\n\tif u.VerifyOverride != nil {\n\t\treturn u.VerifyOverride(expectedVersion)\n\t}\n\t// Prefer PATH resolution so npm global bin symlinks pick up the newly\n\t// installed binary (#836). If `lark-cli` is not on PATH (e.g. the user\n\t// invoked this process by absolute path), fall back to the running\n\t// executable — same as the pre-#836 secondary resolution path.\n\texe, err := execLookPath(\"lark-cli\")\n\tif err != nil {","sourceCodeStart":403,"sourceCodeEnd":439,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/internal/selfupdate/updater.go#L403-L439","documentation":"runSkillsCommandInDir executes the skills subcommand (staging/updating suites) with a context bounded by skillsUpdateTimeout. If the command outlives the deadline, the context cancels it and this error replaces the exec result to indicate a timeout.","triggerScenarios":"Invoking skills operations via StageSuite or runSkillsCommand (e.g. skills update/install) when the spawned npm/pnpm command runs longer than skillsUpdateTimeout, so ctx.Err() == context.DeadlineExceeded after cmd.Run().","commonSituations":"Slow network during skills package download; large skills suite updates; npm/pnpm waiting on registry under a proxy; congested CI runner or throttled connection.","solutions":["Check network/registry reachability and retry the skills command once connectivity is stable","Run the underlying package-manager command manually (e.g. `pnpm add -g @larksuite/cli`) to complete outside the timeout","Reduce work by updating only the needed skills suites instead of all suites","Use a faster registry mirror to speed up the package-manager operation"],"exampleFix":"// before\nres := updater.StageSuite(dir, args)\nif res.Err != nil { log.Fatal(res.Err) }\n// after\nres := updater.StageSuite(dir, args)\nif res.Err != nil {\n\tif strings.Contains(res.Err.Error(), \"timed out\") {\n\t\tlog.Printf(\"skills command timed out; check network and retry: %v\", res.Err)\n\t} else {\n\t\tlog.Fatal(res.Err)\n\t}\n}","handlingStrategy":"retry","validationCode":"if _, err := exec.LookPath(\"npm\"); err != nil { return } // launcher present\n// optionally probe registry latency before long skills updates","typeGuard":null,"tryCatchPattern":"res := stageResult\nif res.Err != nil {\n\tif strings.Contains(res.Err.Error(), \"timed out after\") {\n\t\t// retry once on a stable network, or run the package-manager command manually\n\t} else {\n\t\treturn res.Err\n\t}\n}","preventionTips":["Run skills updates on stable network connections","Update individual suites instead of everything when bandwidth is limited","Configure a fast registry mirror","Be aware of skillsUpdateTimeout and perform very large updates manually"],"tags":["timeout","skills","npm","pnpm","network"],"backgroundTag":"process-execution-timeout","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"}