marko: Uncaught TypeError: Cannot read property 'nextSibling' of null
Bug Report
Marko Version: 4.5.6
Details
See an exception in the log. Also seeing occasional modelling errors – such as some items in an each rendering twice. I’m guessing they’re related. This happens when updates occur.
Expected Behavior
No error in log and items appear only once even when re-rendering
Actual Behavior
Items appear twice when updates trigger re-render
Possible Fix
It may be a concurrency issue, as I’m using Marko to build a Chrome extension, and events can actually come in between any async processing.
Additional Info
Your Environment
- Environment name and version (e.g. Chrome 39, node.js 5.4):
- Operating System and version (desktop or mobile):
- Link to your project: Google Chrome Version 62.0.3202.75 (Official Build) (64-bit) Mac OSX High Sierra
Steps to Reproduce
Not sure how to reproduce it without using my project. I can send a link to it privately if needed.
Stack Trace
view.js:4036 Uncaught TypeError: Cannot read property 'nextSibling' of null
at Component.___forEachNode (view.js:4036)
at Component.___detach (view.js:4027)
at morphChildren (view.js:3236)
at morphComponent (view.js:3118)
at morphChildren (view.js:3242)
at morphEl (view.js:3502)
at morphChildren (view.js:3275)
at morphEl (view.js:3502)
at morphChildren (view.js:3275)
at morphEl (view.js:3502)
___forEachNode @ view.js:4036
___detach @ view.js:4027
morphChildren @ view.js:3236
morphComponent @ view.js:3118
morphChildren @ view.js:3242
morphEl @ view.js:3502
morphChildren @ view.js:3275
morphEl @ view.js:3502
morphChildren @ view.js:3275
morphEl @ view.js:3502
morphChildren @ view.js:3275
morphComponent @ view.js:3118
morphChildren @ view.js:3242
morphdom @ view.js:3511
(anonymous) @ view.js:4011
batchUpdate @ view.js:2864
___rerender @ view.js:3994
update @ view.js:3949
updateComponents @ view.js:2845
updateUnbatchedComponents @ view.js:2817
(anonymous) @ view.js:2785
postMessage (async)
setImmediate @ view.js:2792
scheduleUpdates @ view.js:2836
queueComponentUpdate @ view.js:2902
___queueUpdate @ view.js:3926
___set @ view.js:2409
set @ view.js:2343
mouseOver @ view.js:23290
invokeComponentEventHandler @ view.js:4302
(anonymous) @ view.js:4319
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 17 (7 by maintainers)
Commits related to this issue
- wip #920 — committed to marko-js/marko by patrick-steele-idem 7 years ago
- #920 additional work — committed to marko-js/marko by patrick-steele-idem 7 years ago
- Resolve issue #920. — committed to DylanPiercey/marko by DylanPiercey 7 years ago
- Issue #914 & #920 fix (#927) * Resolve issue #920. * Resolve issue #914 * Improve test. — committed to marko-js/marko by DylanPiercey 7 years ago
@bohdyone @hedav85 We’ve confirmed that this is a bug and are investigating the root cause. Thanks for the report.
@DylanPiercey I testet the version 4.7 + 4.7.1 with my test example (https://github.com/hedav85/marko-test) and the bug is gone. It’s now working. Thanks a lot!
But it seems that I run into another issue with my current project (#946).