{"record":{"id":"87503da88be91346","repo":"xpzouying/xiaohongshu-mcp","slug":"tab-s","errorCode":null,"errorMessage":"没有找到发布 TAB - %s","messagePattern":"没有找到发布 TAB - (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xiaohongshu/publish.go","lineNumber":186,"sourceCode":"\t\t\tdismissPopCover(page)\n\t\t\ttime.Sleep(200 * time.Millisecond)\n\t\t\tcontinue\n\t\t}\n\n\t\tif err := humanize.Click(tab); err != nil {\n\t\t\tlogrus.Warnf(\"点击发布 TAB 失败: %v\", err)\n\t\t\ttime.Sleep(200 * time.Millisecond)\n\t\t\tcontinue\n\t\t}\n\n\t\treturn nil\n\t}\n\n\t// 区分两种失败：找不到 TAB，和找到了但浮层一直关不掉\n\tif blockedAtLeastOnce {\n\t\treturn errors.Errorf(\"发布 TAB %s 一直被浮层遮挡，Esc 与点击空白都未能关闭\", tabname)\n\t}\n\treturn errors.Errorf(\"没有找到发布 TAB - %s\", tabname)\n}\n\nfunc getTabElement(page *rod.Page, tabname string) (*rod.Element, bool, error) {\n\telems, err := page.Elements(\"div.creator-tab\")\n\tif err != nil {\n\t\treturn nil, false, err\n\t}\n\n\tfor _, elem := range elems {\n\t\tif !isElementVisible(elem) {\n\t\t\tcontinue\n\t\t}\n\n\t\ttext, err := elem.Text()\n\t\tif err != nil {\n\t\t\tlogrus.Debugf(\"获取发布 TAB 文本失败: %v\", err)\n\t\t\tcontinue\n\t\t}","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/xpzouying/xiaohongshu-mcp/blob/332d196854a9eac0d2b8c2c0e3d0cc43139d724c/xiaohongshu/publish.go#L168-L204","documentation":"mustClickPublishTab 的另一失败分支：遍历 div.creator-tab 始终没有找到与 tabname 匹配的 TAB 元素（且未被浮层遮挡过）：发布页未加载完成、TAB 文案变化或选择器失效。","triggerScenarios":"Thrown at xiaohongshu/publish.go:186 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["等待发布页完全加载后重试","核对 TAB 文案与 div.creator-tab 选择器","确认页面未被重定向到登录页"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"332d196854a9eac0d2b8c2c0e3d0cc43139d724c","analyzedAt":"2026-09-05T22:22:55.988Z","contentChangedAt":"2026-09-05T22:22:55.988Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}