Preview in editor error: "[PreviewInEditor] Cannot read property 'length' of null"

Cocos creator version: 3.8.1

error message call stack:

TypeError: Cannot read property 'length' of null

at Node._updateSiblingIndex (/Applications/Cocos/Creator/3.8.1/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:71288:46)

at eval (/Applications/Cocos/Creator/3.8.1/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:133662:18)

at Map.forEach (<anonymous>)

at _sortSiblings (/Applications/Cocos/Creator/3.8.1/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:133659:45)

at Director.emit (/Applications/Cocos/Creator/3.8.1/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:170317:19)

at Director.tick (/Applications/Cocos/Creator/3.8.1/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:27805:20)

at Game._updateCallback (/Applications/Cocos/Creator/3.8.1/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:28915:22)

at updateCallback (/Applications/Cocos/Creator/3.8.1/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:11446:20)
1 Like

I have faced the same issue. Don’t really understand in which moment it happens yet.