ITADN

Fuma crashes after commenting — “Cannot read properties of undefined (reading 'name')”

#126ClosedgitDeveloper2 创建于 2025-06-26
G
gitDeveloper2commented
Hello, thank you for the great project! I'm running into an issue while integrating **Fuma** with a **Next.js** app using **MongoDB** and **NextAuth**. After submitting a comment, the app crashes with the following error: ``` Error: Cannot read properties of undefined (reading 'name') ``` ### What I’ve tried * I’ve followed the Fuma documentation for **MongoDB** and **NextAuth** integration exactly. * The `session.user.name` and `session.user.email` are always set — I’ve logged the session and confirmed these values exist. * After refreshing the page, the comment shows up — but the username is displayed as `DeletedUser`. ### What I’m not sure about I'm not sure what’s causing this: * Is the comment being created before the user is properly attached? * Is there an issue with how Fuma resolves users from the session or database? Any insight would be greatly appreciated. Let me know if you’d like me to include code snippets, session logs, or configuration details. Thanks in advance!
关闭于 2025-06-28 8 条评论