"getComponent: Type must be non-nil" error on clicking on a particular node in the node tree.

hi,
i am getting the following error message in the simulator console 5 times when i click on a certain node in the node tree. this happens only for one node and not the other nodes. i don’t get the error messages any other time.

getComponent: Type must be non-nil
at Object.cc.errorID (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/CCDebug.js:257:6)
at getConstructor (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/utils/base-node.js:60:8)
at cc_Node.getComponent (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/utils/base-node.js:829:23)
at HTMLElement.query-node-info (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/scene/panel/messages/scene-query.js:1:1331)
at Object.e._dispatch (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/renderer/panel.js:1:1876)
at EventEmitter. (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/renderer/ipc.js:1:2952)
at EventEmitter.emit (events.js:194:13)
at EventEmitter.emit (domain.js:469:20)
at EventEmitter.topLevelDomainCallback (domain.js:124:23)

the node has a widget component and a script attached to it. the game runs fine in the simulator but i didn’t try it on a device yet. i looked up the first line of the error and i got mixed answers from the forum. what is different about my case is i know how to reproduce it - by clicking on a certain node. i would like to get rid of the error even though the game runs fine on the simulator. can someone please help?

thanks!

Hi, please provide a reproduce project, we will check it.