0.47.x - seems nearly impossible to debug certain issues
See original GitHub issueTechnically 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:
- Created 4 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top GitHub Comments
Got hit with this error when attempting annotations. on Slate 0.47
My renderBlock has
default: return next();
and I’m still seeing this error when attempting to load the editor. Any ideas?