react-trello icon indicating copy to clipboard operation
react-trello copied to clipboard

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

Open bkaganyildiz opened this issue 2 years ago • 6 comments

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):

  • OS: [macOS]
  • Browser [chrome]
  • Version [2.2.11]

bkaganyildiz avatar Sep 05 '22 20:09 bkaganyildiz

same issue here!

amprodes avatar Sep 07 '22 04:09 amprodes

same issue here!

yashdudhat69 avatar Oct 12 '22 11:10 yashdudhat69

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)

MarllonGomes avatar Oct 17 '22 13:10 MarllonGomes

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

mulib avatar Feb 07 '23 11:02 mulib

@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:

  • https://github.com/atlassian/react-beautiful-dnd (JavaScript)
  • https://github.com/hello-pangea/dnd (a fork of react-beautiful-dnd in TypeScript and React v18 and StrictMode compatible)

kivohin avatar Feb 21 '23 18:02 kivohin

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)

bmelton-mdsol avatar May 07 '24 21:05 bmelton-mdsol