3.8.3打包安卓报unhandledRejectedPromise错误

游戏引擎:3.8.3
平台:window11
android studio:Android Studio Giraffe | 2022.3.1

打包输出的时候可以进入第一个场景,在加载Bundle完成后就报错了。不知道哪里有问题
日志如下:

2024-07-31 11:23:54.206  4427-4456  EGL_adreno              pid-4427                             D  eglMakeCurrent: 0x7fff6a6f4e60: ver 3 1 (tinfo 0x7fff156cf1a0)
2024-07-31 11:23:54.210  4427-4456  EGL_adreno              pid-4427                             D  eglMakeCurrent: 0x7fff6a6f4e60: ver 3 1 (tinfo 0x7fff156cf1a0)
2024-07-31 11:23:54.243  4427-4449  Cocos                   pid-4427                             D  20:23:54 [DEBUG]: JS: [ResMgr]:Load AssetsBundle Success: module_sounds
2024-07-31 11:23:54.244  4427-4449  Cocos                   pid-4427                             D  20:23:54 [DEBUG]: JS: [ResMgr]:Load AssetsBundle Success: module_i18n
2024-07-31 11:23:54.244  4427-4449  Cocos                   pid-4427                             D  20:23:54 [DEBUG]: JS: [ResMgr]:Load AssetsBundle Success: module_configs
2024-07-31 11:23:54.249  4427-4449  Cocos                   pid-4427                             D  20:23:54 [DEBUG]: JS: [ResMgr]:Load AssetsBundle Success: module_basic
2024-07-31 11:23:54.249  4427-4449  Cocos                   pid-4427                             D  20:23:54 [DEBUG]: JS: [ResMgr]:Load AssetsBundle Success: module_extra
2024-07-31 11:23:54.281  4427-4449  Cocos                   pid-4427                             E  20:23:54 [ERROR]: [SE_ERROR]  (H:/cocos/miniGame/build/android/proj/build/RelWithDebInfo/1q1s2u65/arm64-v8a/generated/cocos/bindings/auto/jsb_scene_auto.cpp, 4122): Illegal arguments for construction of Scene
2024-07-31 11:23:54.281  4427-4449  Cocos                   pid-4427                             E  20:23:54 [ERROR]: E/ [ERROR] Failed to invoke js_new_cc_Scene
2024-07-31 11:23:54.285  4427-4449  Cocos                   pid-4427                             E  20:23:54 [ERROR]: [SE_ERROR]  (C:/ProgramData/cocos/editors/Creator/3.8.3/resources/resources/3d/engine/native/cocos/bindings/jswrapper/v8/Object.cpp, 754): Invoking function (0x7fff145ecfc0) failed!
2024-07-31 11:23:54.288  4427-4449  Cocos                   pid-4427                             E  20:23:54 [ERROR]: [ERROR] file C:/ProgramData/cocos/editors/Creator/3.8.3/resources/resources/3d/engine/native/cocos/application/CocosApplication.cpp: line 173 
2024-07-31 11:23:54.288  4427-4449  Cocos                   pid-4427                             E  20:23:54 [ERROR]: 
                                                                                                    Uncaught Exception:
                                                                                                     - location :  
                                                                                                     - msg : unhandledRejectedPromise
                                                                                                     - detail : 
                                                                                                           obj: {}
                                                                                                    PromiseConstructor Promisestacktrace: 
2024-07-31 11:23:54.288  4427-4449  Cocos                   pid-4427                             E  20:23:54 [ERROR]: JS:  unhandledRejectedPromise  obj: {}
                                                                                                    PromiseConstructor Promisestacktrace: 
2024-07-31 11:24:00.002  1567-1580  memtrack                pid-1567                             E  Couldn't load memtrack module
2024-07-31 11:24:00.002  1567-1580  android.os.Debug        pid-1567                             W  failed to get memory consumption info: -1
2024-07-31 11:24:01.039  1567-1585  BatteryExt...tatsWorker pid-1567                             E  no controller energy info supplied for wifi
2024-07-31 11:24:01.041  1567-1585  BatteryExt...tatsWorker pid-1567                             E  no controller energy info supplied for bluetooth
2024-07-31 11:24:01.055  1448-1448  VSoCRil                 pid-1448                             E  Request 135 not supported.
2024-07-31 11:24:01.071  1567-1585  KernelCpuSpeedReader    pid-1567                             E  Failed to read cpu-freq: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state (No such file or directory)
2024-07-31 11:24:01.071  1567-1585  KernelWakelockReader    pid-1567                             E  neither /proc/wakelocks nor /d/wakeup_sources exists
2024-07-31 11:24:01.091  1567-1585  BatteryStatsImpl        pid-1567                             W  Couldn't get kernel wake lock stats
2024-07-31 11:24:01.108  1567-1585  BatteryExt...tatsWorker pid-1567                             W  modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
2024-07-31 11:24:01.109  1567-1585  KernelUidCpuTimeReader  pid-1567                             D  Removing uids 10054-10054
2024-07-31 11:24:03.591  2642-2650  System                  pid-2642                             W  A resource failed to call close. 
2024-07-31 11:24:03.779  4427-4427  Thread-2                pid-4427                             I  type=1400 audit(0.0:1045): avc: denied { ioctl } for path="/dev/fastpipe" dev="tmpfs" ino=102 ioctlcmd=6867 scontext=u:r:untrusted_app:s0:c55,c256,c512,c768 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
2024-07-31 11:24:08.946  1445-1464  storaged                pid-1445                             E  getDiskStats failed with result NOT_SUPPORTED and size 0

找到问题了,用bundle去load场景的scene文件报错了。在web平台上又正常的,在安卓平台又报错,没指明哪里的问题。这个报错指出的不明确,查了好久。

3.8.4 第二个社区版中会彻底解决 promise 中异常日志不明确的问题,预计这周会发,到时候可以验证看看。

1赞

非常好,感谢

现在有更新么 我现在3.8.3也遇到了这个问题