Skip to content

bug: cant post anything due to duplicate atom key "postState". #104

Description

@Anxhul10

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**

  1. npm run dev
  2. visite (localhost:3000/community) on website
  3. try to post with images

Expected behavior

ability to post on communities

video

WhatsApp.Video.2024-09-05.at.12.07.25_918f8aae.mp4

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)
  • Low (only cause minor disruption keeping the site functional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions