rcdexta / react-trello

Pluggable components to add a kanban board to your application
https://rcdexta.com/react-trello/
MIT License
2.19k stars 481 forks source link

Cannot read properties of null (reading 'trySubscribe') cause he above error occurred in the <Connect(BoardContainer)> component #510

Open bkaganyildiz opened 2 years ago

bkaganyildiz commented 2 years ago

I'm trying to use react-trello created a new app and directly used simple Board implementation but encountered with this problem. To Reproduce Just created new react-app installed react-trello using npm install. Added Board with a sample data to App.

Uncaught TypeError: Cannot read properties of null (reading 'trySubscribe') at Connect.componentDidMount (connectAdvanced.js:147:1) at invokeLayoutEffectMountInDEV (react-dom.development.js:25133:1) at invokeEffectsInDev (react-dom.development.js:27351:1) at commitDoubleInvokeEffectsInDEV (react-dom.development.js:27327:1) at flushPassiveEffectsImpl (react-dom.development.js:27056:1) at flushPassiveEffects (react-dom.development.js:26984:1) at performSyncWorkOnRoot (react-dom.development.js:26076:1) at flushSyncCallbacks (react-dom.development.js:12042:1) at commitRootImpl (react-dom.development.js:26959:1) at commitRoot (react-dom.development.js:26682:1)

The above error occurred in the <Connect(BoardContainer)> component:

at Connect (http://localhost:3000/static/js/bundle.js:50779:28)
at Provider (http://localhost:3000/static/js/bundle.js:50614:26)
at Board (http://localhost:3000/static/js/bundle.js:47729:7)
at _default (http://localhost:3000/static/js/bundle.js:49111:25)
at div
at App (http://localhost:3000/static/js/bundle.js:90:48)

Do I miss something or is there a problem?

Screenshots

Screen Shot 2022-09-05 at 22 19 08

Desktop (please complete the following information):

amprodes commented 2 years ago

same issue here!

yashdudhat69 commented 1 year ago

same issue here!

MarllonGomes commented 1 year ago

just install react-redux, it will overwrite react-trello dep which is oudated. yarn add react-redux (for me solved with version 5.1.2)

mulib commented 1 year ago

Hi I have the same problem, it seems that react-trello still using the old react API. Doe's anybody knows if this package still being maintained? we are using it extensively within our app and i whoul'd like to know if they going to be compatible with latest react version

kivohin commented 1 year ago

@bkaganyildiz this is probably because your new React app is using React v18 and entirely wrapped in React.StrictMode (import { StrictMode } from "react";).

While not an ideal solution, you can remove the StrictMode for the entire app, and add it in a more granular way.

Even better, I would avoid using the react-trello package since it hasn't gotten updated in good while, and use instead:

bmelton-mdsol commented 4 months ago

This is the only spot on the entire internet where I saw this specific error mentioned. It's been driving me crazy. The solution given here to upgrade react-redux worked for me, with one additional step: Once I upgraded react-redux (to 7.2.0), the 'trySubscribe' error went away, but then I got a 'withRef' error. Based on further research, I solved the 'withRef' error by upgrading 'redux-form' to the latest (8.3.10 as of this writing) (I'm on React and ReactDOM 18.2.0)