@Randomzord, @pandamicro, @huanxinyin,
hi,
i downloaded some files through hot update and upon restarting i got a black screen right at the start(and error in the logs). i am trying to resolve the issue and i have the following questions…
- Why did the black screen it come? Did it come because of the error?Here are the logs…
10-17 18:47:13.775 17743 17743 I jswrapper: intent not null
10-17 18:47:13.775 17743 17743 I jswrapper: action not null
10-17 18:47:13.779 17743 17743 I jswrapper: location getLastKnownLoaction started
10-17 18:47:13.790 17743 17743 I jswrapper: location perimssion not granted
10-17 18:47:13.875 17743 17776 D jswrapper: Initializing V8, version: 7.5.288.30
10-17 18:47:13.961 17743 17776 D jswrapper: JS: Enable batch GL commands optimization!
10-17 18:47:14.534 17743 17776 D jswrapper: JS: ****_packageUrl : https://www.playproject.com/gameassets/temp/projectv3/
10-17 18:47:14.534 17743 17776 D jswrapper: JS: ****_version : 6.004.001
10-17 18:47:14.534 17743 17776 D jswrapper: JS: JS Custom Version Compare: version A is 5.002.001, version B is 6.004.001
10-17 18:47:14.552 17743 17776 E jswrapper: ScriptEngine::onGetStringFromFile ./jsb-dragonbones.js not found, possible missing file.
10-17 18:47:14.552 17743 17776 E jswrapper: ScriptEngine::runScript script ./jsb-dragonbones.js, buffer is empty!
10-17 18:47:14.552 17743 17776 E jswrapper: [ERROR] Failed to invoke require, location: /Users/hd/project/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/manual/jsb_global.cpp:300
10-17 18:47:14.560 17743 17776 E jswrapper: ScriptEngine::onGetStringFromFile ./jsb-spine-skeleton.js not found, possible missing file.
10-17 18:47:14.560 17743 17776 E jswrapper: ScriptEngine::runScript script ./jsb-spine-skeleton.js, buffer is empty!
10-17 18:47:14.560 17743 17776 E jswrapper: [ERROR] Failed to invoke require, location: /Users/hd/project/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/manual/jsb_global.cpp:300
10-17 18:47:14.641 17743 17776 D jswrapper: JS: Cocos Creator v2.3.4
10-17 18:47:15.084 17743 17776 E jswrapper: [ERROR] (/Users/hd/project/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/manual/jsb_global.cpp, 950): File (res/raw-assets/0f/0f89816e-0988-497a-94a3-541207dece15.png) doesn’t exist!
10-17 18:47:15.084 17743 17776 E jswrapper: [ERROR] Failed to invoke js_loadImage, location: /Users/hd/project/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/manual/jsb_global.cpp:977
- We have already put checks that restart only when download is successful(see code below). Black screen came despite those checks. How can we verify whether download is successful or whether there is an error?
switch (event.getEventCode())
{
case jsb.EventAssetsManager.UPDATE_FINISHED:
console.log('Update finished. ’ + event.getMessage());
needRestart = true;
break;
- Where in the code are these logs so that we can debug ourselves. Also, what do these logs mean and when is this code called? Does it indeed mean that the particular file wasn’t downloaded, or wasn’t downloaded properly(despite the checks???) ?
Please help me resolve this issue. My cocos creator version is 2.3.3.
Thanks!