Cannot read property 'length' of null ERROR

Cannot read property 'length' of null ERROR
0

#1

Hi~
I’m using Cocos Creator 2.0.5.
When I launch app in Mac OSX, above error msgbox is shown frequently.
Please help me~


#2

did you have any creator app of different version in your computer ?
did you used custom engine in the app?


#3

Thanks for your reply. When I launch Creator App of version 1.10.2, There is no response without any error msg box. May be same problem. I do not use any custom engine in current app version.^^


#4

Maybe you have wrong resources imported to the project.
you can open the app with the commandline tool,and if there are any error logs,pls let me know


#5

Excellent! You’re right. May be It seems because wrong resources make error. But I can’t catch which resource is problem. I can’t find command-line tool. Only CocosCreator app file exists.


#6

I found how to launch Creator App in command-line mode.
In terminal app, change to ‘/Applications/CocosCreator.app/Contents/MacOS’ folder and launch ‘CocosCreator’ file.
But…
Same exception message appeared like this:

Uncaught Exception: TypeError: Cannot read property ‘length’ of null
at i.each (/Applications/CocosCreator.app/Contents/Resources/app.asar/asset-db/lib/tasks.js:1:1384)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:181:20
at Object.async.forEachOf.async.eachOf (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:233:13)
at Object.async.forEach.async.each (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:209:22)
at a (/Applications/CocosCreator.app/Contents/Resources/app.asar/asset-db/lib/tasks.js:1:1296)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/globby/index.js:74:3
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:726:13
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:52:16
at done (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:246:17)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:44:16
[7243] Error: TypeError: Cannot read property ‘length’ of null
at i.each (/Applications/CocosCreator.app/Contents/Resources/app.asar/asset-db/lib/tasks.js:1:1384)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:181:20
at Object.async.forEachOf.async.eachOf (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:233:13)
at Object.async.forEach.async.each (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:209:22)
at a (/Applications/CocosCreator.app/Contents/Resources/app.asar/asset-db/lib/tasks.js:1:1296)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/globby/index.js:74:3
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:726:13
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:52:16
at done (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:246:17)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:44:16
at process.on.e (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/editor-init.js:1:345)
at emitOne (events.js:101:20)
at process.emit (events.js:191:7)
at process._fatalException (bootstrap_node.js:308:26)


#7

I had this kind of problem before after I install the latest version which is v2.0.5. Found out the error will appear if you got two versions of Cocos Creator in the computer.