Skip to content

Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. #811

@ru4ert

Description

@ru4ert

Does anyone have an idea why the fitWidth component is not working and how to fix this?

fitWidth.js:59 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
    at ResponsiveComponent.<anonymous> (fitWidth.js:59:1)
    at callCallback (react-dom.development.js:13122:1)
    at commitUpdateQueue (react-dom.development.js:13143:1)
    at commitLayoutEffectOnFiber (react-dom.development.js:23263:1)
    at commitLayoutMountEffects_complete (react-dom.development.js:24578:1)
    at commitLayoutEffects_begin (react-dom.development.js:24564:1)
    at commitLayoutEffects (react-dom.development.js:24502:1)
    at commitRootImpl (react-dom.development.js:26779:1)
    at commitRoot (react-dom.development.js:26638:1)
    at finishConcurrentRender (react-dom.development.js:25937:1)
(anonymous) @ fitWidth.js:59
callCallback @ react-dom.development.js:13122
commitUpdateQueue @ react-dom.development.js:13143
commitLayoutEffectOnFiber @ react-dom.development.js:23263
commitLayoutMountEffects_complete @ react-dom.development.js:24578
commitLayoutEffects_begin @ react-dom.development.js:24564
commitLayoutEffects @ react-dom.development.js:24502
commitRootImpl @ react-dom.development.js:26779
commitRoot @ react-dom.development.js:26638
finishConcurrentRender @ react-dom.development.js:25937
performConcurrentWorkOnRoot @ react-dom.development.js:25765
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
react-dom.development.js:18572 The above error occurred in the <fitWidth(CandleStickChartWithCHMousePointer)> component:

    at ResponsiveComponent (http://localhost:3000/static/js/bundle.js:143641:7)
    at div
    at http://localhost:3000/static/js/bundle.js:4678:66
    at Container (http://localhost:3000/static/js/bundle.js:32132:19)
    at ChartFn (http://localhost:3000/main.79350bc3cb6201a53177.hot-update.js:58:5)
    at main
    at http://localhost:3000/static/js/bundle.js:4678:66
    at Box (http://localhost:3000/static/js/bundle.js:32997:72)
    at div
    at http://localhost:3000/static/js/bundle.js:4678:66
    at Box (http://localhost:3000/static/js/bundle.js:32997:72)
    at Live (http://localhost:3000/static/js/bundle.js:2682:76)
    at Outlet (http://localhost:3000/static/js/bundle.js:132320:26)
    at div
    at http://localhost:3000/static/js/bundle.js:4678:66
    at Box (http://localhost:3000/static/js/bundle.js:32997:72)
    at div
    at App (http://localhost:3000/static/js/bundle.js:883:5)
    at Routes (http://localhost:3000/static/js/bundle.js:132412:5)
    at Routes (http://localhost:3000/static/js/bundle.js:112:5)
    at InnerThemeProvider (http://localhost:3000/static/js/bundle.js:32210:70)
    at ThemeProvider (http://localhost:3000/static/js/bundle.js:31595:5)
    at ThemeProvider (http://localhost:3000/static/js/bundle.js:32230:5)
    at Styling (http://localhost:3000/static/js/bundle.js:307:107)
    at FinnhubProvider (http://localhost:3000/static/js/bundle.js:3525:5)
    at LocalizationProvider (http://localhost:3000/static/js/bundle.js:39756:81)
    at Provider (http://localhost:3000/static/js/bundle.js:128474:5)
    at SnackbarProvider (http://localhost:3000/static/js/bundle.js:96908:24)
    at Router (http://localhost:3000/static/js/bundle.js:132345:15)
    at BrowserRouter (http://localhost:3000/static/js/bundle.js:131154:5)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions