bug: cant post anything due to duplicate atom key "postState".
This is what is get on posting
Expectation Violation: Duplicate atom key "postState". This is a FATAL ERROR in
production. But it is safe to ignore this warning if it occurred because of
hot module replacement.
at expectationViolation (D:\github projects\next_discussion_platform\node_modules\recoil\cjs\index.js:671:19)
at checkForDuplicateAtomKey (D:\github projects\next_discussion_platform\node_modules\recoil\cjs\index.js:752:9)
at registerNode (D:\github projects\next_discussion_platform\node_modules\recoil\cjs\index.js:763:5)
at baseAtom (D:\github projects\next_discussion_platform\node_modules\recoil\cjs\index.js:8347:16)
at atom (D:\github projects\next_discussion_platform\node_modules\recoil\cjs\index.js:8399:12)
at eval (webpack-internal:///./atoms/postsAtom.ts:37:67)
at ./atoms/postsAtom.ts (D:\github projects\next_discussion_platform\.next\server\pages\community\[communityId].js:407:1)
at __webpack_require__ (D:\github projects\next_discussion_platform\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///./hooks/usePosts.tsx:8:74)
at __webpack_require__.a (D:\github projects\next_discussion_platform\.next\server\webpack-runtime.js:97:13)
at eval (webpack-internal:///./hooks/usePosts.tsx:1:21)
at ./hooks/usePosts.tsx (D:\github projects\next_discussion_platform\.next\server\pages\community\[communityId].js:807:1)
at __webpack_require__ (D:\github projects\next_discussion_platform\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///./components/Posts/Posts.tsx:9:73)
at __webpack_require__.a (D:\github projects\next_discussion_platform\.next\server\webpack-runtime.js:97:13)
GET /_next/data/development/community/nigga.json?communityId=nigga 200 in 894ms
GET /community/nigga 200 in 556ms
Reproducing the bug**
- npm run dev
- visite (localhost:3000/community) on website
- try to post with images
Expected behavior
ability to post on communities
video
https://github.com/user-attachments/assets/e59aebfe-9c67-4024-94b8-b7f35cb866ce
Platforms
Desktop (please complete the following information):
- OS: windows
- Browser: chrome
- Version: 128.0.6613.119
Severity:
- [ ] High (completely break the functionality and usability of the site)
- [ ] Medium (significant disruption or degrade user experience)
- [x] Low (only cause minor disruption keeping the site functional)
Hi, thanks for the feedback. I am currently very busy with university as I am taking a masters in AI so I won't be able to fix it for now.
Hi, I just finished university and I will working on this after doing a migration to newer versions of the stack and app router for Nextjs. I already started migrating to a newer version of Chakra UI.
Hi, I just finished university and I will working on this after doing a migration to newer versions of the stack and app router for Nextjs. I already started migrating to a newer version of Chakra UI.
congrats and thanks ! If you need help I might be able to help out
Hi, I just finished university and I will working on this after doing a migration to newer versions of the stack and app router for Nextjs. I already started migrating to a newer version of Chakra UI.
congrats and thanks ! If you need help I might be able to help out
Thank you. I completed the migration and I am now working on issues. Currently working on the dark mode. You can implement a fix if you want and it would be much appreciated.
Expectation Violation: Duplicate atom key "postState". This is a FATAL ERROR in production. But it is safe to ignore this warning if it occurred because of hot module replacement.
This seems to be an issue with state management which was handled by Recoil. I recently replaced Recoil with Jotai as Recoil is deprecated. I couldn't get to replicate this issue on my site. Could you try again with the new changes and see if you still get this error. Thanks
Right now end sems are going on I'll trying to replicate the issue asap