发布小米快游戏不能正常运行

环境:红米note4,miui 9.6,cocos creator 2.1.2 rc7 以及 2.1.2正式版;小包模式,网络畅通

因商业项目原因,暂时无法提供demo工程

问题:

(1). 进入游戏白屏,无正常画面,能正常播放bgm;警告log如下:

runtime.js:1 ### game runtime ### 禁止写全局变量 window
./main.js:2722 Unexpected token o in JSON at position 1

The key "target-densitydpi" is not supported.
iframe.html:1 The key "viewport-fit" is not recognized and ignored.

runtime.html:1 WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost
9cocos2d-js.js:44027 

The current texture size 44 exceeds the maximum size [null] supported on the device.

(2). sprite图片显示混乱,表现为多张纹理杂凑;问题工程为轻偏中的游戏,碎图大约有数百张,全部有做自动图集;微信小游戏显示正常。

注:此问题确认是自动图集引发,可疑设置为勾选允许旋转


(3). Mask显示不正确;使用mask的节点其渲染子节点有部分显示裁切位置不对,暂未发现错乱规律;另外使用inverted模式无效,遮罩显示必错乱。


(4). 构建工程后,点击运行,调试小米快游戏一下子弹出多个浏览器调试窗口。


(5). 异步远程加载的资源显示不出来,也表现为白屏;可疑log:

cocos2d-js.js:44027 The current texture size 44 exceeds the maximum size [null] supported on the device.
update @ cocos2d-js.js:44027
cocos2d-js.js:44027 The current texture size 1024 exceeds the maximum size [null] supported on the device.
update @ cocos2d-js.js:44027
5cocos2d-js.js:44027 The current texture size 44 exceeds the maximum size [null] supported on the device.

(6) prefab加载后挂接到父节点报错(循环报错),prefab能正常加载,能实例化出node
cocos2d-js.js:17181 Uncaught TypeError: Cannot read property ‘createData’ of null
at _Class._updateAssembler (cocos2d-js.js:17181)
at _Class.onEnable (cocos2d-js.js:17157)
at _Class.eval [as onEnable] (cocos2d-js.js:22638)
at _Class3.invokeOnEnable [as _invoke] (cocos2d-js.js:12335)
at _Class3.invoke (cocos2d-js.js:12258)
at _Class3.activateNode (cocos2d-js.js:22024)
at _Class2._onHierarchyChanged (cocos2d-js.js:33245)
at _Class2._onHierarchyChanged (cocos2d-js.js:8497)
at _Class2.setParent (cocos2d-js.js:32992)
at _Class2.addChild (cocos2d-js.js:9261)


辛苦引擎开发组看一下,拜谢~

game runtime ### 禁止写全局变量 window

请问,这个window问题解决了吗。我的protobuf导入有问题

没有哦

问题 1 2 5 的可能跟报错无关,请问可以贴出完整的报错信息吗,我们这边跟踪一下问题

问题 4 可能需要杀掉一些旧的调试进程,后续我们看看有没有办法完善下这块调试体验

问题 3 6 可能需要麻烦你提供下可以复现问题的 demo 哈

请问,这个问题解决了吗?

image

你注册企业了吗?他们说个体户不让注册