xpzouying/xiaohongshu-mcp · error
无法点击发送: %w
Error message
无法点击发送: %w
What it means
humanize.Click failed on the submit button, so the reply was never sent. The typed content is lost. Typical causes: button detached after re-render, covered by an overlay, or the click was intercepted by anti-bot checks.
Source
Thrown at xiaohongshu/notification_reply.go:84
}
if err := verifyReplyTarget(input, target.from().Nickname); err != nil {
return nil, err
}
if err := humanize.Type(ctx, input, content); err != nil {
return nil, fmt.Errorf("无法输入回复内容: %w", err)
}
humanize.Delay(ctx, humanize.AfterType)
submit, err := item.Element(`button.submit`)
if err != nil {
return nil, fmt.Errorf("未找到发送按钮: %w", err)
}
humanize.Delay(ctx, humanize.BeforeSubmit)
if err := humanize.Click(submit); err != nil {
return nil, fmt.Errorf("无法点击发送: %w", err)
}
if err := waitReplyAccepted(item, 8*time.Second); err != nil {
return nil, err
}
humanize.Delay(ctx, humanize.AfterInteract)
logrus.Infof("通知回复成功: comment=%s", commentID)
return &NotificationReplyResult{
CommentID: commentID,
Nickname: target.from().Nickname,
FeedID: target.Item.ID,
Content: content,
}, nil
}
// locate 找到目标评论在当前分区里的位置,必要时滚动加载。View on GitHub (pinned to 332d196854)
Solutions
- Retry the call with backoff — transient overlays usually clear
- Slow down reply frequency to avoid anti-bot rate limiting
- Ensure a valid logged-in session without login-wall overlays
- Update go-rod/humanize for known click reliability fixes
Defensive patterns
Strategy: retry
Try / catch
_, err := n.Reply(ctx, commentID, content)
if err != nil && strings.Contains(err.Error(), "无法点击发送") {
time.Sleep(3 * time.Second)
_, err = n.Reply(ctx, commentID, content)
} Prevention
- Rate-limit reply operations to avoid anti-bot overlays
- Maintain a healthy logged-in session
- Retry submit failures with backoff
When it happens
Trigger: humanize.Click(submit) errors during Reply — element handle stale, overlay blocking, or browser throttling the synthetic click.
Common situations: Modal or popup intercepting clicks; page re-rendered between lookup and click; rate-limiting overlay from too-frequent replies; headless environment flagged by anti-bot.
Related errors
AI-assisted analysis of xpzouying/xiaohongshu-mcp@332d196854 (2026-09-05).
Data as JSON: /api/errors/ac3224b7b034fff6.
Report an issue: GitHub.