cruise-automation / webviz

web-based visualization libraries
https://webviz.io/
Apache License 2.0
2.07k stars 413 forks source link

withTransforms() (created by ForwardRef) issue running `npm run webviz-dev` #600

Open cjds opened 3 years ago

cjds commented 3 years ago

Getting this when I run npm run webviz-dev .

This version looks broken to me

root@FR-1603:~/src/webviz# node --version
v10.22.1
root@FR-1603:~/src/webviz# git log -n1
commit f16b3691951b7a177a0e27dc45b509fa3f884c31 (HEAD, cruise/master)
Author: Chris Hasson <chris@remix.com>
Date:   Thu Mar 11 14:54:15 2021 -0800

    Update packages/webviz-core from internal repo (#596)

    Changelog:
    -

    Co-authored-by: Chris Hasson <chris.hasson@getcruise.com>

image

Error stack:
Invariant Violation: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
    at eval (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:16237:26)
    at Object.throwInvalidHookError (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:16240:5)
    at Object.useRef (webpack-internal:///./node_modules/react/cjs/react.development.js:1645:21)
    at withTransforms() (webpack-internal:///./packages/webviz-core/src/panels/ThreeDimensionalViz/withTransforms.js:30:30)
    at Component.hotComponentRender (webpack-internal:///./packages/webviz-core/node_modules/react-hot-loader/dist/react-hot-loader.development.js:742:16)
    at Component.proxiedRender (webpack-internal:///./packages/webviz-core/node_modules/react-hot-loader/dist/react-hot-loader.development.js:770:36)
    at finishClassComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:18407:31)
    at updateClassComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:18360:24)
    at beginWork$1 (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:20108:16)
    at HTMLUnknownElement.callCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:362:14)
Component stack:
    in withTransforms() (created by ForwardRef)
    in ForwardRef (created by FrameCompatibilityComponent)
    in FrameCompatibilityComponent (created by ForwardRef)
    in ForwardRef (created by Panel())
    in ErrorBoundary (created by Panel())
    in div (created by Flex)
    in Flex (created by Panel())
    in Panel() (created by HotExportedComponent)
    in AppContainer (created by HotExportedComponent)
    in HotExportedComponent (created by MosaicRoot)
    in div (created by InternalMosaicWindow)
    in div (created by InternalMosaicWindow)
    in InternalMosaicWindow (created by Context.Consumer)
    in DragSource(InternalMosaicWindow) (created by Context.Consumer)
    in DropTarget(DragSource(InternalMosaicWindow)) (created by MosaicWindow)
    in MosaicWindow (created by MosaicRoot)
    in div (created by MosaicRoot)
    in div (created by MosaicRoot)
    in MosaicRoot (created by MosaicRoot)
    in div (created by MosaicRoot)
    in MosaicRoot (created by UnconnectedPanelLayout)
    in ErrorBoundary (created by UnconnectedPanelLayout)
    in UnconnectedPanelLayout (created by ForwardRef)
    in ForwardRef (created by PlayerManager)
    in div (created by PlayerManager)
    in Provider (created by MessagePipelineProvider)
    in MessagePipelineProvider (created by PlayerManager)
    in PlayerManager (created by ConnectFunction)
    in ConnectFunction (created by App)
    in div (created by App)
    in App (created by ComponentWithDragDropContext)
    in Unknown (created by ComponentWithDragDropContext)
    in ComponentWithDragDropContext (created by ConnectFunction)
    in ConnectFunction (created by Context.Consumer)
    in Route (created by Root)
    in ErrorBoundary (created by Root)
    in div (created by Root)
    in Router (created by ConnectedRouter)
    in ConnectedRouter (created by Context.Consumer)
    in ConnectedRouterWithContext (created by ConnectFunction)
    in ConnectFunction (created by Root)
    in Provider (created by Root)
    in Root (created by HotExportedRoot)
    in AppContainer (created by HotExportedRoot)
    in HotExportedRoot (created by Root)
    in Root
cjds commented 3 years ago

Was fixed with this commit confirmed https://github.com/cruise-automation/webviz/commit/12517e8773cbbc92c1fa55d6461610ac4e757469