LmeSzinc / StarRailCopilot

崩坏:星穹铁道脚本 | Honkai: Star Rail auto bot (简体中文/繁體中文/English/Español)
GNU General Public License v3.0
3.22k stars 157 forks source link

src能启动模拟器,但无法启动游戏 #558

Closed woqucao closed 3 months ago

woqucao commented 5 months ago

在提问之前...

描述你的问题

src能够正常启动模拟器,但随后无法正常打开崩铁应用

如何复现

情况1(调度器未启动)

  1. 启动调度器
  2. mumu模拟器正常打开
  3. 崩坏星穹铁道无法打开,一直保持在模拟器主界面(出现问题)

预期行为

正常完成每日任务

相关 Logs

═══════════════════════════════════════════════════════════════════════════════════
                                       START                                       
═══════════════════════════════════════════════════════════════════════════════════
INFO     20:13:09.546 │ Start scheduler loop: src                                  
INFO     20:13:09.548 │ [Lang] cn                                                  
INFO     20:13:09.554 │ Bind task ['Alas']                                         
INFO     20:13:09.555 │ No task pending                                            
INFO     20:13:09.556 │ [Task] Dungeon (Enable, 2024-06-30 21:00:11)               
INFO     20:13:09.556 │ Bind task ['Alas', 'Dungeon']                              
INFO     20:13:09.558 │ Wait until 2024-06-30 21:00:11 for task `Dungeon`          
INFO     20:13:09.559 │ Close game during wait                                     
═════════════════════════════════════ DEVICE ══════════════════════════════════════
INFO     20:13:10.300 │ DEVICE                                                     
INFO     20:13:10.309 │ [AdbBinary]                                                
         F:\下载\StarRailCopilot_0.5.4_fullcn\StarRailCopilot\toolkit\Lib\site-pack
         es\adbutils\binaries\adb.exe                                              
INFO     20:13:10.310 │ [AdbClient] AdbClient(127.0.0.1, 5037)                     
INFO     20:13:10.311 │ <<< DETECT DEVICE >>>                                      
INFO     20:13:10.312 │ Here are the available devices, copy to                    
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"         
INFO     20:13:10.313 │ No available devices                                       
INFO     20:13:12.345 │ cannot connect to 127.0.0.1:16384:                         
         由于目标计算机积极拒绝,无法连接。 (10061)                                
INFO     20:13:12.347 │ cannot connect to 127.0.0.1:16384:                         
         由于目标计算机积极拒绝,无法连接。 (10061)                                
WARNING  20:13:12.347 │ No such device exists, please restart the emulator or set a
         correct serial                                                            
───────────────────────────── FIND EMULATOR INSTANCE ──────────────────────────────
INFO     20:13:12.349 │ FIND EMULATOR INSTANCE                                     
INFO     20:13:12.400 │ MuMuPlayer12(serial="127.0.0.1:16384",                     
         name="MuMuPlayer-12.0-0", path="I:/Program Files/Netease/MuMu Player      
         12/shell/MuMuPlayer.exe")                                                 
──────────────────────────────── EMULATOR INSTANCE ────────────────────────────────
INFO     20:13:12.402 │ EMULATOR INSTANCE                                          
INFO     20:13:12.402 │ Found emulator instance:                                   
         MuMuPlayer12(serial="127.0.0.1:16384", name="MuMuPlayer-12.0-0",          
         path="I:/Program Files/Netease/MuMu Player 12/shell/MuMuPlayer.exe")      
═════════════════════════════════ EMULATOR START ══════════════════════════════════
INFO     20:13:12.405 │ EMULATOR START                                             
────────────────────────────────── EMULATOR STOP ──────────────────────────────────
INFO     20:13:12.406 │ EMULATOR STOP                                              
INFO     20:13:13.440 │ Execute: "I:/Program Files/Netease/MuMu Player             
         12/shell/MuMuPlayer.exe" -v 0                                             
───────────────────────────────── EMULATOR START ──────────────────────────────────
INFO     20:13:13.452 │ EMULATOR START                                             
INFO     20:13:13.453 │ Current window: 1839490                                    
INFO     20:13:22.500 │ New window showing up: 1576926, focus back                 
INFO     20:13:22.503 │ Emulator online: AdbDevice(127.0.0.1:16384, device)        
INFO     20:13:22.736 │ Command ping: pong                                         
INFO     20:13:22.855 │ Found azurlane packages: ['com.miHoYo.hkrpg']              
INFO     20:13:22.857 │ Minimize new window: 1576926                               
INFO     20:13:23.115 │ De-flash current window: 1839490                           
INFO     20:13:23.117 │ Flash new window: 1576926                                  
INFO     20:13:23.118 │ Emulator start completed                                   
═════════════════════════════════════ DEVICE ══════════════════════════════════════
INFO     20:13:23.120 │ DEVICE                                                     
INFO     20:13:23.121 │ [AdbBinary]                                                
         F:\下载\StarRailCopilot_0.5.4_fullcn\StarRailCopilot\toolkit\Lib\site-pack
         es\adbutils\binaries\adb.exe                                              
INFO     20:13:23.123 │ <<< DETECT DEVICE >>>                                      
INFO     20:13:23.124 │ Here are the available devices, copy to                    
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"         
INFO     20:13:23.126 │ 127.0.0.1:16384                                            
INFO     20:13:23.130 │ already connected to 127.0.0.1:16384                       
INFO     20:13:23.131 │ [AdbDevice] AdbDevice(serial=127.0.0.1:16384)              
INFO     20:13:23.132 │ [Server] CN-Official                                       
INFO     20:13:23.133 │ [PackageName] com.miHoYo.hkrpg                             
INFO     20:13:23.134 │ [Lang] cn                                                  
INFO     20:13:23.143 │ [nemud.app_keep_alive] false                               
INFO     20:13:23.145 │ NemuIpcImpl init, nemu_folder=I:\Program Files\Netease\MuMu
         Player 12, ipc_dll=I:\Program Files\Netease\MuMu Player                   
         12\shell\sdk\external_renderer_ipc.dll, instance_id=0, display_id=0       
INFO     20:13:23.148 │ [nemu_ipc_available] True                                  
INFO     20:13:23.150 │ Screenshot interval set to 0.2s                            
INFO     20:13:23.151 │ <<< MAATOUCH INIT >>>                                      
INFO     20:13:23.171 │ [Screen_size] 1280x720                                     
INFO     20:13:23.303 │ <<< APP STOP >>>                                           
INFO     20:13:23.304 │ App stop: com.miHoYo.hkrpg                                 
INFO     20:13:23.315 │ nemu_ipc released                                          
INFO     20:13:24.184 │ [Device Orientation] 1 (HOME key on the right)             
INFO     20:13:24.519 │ ^ 10 1280 720 255                                          
INFO     20:13:24.520 │ $ 255                                                      
INFO     20:13:24.520 │ MaaTouch stream connected                                  
INFO     20:13:24.522 │ max_contact: 10; max_x: 1280; max_y: 720; max_pressure: 255
[src] exited. Reason: Manual stop

═══════════════════════════════════════════════════════════════════════════════════
                                       START                                       
═══════════════════════════════════════════════════════════════════════════════════
INFO     20:15:40.488 │ Start scheduler loop: src                                  
INFO     20:15:40.491 │ [Lang] cn                                                  
INFO     20:15:40.496 │ Bind task ['Alas']                                         
INFO     20:15:40.497 │ No task pending                                            
INFO     20:15:40.498 │ [Task] Dungeon (Enable, 2024-06-30 21:00:11)               
INFO     20:15:40.499 │ Bind task ['Alas', 'Dungeon']                              
INFO     20:15:40.501 │ Wait until 2024-06-30 21:00:11 for task `Dungeon`          
INFO     20:15:40.502 │ Close game during wait                                     
═════════════════════════════════════ DEVICE ══════════════════════════════════════
INFO     20:15:41.236 │ DEVICE                                                     
INFO     20:15:41.244 │ [AdbBinary]                                                
         F:\下载\StarRailCopilot_0.5.4_fullcn\StarRailCopilot\toolkit\Lib\site-pack
         es\adbutils\binaries\adb.exe                                              
INFO     20:15:41.245 │ [AdbClient] AdbClient(127.0.0.1, 5037)                     
INFO     20:15:41.246 │ <<< DETECT DEVICE >>>                                      
INFO     20:15:41.247 │ Here are the available devices, copy to                    
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"         
INFO     20:15:41.248 │ No available devices                                       
INFO     20:15:41.249 │ Here are the devices detected but unavailable              
INFO     20:15:41.250 │ 127.0.0.1:16384 (offline)                                  
WARNING  20:15:41.251 │ Device 127.0.0.1:16384 is offline, disconnect it before    
         connecting                                                                
INFO     20:15:41.252 │ disconnected 127.0.0.1:16384                               
INFO     20:15:43.287 │ cannot connect to 127.0.0.1:16384:                         
         由于目标计算机积极拒绝,无法连接。 (10061)                                
INFO     20:15:43.288 │ cannot connect to 127.0.0.1:16384:                         
         由于目标计算机积极拒绝,无法连接。 (10061)                                
WARNING  20:15:43.289 │ No such device exists, please restart the emulator or set a
         correct serial                                                            
───────────────────────────── FIND EMULATOR INSTANCE ──────────────────────────────
INFO     20:15:43.291 │ FIND EMULATOR INSTANCE                                     
INFO     20:15:43.339 │ MuMuPlayer12(serial="127.0.0.1:16384",                     
         name="MuMuPlayer-12.0-0", path="I:/Program Files/Netease/MuMu Player      
         12/shell/MuMuPlayer.exe")                                                 
──────────────────────────────── EMULATOR INSTANCE ────────────────────────────────
INFO     20:15:43.342 │ EMULATOR INSTANCE                                          
INFO     20:15:43.342 │ Found emulator instance:                                   
         MuMuPlayer12(serial="127.0.0.1:16384", name="MuMuPlayer-12.0-0",          
         path="I:/Program Files/Netease/MuMu Player 12/shell/MuMuPlayer.exe")      
═════════════════════════════════ EMULATOR START ══════════════════════════════════
INFO     20:15:43.344 │ EMULATOR START                                             
────────────────────────────────── EMULATOR STOP ──────────────────────────────────
INFO     20:15:43.345 │ EMULATOR STOP                                              
INFO     20:15:44.354 │ Execute: "I:/Program Files/Netease/MuMu Player             
         12/shell/MuMuPlayer.exe" -v 0                                             
───────────────────────────────── EMULATOR START ──────────────────────────────────
INFO     20:15:44.366 │ EMULATOR START                                             
INFO     20:15:44.367 │ Current window: 1839490                                    
INFO     20:15:53.191 │ New window showing up: 4000992, focus back                 
INFO     20:15:53.195 │ Emulator online: AdbDevice(127.0.0.1:16384, device)        
INFO     20:15:53.453 │ Command ping: pong                                         
INFO     20:15:53.563 │ Found azurlane packages: ['com.miHoYo.hkrpg']              
INFO     20:15:53.564 │ Minimize new window: 4000992                               
INFO     20:15:53.828 │ De-flash current window: 1839490                           
INFO     20:15:53.830 │ Flash new window: 4000992                                  
INFO     20:15:53.831 │ Emulator start completed                                   
═════════════════════════════════════ DEVICE ══════════════════════════════════════
INFO     20:15:53.833 │ DEVICE                                                     
INFO     20:15:53.834 │ [AdbBinary]                                                
         F:\下载\StarRailCopilot_0.5.4_fullcn\StarRailCopilot\toolkit\Lib\site-pack
         es\adbutils\binaries\adb.exe                                              
INFO     20:15:53.835 │ <<< DETECT DEVICE >>>                                      
INFO     20:15:53.837 │ Here are the available devices, copy to                    
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"         
INFO     20:15:53.838 │ 127.0.0.1:16384                                            
INFO     20:15:53.842 │ already connected to 127.0.0.1:16384                       
INFO     20:15:53.843 │ [AdbDevice] AdbDevice(serial=127.0.0.1:16384)              
INFO     20:15:53.844 │ [Server] CN-Official                                       
INFO     20:15:53.845 │ [PackageName] com.miHoYo.hkrpg                             
INFO     20:15:53.846 │ [Lang] cn                                                  
INFO     20:15:53.867 │ [nemud.app_keep_alive] false                               
INFO     20:15:53.869 │ NemuIpcImpl init, nemu_folder=I:\Program Files\Netease\MuMu
         Player 12, ipc_dll=I:\Program Files\Netease\MuMu Player                   
         12\shell\sdk\external_renderer_ipc.dll, instance_id=0, display_id=0       
INFO     20:15:53.872 │ [nemu_ipc_available] True                                  
INFO     20:15:53.873 │ Screenshot interval set to 0.2s                            
INFO     20:15:53.875 │ <<< MAATOUCH INIT >>>                                      
INFO     20:15:53.897 │ [Screen_size] 1280x720                                     
INFO     20:15:54.029 │ <<< APP STOP >>>                                           
INFO     20:15:54.030 │ App stop: com.miHoYo.hkrpg                                 
INFO     20:15:54.042 │ nemu_ipc released                                          
INFO     20:15:54.906 │ [Device Orientation] 1 (HOME key on the right)             
INFO     20:15:55.100 │ ^ 10 1280 720 255                                          
INFO     20:15:55.102 │ $ 255                                                      
INFO     20:15:55.103 │ MaaTouch stream connected                                  
INFO     20:15:55.104 │ max_contact: 10; max_x: 1280; max_y: 720; max_pressure: 255
[src] exited. Reason: Manual stop

═══════════════════════════════════════════════════════════════════════════════════
                                       START                                       
═══════════════════════════════════════════════════════════════════════════════════
INFO     20:20:01.103 │ Start scheduler loop: src                                  
INFO     20:20:01.106 │ [Lang] cn                                                  
INFO     20:20:01.111 │ Bind task ['Alas']                                         
INFO     20:20:01.113 │ No task pending                                            
INFO     20:20:01.114 │ [Task] Dungeon (Enable, 2024-06-30 21:00:11)               
INFO     20:20:01.114 │ Bind task ['Alas', 'Dungeon']                              
INFO     20:20:01.115 │ Wait until 2024-06-30 21:00:11 for task `Dungeon`          
INFO     20:20:01.116 │ Close game during wait                                     
═════════════════════════════════════ DEVICE ══════════════════════════════════════
INFO     20:20:01.870 │ DEVICE                                                     
INFO     20:20:01.881 │ [AdbBinary]                                                
         F:\下载\StarRailCopilot_0.5.4_fullcn\StarRailCopilot\toolkit\Lib\site-pack
         es\adbutils\binaries\adb.exe                                              
INFO     20:20:01.882 │ [AdbClient] AdbClient(127.0.0.1, 5037)                     
INFO     20:20:01.883 │ <<< DETECT DEVICE >>>                                      
INFO     20:20:01.884 │ Here are the available devices, copy to                    
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"         
INFO     20:20:01.886 │ No available devices                                       
INFO     20:20:03.910 │ cannot connect to 127.0.0.1:16384:                         
         由于目标计算机积极拒绝,无法连接。 (10061)                                
INFO     20:20:03.911 │ cannot connect to 127.0.0.1:16384:                         
         由于目标计算机积极拒绝,无法连接。 (10061)                                
WARNING  20:20:03.912 │ No such device exists, please restart the emulator or set a
         correct serial                                                            
───────────────────────────── FIND EMULATOR INSTANCE ──────────────────────────────
INFO     20:20:03.914 │ FIND EMULATOR INSTANCE                                     
INFO     20:20:03.962 │ MuMuPlayer12(serial="127.0.0.1:16384",                     
         name="MuMuPlayer-12.0-0", path="I:/Program Files/Netease/MuMu Player      
         12/shell/MuMuPlayer.exe")                                                 
──────────────────────────────── EMULATOR INSTANCE ────────────────────────────────
INFO     20:20:03.964 │ EMULATOR INSTANCE                                          
INFO     20:20:03.964 │ Found emulator instance:                                   
         MuMuPlayer12(serial="127.0.0.1:16384", name="MuMuPlayer-12.0-0",          
         path="I:/Program Files/Netease/MuMu Player 12/shell/MuMuPlayer.exe")      
═════════════════════════════════ EMULATOR START ══════════════════════════════════
INFO     20:20:03.966 │ EMULATOR START                                             
────────────────────────────────── EMULATOR STOP ──────────────────────────────────
INFO     20:20:03.967 │ EMULATOR STOP                                              
INFO     20:20:04.933 │ Execute: "I:/Program Files/Netease/MuMu Player             
         12/shell/MuMuPlayer.exe" -v 0                                             
───────────────────────────────── EMULATOR START ──────────────────────────────────
INFO     20:20:04.945 │ EMULATOR START                                             
INFO     20:20:04.946 │ Current window: 2755300                                    
INFO     20:20:13.815 │ Emulator online: AdbDevice(127.0.0.1:16384, device)        
INFO     20:20:14.056 │ Command ping: pong                                         
INFO     20:20:14.204 │ Found azurlane packages: ['com.miHoYo.hkrpg']              
INFO     20:20:14.205 │ De-flash current window: 2755300                           
INFO     20:20:14.206 │ Emulator start completed                                   
═════════════════════════════════════ DEVICE ══════════════════════════════════════
INFO     20:20:14.208 │ DEVICE                                                     
INFO     20:20:14.208 │ [AdbBinary]                                                
         F:\下载\StarRailCopilot_0.5.4_fullcn\StarRailCopilot\toolkit\Lib\site-pack
         es\adbutils\binaries\adb.exe                                              
INFO     20:20:14.209 │ <<< DETECT DEVICE >>>                                      
INFO     20:20:14.211 │ Here are the available devices, copy to                    
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"         
INFO     20:20:14.212 │ 127.0.0.1:16384                                            
INFO     20:20:14.215 │ already connected to 127.0.0.1:16384                       
INFO     20:20:14.216 │ [AdbDevice] AdbDevice(serial=127.0.0.1:16384)              
INFO     20:20:14.217 │ [Server] CN-Official                                       
INFO     20:20:14.218 │ [PackageName] com.miHoYo.hkrpg                             
INFO     20:20:14.218 │ [Lang] cn                                                  
INFO     20:20:14.225 │ [nemud.app_keep_alive] false                               
INFO     20:20:14.226 │ NemuIpcImpl init, nemu_folder=I:\Program Files\Netease\MuMu
         Player 12, ipc_dll=I:\Program Files\Netease\MuMu Player                   
         12\shell\sdk\external_renderer_ipc.dll, instance_id=0, display_id=0       
INFO     20:20:14.229 │ [nemu_ipc_available] True                                  
INFO     20:20:14.230 │ Screenshot interval set to 0.2s                            
INFO     20:20:14.231 │ <<< MAATOUCH INIT >>>                                      
INFO     20:20:14.255 │ [Screen_size] 1280x720                                     
INFO     20:20:14.394 │ <<< APP STOP >>>                                           
INFO     20:20:14.396 │ App stop: com.miHoYo.hkrpg                                 
INFO     20:20:14.409 │ nemu_ipc released                                          
INFO     20:20:15.261 │ [Device Orientation] 1 (HOME key on the right)             
INFO     20:20:15.454 │ ^ 10 1280 720 255                                          
INFO     20:20:15.455 │ $ 255                                                      
INFO     20:20:15.456 │ MaaTouch stream connected                                  
INFO     20:20:15.457 │ max_contact: 10; max_x: 1280; max_y: 720; max_pressure: 255
[src] exited. Reason: Manual stop

截图

屏幕截图 2024-06-30 202545 屏幕截图 2024-06-30 202623

还有别的吗?

出错视频: https://github.com/LmeSzinc/StarRailCopilot/assets/117988750/d42747a9-22df-4515-9da8-98e91e8b4aa4

woqucao commented 5 months ago

如果达到运行时间,步骤:

  1. 到达时间
  2. src尝试运行
  3. 模拟器没反应
LmeSzinc commented 5 months ago

没有问题,所有任务已经执行完成,下一个任务在 2024-06-30 21:00:11

INFO     20:13:09.556 │ Bind task ['Alas', 'Dungeon']                              
INFO     20:13:09.558 │ Wait until 2024-06-30 21:00:11 for task `Dungeon`          
INFO     20:13:09.559 │ Close game during wait