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.

Uncaught TypeError: Cannot read property 'getRanges' / 'nodeType' of undefined

See original GitHub issue

Hi, Is no one else stumbling across these two?

  • Cannot read property ‘getRanges’ of undefined
  • Cannot read property ‘nodeType’ of undefined

I’m seeing those regularly. I’ve not been able to reproduce them in an isolated environment yet, but I suppose its got something to do with custom blocks. I’m going to try and find out more, but I hoped that someone else might already have seen it? Or maybe you already got an idea @ianstormtaylor?

Gifs: dez -02-2016 20-38-15 dez -02-2016 20-38-33

Stacktraces:

Uncaught TypeError: Cannot read property 'getRanges' of undefined
    at Content.getPoint (http://localhost:3011/client/index.js:189565:24)
    at onSelect (http://localhost:3011/client/index.js:190136:29)
    at Object.ReactErrorUtils.invokeGuardedCallback (http://localhost:3011/client/index.js:59128:16)
    at executeDispatch (http://localhost:3011/client/index.js:58657:21)
    at Object.executeDispatchesInOrder (http://localhost:3011/client/index.js:58680:5)
    at executeDispatchesAndRelease (http://localhost:3011/client/index.js:38239:22)
    at executeDispatchesAndReleaseTopLevel (http://localhost:3011/client/index.js:38250:10)
    at Array.forEach (native)
    at forEachAccumulated (http://localhost:3011/client/index.js:95025:9)
    at Object.processEventQueue (http://localhost:3011/client/index.js:38453:7)
getPoint @ content.js:157
onSelect @ content.js:728
ReactErrorUtils.invokeGuardedCallback @ ReactErrorUtils.js:70
executeDispatch @ EventPluginUtils.js:85
executeDispatchesInOrder @ EventPluginUtils.js:108
executeDispatchesAndRelease @ EventPluginHub.js:43
executeDispatchesAndReleaseTopLevel @ EventPluginHub.js:54
forEachAccumulated @ forEachAccumulated.js:24
processEventQueue @ EventPluginHub.js:257
runEventQueueInBatch @ ReactEventEmitterMixin.js:17
handleTopLevel @ ReactEventEmitterMixin.js:28
handleTopLevelImpl @ ReactEventListener.js:72
perform @ Transaction.js:140
batchedUpdates @ ReactDefaultBatchingStrategy.js:62
batchedUpdates @ ReactUpdates.js:97
dispatchEvent @ ReactEventListener.js:147
index.js:239 [] [Object, Object]
normalize-node-and-offset.js:57 Uncaught TypeError: Cannot read property 'nodeType' of undefined
    at getNonComment (http://localhost:3011/client/index.js:197519:15)
    at normalizeNodeAndOffset (http://localhost:3011/client/index.js:197485:12)
    at Object.findKey (http://localhost:3011/client/index.js:65459:68)
    at Content.getPoint (http://localhost:3011/client/index.js:189560:43)
    at onSelect (http://localhost:3011/client/index.js:190136:29)
    at Object.ReactErrorUtils.invokeGuardedCallback (http://localhost:3011/client/index.js:59128:16)
    at executeDispatch (http://localhost:3011/client/index.js:58657:21)
    at Object.executeDispatchesInOrder (http://localhost:3011/client/index.js:58680:5)
    at executeDispatchesAndRelease (http://localhost:3011/client/index.js:38239:22)
    at executeDispatchesAndReleaseTopLevel (http://localhost:3011/client/index.js:38250:10)
getNonComment @ normalize-node-and-offset.js:57
normalizeNodeAndOffset @ normalize-node-and-offset.js:23
findKey @ offset-key.js:68
getPoint @ content.js:152
onSelect @ content.js:728
ReactErrorUtils.invokeGuardedCallback @ ReactErrorUtils.js:70
executeDispatch @ EventPluginUtils.js:85
executeDispatchesInOrder @ EventPluginUtils.js:108
executeDispatchesAndRelease @ EventPluginHub.js:43
executeDispatchesAndReleaseTopLevel @ EventPluginHub.js:54
forEachAccumulated @ forEachAccumulated.js:24
processEventQueue @ EventPluginHub.js:257
runEventQueueInBatch @ ReactEventEmitterMixin.js:17
handleTopLevel @ ReactEventEmitterMixin.js:28
handleTopLevelImpl @ ReactEventListener.js:72
perform @ Transaction.js:140
batchedUpdates @ ReactDefaultBatchingStrategy.js:62
batchedUpdates @ ReactUpdates.js:97
dispatchEvent @ ReactEventListener.js:147

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ianstormtaylorcommented, Dec 3, 2016

For the first error, I’ve got an update: I’ve got a similar error being thrown in my own codebase now, so it might be for the same reason.

I’ve just pushed up 0.16.1, so see if that solves your issue!

0reactions
bknifflercommented, Dec 8, 2016

heya! That did the trick @ianstormtaylor. Thank you for the effort, great work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

jQuery: Uncaught TypeError: Cannot read property 'nodeType ...
I ran into a similar issue. I was getting the following error: Uncaught TypeError: Cannot read property 'nodeType' of undefined.
Read more >
Uncaught TypeError: Cannot read property ... - SitePoint
Hello. Why do I receive it in the console: “Uncaught TypeError: Cannot read property 'nodeType' of undefined”.
Read more >
Uncaught TypeError: Cannot read property getRange of ...
Uncaught TypeError : Cannot read property 'nodeType' of undefined at Object.isEmptyBlock (ueditor.all.js:3938) at UE.Editor.hasCon... 1000多个 ...
Read more >
The "TypeError: Cannot read property 'nodeType' of undefined ...
The "TypeError: Cannot read property 'nodeType' of undefined" error occurs if DevExpress.ui is called in the jQuery.ready handler.
Read more >
Query: Advanced Search - Wikimedia Phabricator
T231381 [Regression wmf.20] Uncaught TypeError: Cannot read property 'getRoot' of undefined appears when adding new citation/chemical and math formula.
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