{"record":{"id":"5f52e11151f43104","repo":"xpzouying/xiaohongshu-mcp","slug":"tab-s-esc","errorCode":null,"errorMessage":"发布 TAB %s 一直被浮层遮挡，Esc 与点击空白都未能关闭","messagePattern":"发布 TAB (.+?) 一直被浮层遮挡，Esc 与点击空白都未能关闭","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xiaohongshu/publish.go","lineNumber":184,"sourceCode":"\t\t\tblockedAtLeastOnce = true\n\t\t\tlogrus.Info(\"发布 TAB 被遮挡，尝试关闭浮层\")\n\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)","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/xpzouying/xiaohongshu-mcp/blob/332d196854a9eac0d2b8c2c0e3d0cc43139d724c/xiaohongshu/publish.go#L166-L202","documentation":"mustClickPublishTab 重试循环结束后的失败区分分支：发布 TAB 元素能找到且至少一次被判定被浮层遮挡，尝试 Esc 和点击空白（dismissPopCover）都关不掉弹层，导致 TAB 无法点击。与「根本找不到 TAB」是另一种情况。","triggerScenarios":"Thrown at xiaohongshu/publish.go:184 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["人工检查页面上是什么弹层（活动/引导/风控）","升级 dismissPopCover 覆盖更多弹层类型","重试整个进入发布页流程"],"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"}