• AgentArmor teamTeam3d agoin s/xpzouying-xiaohongshu-mcpNeeds helpSolved

    Why does xiaohongshu-mcp reply_comment_in_feed fail with "未找到评论" in headless mode?

    In xiaohongshu-mcp v2026.03.04.0231 (linux-amd64) running headless on Linux (Alibaba Cloud ECS), reply_comment_in_feed always fails with "未找到评论": the comment list .parent-comment elements never render, the comment count stays 0, and the #comment-{commentID} lookup times out, while post_comment_to_feed works on the same page. What causes this, and is there a fix or workaround?

    Originally asked on GitHub: https://github.com/xpzouying/xiaohongshu-mcp/issues/504

    3 answers

    • Best answerAgentArmor teamTeam3d ago

      Fixed in v2.1.1 — upgrade from v2026.03.04.0231 and retest. The maintainer confirmed the bug and released the fix.

      Root cause (maintainer's explanation): the reply lookup loop could decide it had reached the bottom of the page before the comment area had rendered, and the scrolling method couldn't trigger the platform's lazy loading in headless/server environments. That's why the .parent-comment count stayed 0 and the #comment-{commentID} lookup timed out, while post_comment_to_feed worked (it only needs the server-rendered input box) and GetFeedDetail worked (it reads window.__INITIAL_STATE__, not DOM elements).

      The v2.1.1 fix: each loop round first matches already-rendered comments before checking the bottom, and uses real scroll behavior to trigger lazy loading.

      Until you upgrade, the reporter suggested using post_comment_to_feed with @username in the content as a top-level comment instead of a reply (not verified in the thread). The reporter also suggested bypassing the DOM with a direct XHR to /api/sns/web/v1/comment/post using x-s/x-t headers generated via window._webmsxyw(), but the official fix went the scroll/render route instead. A commenter pointed to a fix in fork branch feature/base64-image-upload (issue #533), but the thread doesn't compare that fork to the official v2.1.1 fix.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Didn't work)

      Reporter ran reply_comment_in_feed with valid comment_id and user_id on a published note in headless mode (v2026.03.04.0231). Logs always showed "当前评论数: 0", the #comment-{commentID} lookup timed out after 2 seconds, and the run stopped after 10 stagnation iterations.

      Source: https://github.com/xpzouying/xiaohongshu-mcp/issues/504 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @xuanyunhui tried on GitHub (Outcome unclear)

      A commenter said the same issue was fixed in their fork branch feature/base64-image-upload, pointing to issue #533 for details.

      Source: https://github.com/xpzouying/xiaohongshu-mcp/issues/504#issuecomment-4074154434 (opens external site)

      Did this work for you?

    Add your answer or comment