LmeSzinc / AzurLaneAutoScript

Azur Lane bot (CN/EN/JP/TW) 碧蓝航线脚本 | 无缝委托科研,全自动大世界
https://alas.azurlane.cloud
GNU General Public License v3.0
6.71k stars 789 forks source link

希望能给重启模块增加防超时的功能 #3776

Open Ashe428 opened 3 months ago

Ashe428 commented 3 months ago

你的功能请求是否与问题有关?

自从7周年更新后,初次开启模拟器并打开游戏时必定会闪退,这时alas会尝试重启游戏,并且会有很大几率出现不进行任何操作且一直等待的情况。 我在多台不同配置的电脑而且在蓝叠5和mumu12上测试都出现了相同情况。 顺带一提,我将alas设置为了开机启动项并让alas自动启动模拟器和游戏(防止微软自动更新重启电脑),但这应该不是引发问题的原因,因为在我手动启动模拟器和alas并让alas打开游戏时也会出现这个问题。

解决方案

希望可以给重启游戏的功能添加一个计时器以防止出现超时的情况,或者在超时的情况下报错

其他内容

相关log: INFO 22:50:36.831 │ <<< APP START >>>
INFO 22:50:36.832 │ App start: com.bilibili.azurlane
INFO 22:50:36.833 │ Loading OCR dependencies
INFO 22:50:36.992 │ <<< APP LOGIN >>>
INFO 22:50:37.022 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:50:37.389 │ early_ocr_import finish
INFO 22:50:42.266 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:50:47.401 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:50:52.497 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:50:57.615 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:51:02.735 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:51:07.870 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:51:12.969 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:51:18.081 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:51:23.210 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:51:28.325 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:51:33.425 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:51:38.539 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:51:43.691 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:51:48.796 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:51:53.898 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:51:59.011 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:52:04.125 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:52:09.242 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:52:14.355 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:52:19.471 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:52:24.609 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:52:29.700 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:52:34.825 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:52:39.929 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:52:45.052 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:52:50.164 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:52:55.279 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:53:00.401 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:53:05.509 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:53:10.623 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:53:15.736 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:53:20.854 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:53:25.972 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:53:31.095 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:53:36.204 │ [Device Orientation] 1 (HOME key on the right)
INFO 22:53:37.105 │ Function calls:

L1 spawn.py L105 spawn_main() spawn.py L118 _main() process.py L297 _bootstrap() process.py L99 run() process_manager.py L151 run_process() alas.py L499 loop() alas.py L452 get_next_task() alas.py L68 run() alas.py L180 goto_main() login.py L153 app_start() login.py L134 handle_app_login() login.py L43 _handle_app_login() device.py L161 screenshot() device.py L219 stuck_record_check() device.py L40 show_function_call() WARNING 22:53:37.108 │ Wait too long WARNING 22:53:37.109 │ Waiting for {'MAIN_GOTO_FLEET', 'META_CHECK', 'SHIPYARD_CHECK', 'GOTO_MAIN', 'PLAYER_CHECK', 'LOGIN_RETURN_INFO', 'LOGIN_ANNOUNCE', 'PURCHASE_POPUP', 'GET_ITEMS_2', 'EVENT_LIST_CHECK', 'MAINTENANCE_ANNOUNCE', 'POPUP_CANCEL', 'MONTHLY_PASS_NOTICE', 'GET_ITEMS_1', 'LOGIN_RETURN_SIGN', 'LOGIN_CHECK', 'LOGIN_GAME_UPDATE', 'GUILD_POPUP_CONFIRM', 'LOGIN_ANNOUNCE_2', 'BATTLE_PASS_NOTICE', 'GET_MISSION'} INFO 22:53:37.137 │ [Package_name] com.mumu.launcher WARNING 22:53:37.138 │ Game died INFO 22:53:37.138 │ Task call: Restart INFO 22:53:37.146 │ Bind task ['General', 'Alas', 'Reward'] INFO 22:53:37.147 │ Save config ./config\alas.json, Restart.Scheduler.NextRun=datetime.datetime(2024, 5, 21, 22, 53, 37), Restart.Scheduler.Enable=True
LmeSzinc commented 3 months ago

所有任务都有三次重试,能连续失败三次一定是存在问题的