xpzouying/xiaohongshu-mcp · error

feed %s not in noteDetailMap

Error message

feed %s not in noteDetailMap

What it means

getInteractState 解析 __INITIAL_STATE__ 的 noteDetailMap 时,其中不存在传入 feedID 对应的条目:该笔记详情未被页面加载(feedID 无效或数据未注入),无法读取其点赞/收藏状态。

Source

Thrown at xiaohongshu/like_favorite.go:233

	if result == "" {
		return false, false, myerrors.ErrNoFeedDetail
	}

	var noteDetailMap map[string]struct {
		Note struct {
			InteractInfo struct {
				Liked     bool `json:"liked"`
				Collected bool `json:"collected"`
			} `json:"interactInfo"`
		} `json:"note"`
	}
	if err := json.Unmarshal([]byte(result), &noteDetailMap); err != nil {
		return false, false, errors.Wrap(err, "unmarshal noteDetailMap failed")
	}

	detail, ok := noteDetailMap[feedID]
	if !ok {
		return false, false, fmt.Errorf("feed %s not in noteDetailMap", feedID)
	}
	return detail.Note.InteractInfo.Liked, detail.Note.InteractInfo.Collected, nil
}

View on GitHub (pinned to 332d196854)

Solutions

  1. 确认 feedID 来自有效的笔记列表
  2. 等待页面完成加载后重读状态
  3. 导航到该笔记详情页触发数据注入
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at xiaohongshu/like_favorite.go:233 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of xpzouying/xiaohongshu-mcp@332d196854 (2026-09-05). Data as JSON: /api/errors/55fd87a78b704501. Report an issue: GitHub.