MemOS icon indicating copy to clipboard operation
MemOS copied to clipboard

fix: 扫描数据源 报错 ❌ Scan failed: unauthorized

Open HelloTomBruce opened this issue 8 months ago • 2 comments

Pre-submission checklist | 提交前检查

  • [x] I have searched existing issues and this hasn't been mentioned before | 我已搜索现有问题,确认此问题尚未被提及
  • [x] I have read the project documentation and confirmed this issue doesn't already exist | 我已阅读项目文档并确认此问题尚未存在
  • [x] This issue is specific to MemOS and not a general software issue | 该问题是针对 MemOS 的,而不是一般软件问题

Bug Description | 问题描述

❌ Scan failed: unauthorized

How to Reproduce | 如何重现

点击扫描数据源

Environment | 环境信息

-python 3.17

Additional Context | 其他信息

No response

Willingness to Implement | 实现意愿

  • [ ] I'm willing to implement this myself | 我愿意自己解决
  • [x] I would like someone else to implement this | 我希望其他人来解决

HelloTomBruce avatar Mar 13 '26 03:03 HelloTomBruce

Thanks for the report.

This is not a data-source permission issue. It is caused by Viewer session auth: when the current Viewer session is not logged in or has expired, /api/migrate/scan returns 401 unauthorized, and the UI shows Scan failed: unauthorized.

Please log in to Memory Viewer first, then click “Scan Data Sources” again. If it still happens after login, refresh the page and log in again before retrying.

We will improve this UX by replacing the raw unauthorized message with a clearer prompt like “Session expired, please log in again.”

感谢反馈。

这个报错的根因不是数据源权限问题,而是 Viewer 登录态校验触发:当当前会话未登录或会话已过期时,/api/migrate/scan 会返回 401 unauthorized,前端就会显示 Scan failed: unauthorized。

请先在 Memory Viewer 完成登录后再点击“扫描数据源”;如果已登录仍出现该问题,请尝试刷新页面并重新登录后重试。

我们会优化这部分提示文案,把 unauthorized 改为更明确的“会话已过期,请重新登录”。

hijzy avatar Mar 17 '26 07:03 hijzy

Hey @HelloTomBruce! Thanks for the contribution — already solved the issue, thanks for helping us to catch the bug! 🐞

Btw if you enjoyed contributing and want to stay connected with the project, we run a Discord server for contributors, a chill space to discuss features, ask questions, or pick up new issues  👉🏻 MemOS Discord Server (Contributor Exclusive)

Thanks again for shipping this, and happy MemOSing 🧠✨

angarchie avatar May 14 '26 09:05 angarchie