cocos creator 热更新求问??

cocos 使用官方的热更新方案,提示下载出错??
FTP服务器那边有链接但是,不能下载,求大神告知??
这是失败报错。。
Simulator: Fail to retrieve local file content: D:\CocosCreator\resources\cocos2d-x\simulator\win32\games_temp/project.manifest.temp
Simulator:
Simulator: Activate: 92.86899999999991ms
Simulator: AssetsManagerEx : Fail to download version file, step skipped
Simulator:
Simulator: Code: 5

服务器上的文件
version.manifest下载了
project文件带temp
project.manifest.temp .
这个没下载完就不下载更新包。

@panda 大大为什么啊?? 求解啊!!

讯息不就告诉你它下载 version.manifest 失败了吗

可是模拟器那里的temp文件中已经下载下来了啊,

我是在mac上的模拟器跑的,所以我不清楚windows的情况,

不过… 你没发现你的路径好像怪怪的吗?
那个 /\ 好像冲突了…

问题已经解决了,谢谢了。

能问一下怎么解决的么,我也出现这个问题

creator版本:1.7正式版
环境: Windows的creator模拟器
复现步骤:
1.进行热更新操作
2.热更新成功,调用cc.game.restart()
3.再次进行热更新检查,调用

this._assetsMgr.checkUpdate();

提示


按照提示我找到这个文件发现文件里面是空的:

检查更新之前,可以删除这个临时目录

如何删除,有点懵逼

-------定义--------
    removeManifestFile:function(file){
        console.log('-------------removeManifestFile------------');
        if(jsb.fileUtils.isFileExist(file)){
            console.log('-------------'+file+' exist------------');
            jsb.fileUtils.removeFile(file);
            !jsb.fileUtils.isFileExist(file)?(console.log('-------------remove file successful------------')):(console.log('-------------remove file failed------------'));
        }else{
            console.log('-------------'+file+' not exist------------');
        }
        //jsb.fileUtils.renameFile(this._storagePath+'/', this.TEMP_VERSION_FILENAME, this.VERSION_FILENAME);//
    },
    removeDirectory:function(path){
        console.log('-------------removeDirectory------------');
        if(jsb.fileUtils.isDirectoryExist(path)){
            console.log('-------------'+path+' exist------------');
            jsb.fileUtils.removeDirectory(path);//
            !jsb.fileUtils.isDirectoryExist(path)?(console.log('-------------remove directory successful------------')):(console.log('-------------remove directory failed------------'));
        }else{
            console.log('-------------'+path+' not exist------------');
        }
    },
-----------调用------------
        this._tempStoragePath=this._storagePath+'_temp';// /
        this.removeDirectory(this._tempStoragePath);
1赞

谢谢:smiley:

请问删除那个临时目录失败怎么整,打印出了-------------remove directory failed------------

兄弟怎么解决的呀 .我也出现这个问题了

我也有这个问题,我的ccc日志提示是Fail to retrieve local file content: E:\programs\CocosCreator\resources\cocos2d-x\simulator\win32_temp/project.manifest.temp
Simulator: AssetsManagerEx : Fail to download version file, step skipped
模拟器运行时,提示info是Fail to download manifest file, hot update skipped.
另外我对这个搞不懂:
updateCb( event ){
let checkCbneedRestart = false;
let updateCbfailed = false;
cc.log( ‘120:–update cb code : ${event.getEventCode()}=’+event.getEventCode());
switch (event.getEventCode()){
case jsb.EventAssetsManager.ERROR_NO_LOCAL_MANIFEST:
this.info.string = ‘No local manifest file found, hot update skipped.’;
updateCbfailed = true;
break;
case jsb.EventAssetsManager.UPDATE_PROGRESSION:
this.byteProgressBar.progress = event.getPercent();
this.fileProgressBar.progress = event.getPercentByFile();
this.filejd.string = event.getDownloadedFiles() + ’ / ’ + event.getTotalFiles();
this.bytejd.string = event.getDownloadedBytes() + ’ / ’ + event.getTotalBytes();
let msg = event.getMessage();
if (msg) {
this.info.string = 'Updated file: ’ + msg;
}
break;
//下面这一句这句有问题吗??,至少我觉得少了break;啊,网上很多教程都是这样的
//而且再下面一句 明明是ERROR_PARSE_MANIFEST是指解析文件错误啊
case jsb.EventAssetsManager.ERROR_DOWNLOAD_MANIFEST:
case jsb.EventAssetsManager.ERROR_PARSE_MANIFEST:
this.info.string = ‘Fail to download manifest file, hot update skipped.’;
updateCbfailed = true;
break;

请问怎解决的呀,求解,感谢了

解决了吗?我也有这个问题

没有,我到现在为止都是直接不写热更新了

我是因为version_generator 这个文件里面远程 没写端口号导致的
导致这个问题的原因 基本上是ip地址本地与远端不一致

我也出现了这个问题,版本文件放在CDN,https链接,其他手机都正常。但是有个oppo手机不行,下载version.manifest失败。改成http链接就可以了,不知道是不是跟服务器端口号有关系。