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.

0.47.x - seems nearly impossible to debug certain issues

See original GitHub issue

Technically the issue I’m seeing appears to be in slate-react, not slate

I’m upgrading from Slate 0.45.x, and overall it’s been simple, but trying to fix my custom decorator functions is proving quite difficult. If anything goes wrong in the decoration or annotation part of the editor, all I get is: TypeError: Cannot read property 'ownerDocument' of null

You get this same error if you don’t pass {...attributes} to a custom node, but I can’t figure out for the life of me what in my decorator functions I’m trying to upgrade is throwing this error…

It’s been about 4 hours of blackbox debugging, and though I’ve made progress, I’m still facing the exact same error. It’s just been slicing through errors all day to find the same error cropping up. I’ve inspected my decoration function in excruciating detail and I can’t find any issue, and the error message gives no clues.

Am I overlooking something simple? Is there a way we can get more explicit error messages, if this isn’t just me being dumb?

Full message:

   TypeError: Cannot read property 'ownerDocument' of null
   at getDocument (webpack://renderer/./node_modules/get-document/index.js?:37:30)
    at getWindow (webpack://renderer/./node_modules/get-window/index.js?:43:13)
    at Content.componentWillUnmount (webpack://renderer/./node_modules/slate-react/lib/slate-react.es.js?:1660:69)
    at callComponentWillUnmountWithTimer (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:17169:12)
    at HTMLUnknownElement.callCallback (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:149:14)
    at Object.invokeGuardedCallbackDev (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:199:16)
    at invokeGuardedCallback (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:256:31)
    at safelyCallComponentWillUnmount (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:17176:5)
    at commitUnmount (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:17553:11)
    at commitNestedUnmounts (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:17584:5)
    at unmountHostComponents (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:17845:7)
    at commitDeletion (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:17904:5)
    at commitAllHostEffects (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:18685:11)
    at HTMLUnknownElement.callCallback (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:149:14)
    at Object.invokeGuardedCallbackDev (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:199:16)
    at invokeGuardedCallback (webpack://renderer/./node_modules/react-dom/cjs/react-dom.development.js?:256:31)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Natedeployscommented, Sep 27, 2019

Got hit with this error when attempting annotations. on Slate 0.47

1reaction
josh-g3commented, Jul 1, 2019

My renderBlock has default: return next(); and I’m still seeing this error when attempting to load the editor. Any ideas?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Without any changes to source files, "Edits were made which ...
1 trying to debug service fabric application running in the local cluster manager. Closing and reopening VS2019 seems to fix it for awhile,...
Read more >
Troubleshooting and tips — Numba 0.50.1 documentation
In order to debug code, it is possible to disable JIT compilation, which makes the jit decorator (and the njit decorator) act as...
Read more >
How to debug for absolute beginners - Visual Studio
If you're debugging for the first time, learn a few principles to help you run your app in debugging mode with Visual Studio....
Read more >
The 16 JavaScript debugging tips you probably didn't know
Despite JavaScript's reputation as being difficult to debug, if you keep a ... a situation where you want to know what caused a...
Read more >
22 Debugging | Advanced R - Hadley Wickham
What do you do when R code throws an unexpected error? What tools do you have to find and fix the problem? This...
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