Editor Error: [Scene] component already added

Hi.

I’ m using Cocos Creator version 3.8.2 currently.

I imported assets packages exported by Cocos Creator version 3.4.2.
And scene and code work fine in play mode.

However, sometimes the editor show this error after editing source code (after displaying ‘script compilation in progress’ at bottom right of the editor).

Error: [Scene] component already added
at error (/Applications/Cocos/Creator/3.8.2/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:160743:12)
at ReusableInvoker.add (/Applications/Cocos/Creator/3.8.2/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:46349:15)
at ComponentScheduler._scheduleImmediate (/Applications/Cocos/Creator/3.8.2/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:46618:32)
at ComponentScheduler._onEnabled (/Applications/Cocos/Creator/3.8.2/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:46483:18)
at OneOffInvoker.eval [as _invoke] (/Applications/Cocos/Creator/3.8.2/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:46411:29)
at OneOffInvoker.invoke (/Applications/Cocos/Creator/3.8.2/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:46333:18)
at NodeActivator.activateNode (/Applications/Cocos/Creator/3.8.2/CocosCreator.app/Contents/Resources/resources/3d/engine/bin/.cache/dev/editor/bundled/index.js:48341:29)
Is Bundle

I tried to rebuild the scene hierarchy step by step.
However, I was unable to determine when the error occurred.

What could cause this error?

1 Like

You can try using Cocos Creator version 3.4.2. This problem may be caused by version incompatibility

I got the same error also version 3.8.2, I don’t know how to fix it, and why it appear???

I too suffer from this symptom.
The version is 3.8.2, same as jpHuang.

I am having trouble!

Me too. I keep getting the error despite everything being fine! I wish this were fixable.

我目前直接使用 3.8.3 版本,項目沒有經過升級,也有一樣的問題,第一次出現的情況是我在場景上放置 prefab,進入編輯 prefab 儲存後回到場景就會跳出這個錯誤,當下並未掛載任何自訂腳本,後續編輯腳本儲存後回到編輯器就必定觸發這個錯誤訊息,但是運作正常。

Could anybody describe how to reproduce it?
Thanks.