{"record":{"id":"b0b0be10e4921605","repo":"xpzouying/xiaohongshu-mcp","slug":"w-b0b0be","errorCode":null,"errorMessage":"未找到发送按钮: %w","messagePattern":"未找到发送按钮: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xiaohongshu/notification_reply.go","lineNumber":79,"sourceCode":"\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 {\n\t\treturn nil, fmt.Errorf(\"无法点击发送: %w\", err)\n\t}\n\n\tif err := waitReplyAccepted(item, 8*time.Second); err != nil {\n\t\treturn nil, err\n\t}\n\n\thumanize.Delay(ctx, humanize.AfterInteract)\n\n\tlogrus.Infof(\"通知回复成功: comment=%s\", commentID)\n\treturn &NotificationReplyResult{\n\t\tCommentID: commentID,\n\t\tNickname:  target.from().Nickname,\n\t\tFeedID:    target.Item.ID,","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/xpzouying/xiaohongshu-mcp/blob/332d196854a9eac0d2b8c2c0e3d0cc43139d724c/xiaohongshu/notification_reply.go#L61-L97","documentation":"After typing the reply, Reply looks for the submit button `button.submit` inside the notification item. If rod cannot find it, the editor rendered without a recognizable send button — usually a UI markup change or the editor state collapsed after typing. The library aborts without submitting a partial reply.","triggerScenarios":"item.Element('button.submit') fails after typing content — submit button not rendered, selector renamed, or editor closed unexpectedly.","commonSituations":"Xiaohongshu redesigned the reply editor buttons; typing triggered a validation state that hid the submit button; DOM re-render removed the editor mid-flow.","solutions":["Retry the call — transient render state often resolves","Check whether Xiaohongshu changed the submit button selector and update the library","Verify the reply content passes frontend validation (length limits) so the submit button stays enabled","Inspect the live DOM to confirm the current selector for the send button"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if len([]rune(content)) > 500 {\n    return fmt.Errorf(\"reply too long, submit button may be disabled\")\n}","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":["Keep content within frontend length limits","Retry transient editor-state failures","Track Xiaohongshu UI changes affecting selectors"],"tags":["dom","selector","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"}