{"record":{"id":"e97df938aa7d6a6a","repo":"xpzouying/xiaohongshu-mcp","slug":"w-e97df9","errorCode":null,"errorMessage":"回复输入框未出现: %w","messagePattern":"回复输入框未出现: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xiaohongshu/notification_reply.go","lineNumber":65,"sourceCode":"\t}\n\titem := items[index]\n\n\thumanize.Delay(ctx, humanize.Reading)\n\n\treplyBtn, err := item.Element(`.action-reply`)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"该通知没有回复入口（评论可能已删除或不可回复）: %w\", err)\n\t}\n\n\thumanize.Delay(ctx, humanize.BeforeClick)\n\tif err := humanize.Click(replyBtn); err != nil {\n\t\treturn nil, fmt.Errorf(\"无法点击回复: %w\", err)\n\t}\n\thumanize.Delay(ctx, humanize.AfterClick)\n\n\tinput, err := item.Element(`textarea.comment-input`)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"回复输入框未出现: %w\", err)\n\t}\n\n\tif err := verifyReplyTarget(input, target.from().Nickname); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := humanize.Type(ctx, input, content); err != nil {\n\t\treturn nil, fmt.Errorf(\"无法输入回复内容: %w\", err)\n\t}\n\thumanize.Delay(ctx, humanize.AfterType)\n\n\tsubmit, err := item.Element(`button.submit`)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"未找到发送按钮: %w\", err)\n\t}\n\n\thumanize.Delay(ctx, humanize.BeforeSubmit)\n\tif err := humanize.Click(submit); err != nil {","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/xpzouying/xiaohongshu-mcp/blob/332d196854a9eac0d2b8c2c0e3d0cc43139d724c/xiaohongshu/notification_reply.go#L47-L83","documentation":"After clicking reply, Reply expects the inline `textarea.comment-input` to appear inside the notification item. If it does not, the reply editor never opened — the click may have silently failed or the UI structure changed. The library aborts rather than typing into the wrong element.","triggerScenarios":"item.Element('textarea.comment-input') fails after a successful reply-button click — editor did not open, opened elsewhere, or selector changed.","commonSituations":"Xiaohongshu updated the comment editor markup; click landed but animation/layout delayed editor mount beyond rod's default timeout; page partially loaded.","solutions":["Retry — the editor may need more time to mount; consider a retry with backoff","Check whether Xiaohongshu renamed the textarea selector and update the library","Verify the page is fully loaded and the session is active before replying","Increase rod's element lookup timeout via page.Timeout()"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"_, err := n.Reply(ctx, commentID, content)\nif err != nil && strings.Contains(err.Error(), \"回复输入框未出现\") {\n    time.Sleep(2 * time.Second)\n    _, err = n.Reply(ctx, commentID, content)\n}","preventionTips":["Retry once before failing the whole job","Keep the library updated for selector changes","Ensure the page is fully loaded before interactions"],"tags":["dom","selector","ui","xiaohongshu"],"backgroundTag":"selector-not-found","analyzedSha":"332d196854a9eac0d2b8c2c0e3d0cc43139d724c","analyzedAt":"2026-09-05T22:22:55.988Z","contentChangedAt":"2026-09-05T22:22:55.988Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}