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.

Bug - Uncaught TypeError: Cannot read property 'position' of undefined

See original GitHub issue

My app is crashing due to an uncaught exception. See below for details. Perhaps this could be handled more gracefully such a console warning?

Uncaught TypeError: Cannot read property 'position' of undefined
    at nodes.reduce.x (zoom.js:448)
    at Array.reduce (<anonymous>)
    at getRectOfNodes (zoom.js:448)
    at zoom.js:448
    at easy-peasy.esm.js:333
    at simpleProduce (easy-peasy.esm.js:305)
    at runActionReducerAtPath (easy-peasy.esm.js:332)
    at reducerForActions (easy-peasy.esm.js:342)
    at rootReducer (easy-peasy.esm.js:361)
    at dispatch (redux.js:213)
    at easy-peasy.esm.js:538
    at easy-peasy.esm.js:807
    at index.js:11
    at Object.dispatch (easy-peasy.esm.js:890)
    at actionCreator (easy-peasy.esm.js:698)
    at zoom.js:448
    at commitHookEffectListMount (react-dom.development.js:19731)
    at commitPassiveHookEffects (react-dom.development.js:19769)
    at HTMLUnknownElement.callCallback (react-dom.development.js:188)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
    at invokeGuardedCallback (react-dom.development.js:292)
    at flushPassiveEffectsImpl (react-dom.development.js:22853)
    at unstable_runWithPriority (scheduler.development.js:653)
    at runWithPriority$1 (react-dom.development.js:11039)
    at flushPassiveEffects (react-dom.development.js:22820)
    at performSyncWorkOnRoot (react-dom.development.js:21737)
    at react-dom.development.js:11089
    at unstable_runWithPriority (scheduler.development.js:653)
    at runWithPriority$1 (react-dom.development.js:11039)
    at flushSyncCallbackQueueImpl (react-dom.development.js:11084)
    at flushSyncCallbackQueue (react-dom.development.js:11072)
    at discreteUpdates$1 (react-dom.development.js:21893)
    at discreteUpdates (react-dom.development.js:806)
    at dispatchDiscreteEvent (react-dom.development.js:4168)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wdfinchcommented, Sep 18, 2020

Seems like this is fixed now. I will continue testing to make sure. Thanks so much for getting this out quickly. I really appreciate it.

0reactions
danyflorezcommented, Oct 8, 2021

🆙 My error was due to messing up with node.__rf.width and node.__rf.height properties

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'position' of ...
This is all about passing parameter and expose objects. You can't access the ui parameter in your "myFunction" because, if I guess right,...
Read more >
Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError : Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError: Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
How to Fix TypeError: Cannot read Property 'push' of ...
You call the method on a variable previously set to undefined . · You call the method on a variable before it has...
Read more >
Cannot read property 'position' of undefined at render ...
Uncaught TypeError : Cannot read property 'position' of undefined at render ... Hi everyone, this is a part of my code and i...
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