question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dnd with 2 tables, 2 routes, redux. "Cannot have two HTML5 backends at the same time"

See original GitHub issue

I have 2 routes: route1 and route2, which both render a MUI-datatable. In 3.1.1, when I switch from route1 to route2, i get an error:

Cannot have two HTML5 backends at the same time

Stacktrace shows that this is a dnd error. As such, I downgraded to 3.0.1 and now the error doesn’t happen.

I hope this is useful. I can provide more details if necessary on Thursday.

Full stack trace of error:


HTML5BackendImpl.setup
node_modules/react-dnd-html5-backend/dist/esm/HTML5BackendImpl.js:403
DragDropManagerImpl.handleRefCountChange
node_modules/dnd-core/dist/esm/DragDropManagerImpl.js:38
dispatch
node_modules/redux/es/redux.js:222
HandlerRegistryImpl.addTarget
node_modules/dnd-core/dist/esm/HandlerRegistryImpl.js:101
registerTarget
node_modules/react-dnd/dist/esm/common/registration.js:3
registerHandler
node_modules/react-dnd/dist/esm/hooks/internal/drop.js:54
commitHookEffectListMount
node_modules/react-dom/cjs/react-dom.development.js:19731
commitLifeCycles
node_modules/react-dom/cjs/react-dom.development.js:19787
commitLayoutEffects
node_modules/react-dom/cjs/react-dom.development.js:22803
HTMLUnknownElement.callCallback
node_modules/react-dom/cjs/react-dom.development.js:188
invokeGuardedCallbackDev
node_modules/react-dom/cjs/react-dom.development.js:237
invokeGuardedCallback
node_modules/react-dom/cjs/react-dom.development.js:292
commitRootImpl
node_modules/react-dom/cjs/react-dom.development.js:22541
unstable_runWithPriority
node_modules/scheduler/cjs/scheduler.development.js:653
runWithPriority$1
node_modules/react-dom/cjs/react-dom.development.js:11039
commitRoot
node_modules/react-dom/cjs/react-dom.development.js:22381
finishSyncRender
node_modules/react-dom/cjs/react-dom.development.js:21807
performSyncWorkOnRoot
node_modules/react-dom/cjs/react-dom.development.js:21793
(anonymous function)
node_modules/react-dom/cjs/react-dom.development.js:11089
unstable_runWithPriority
node_modules/scheduler/cjs/scheduler.development.js:653
runWithPriority$1
node_modules/react-dom/cjs/react-dom.development.js:11039
flushSyncCallbackQueueImpl
node_modules/react-dom/cjs/react-dom.development.js:11084
flushSyncCallbackQueue
node_modules/react-dom/cjs/react-dom.development.js:11072
batchedUpdates$1
node_modules/react-dom/cjs/react-dom.development.js:21862
notify
node_modules/react-redux/es/utils/Subscription.js:19
Subscription.notifyNestedSubs
node_modules/react-redux/es/utils/Subscription.js:92
Subscription.handleChangeWrapper
node_modules/react-redux/es/utils/Subscription.js:97
dispatch
node_modules/redux/es/redux.js:222
e
<anonymous>:1:40553
(anonymous function)
node_modules/@reduxjs/toolkit/node_modules/redux-thunk/es/index.js:11
▲ 30 stack frames were expanded.
(anonymous function)
src/immutableStateInvariantMiddleware.ts:249
  246 |        )
  247 |      })
  248 | 
> 249 |      const dispatchedAction = next(action)
      | ^  250 | 
  251 |      measureUtils.measureTime(() => {
  252 |        state = getState()
View compiled
dispatch
node_modules/redux/es/redux.js:638
_temp3
src/createAsyncThunk.ts:383
  380 |          finalAction.meta.condition
  381 | 
  382 |        if (!skipDispatch) {
> 383 |          dispatch(finalAction)
      | ^  384 |        }
  385 |        return finalAction
  386 |      })()
View compiled
Tech Version
Material-UI 4.10.1
MUI-datatables 3.1.1
React 16.13.1
reduxjs/toolkit 1.3.5
redux 4.0.5
redux-thunk 2.3.0
react-redux 7.2.0
redux-thunk 2.3.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
patorjkcommented, Jun 26, 2020

Glad to hear, thank you all for the report!

1reaction
dyukovladcommented, Jun 25, 2020

Also faced with the same problem. After updating the package, everything went smoothly. Thanks you

Read more comments on GitHub >

github_iconTop Results From Across the Web

React DnD - "Cannot have two HTML5 backends at the same ...
My front is in ReactJS. I have 3 components, first, the container call "Candidates", this component call 2 "CardBoard" components that call " ......
Read more >
"Cannot have two HTML5 backends at the same time."-Reactjs
You can either create a new file and import DragDropContext where you need it: import HTML5 from 'react-dnd-html5-backend'; import {DragDropContext} from ...
Read more >
remix-dnd - CodeSandbox - Remix Guide
remix-dnd by kiliman using @remix-run/react, @remix-run/serve, react, react-dnd, react-dnd-html5-backend, react-dom, remix.
Read more >
Learn from 425 web development courses on egghead
In this course, we go through 3 instrumental libraries for React Native - Linear Gradient, Masked View, and Reanimated 2 - and in...
Read more >
Functional Web Development with React and Redux
2. JavaScript Tooling Fatigue. 2. Why React Doesn't Have to Be Hard to Learn ... incorporating Jest testing and routing with the React...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found