OnmyojiAutoScript icon indicating copy to clipboard operation
OnmyojiAutoScript copied to clipboard

大佬们,出现AdbError: unknown host service这类报错怎么解决呀

Open yyswj opened this issue 3 months ago • 2 comments

在提问之前...

  • [x] 我已经搜索了现有的 issues
  • [x] 我在提问题之前至少花费了 5 分钟来思考和准备
  • [x] 我已经阅读了文档中的 常见问题(FAQ)
  • [x] 这个问题出现了至少三次,不是偶发的
  • [ ] 我使用 OAS 的 dev 分支

描述你的问题

按照教程的步骤配置完后运行脚本出现如题报错

如何复现

配置好需要的任务之后点击运行出现报错

预期行为

No response

相关 Logs

════════════════════════════════════════════════════════════════════════════════
──────────────────────────────────── START ─────────────────────────────────────
════════════════════════════════════════════════════════════════════════════════
INFO     | 17:13:24.190 | Log cleanup finished                                  
INFO     | 17:13:24.191 | Start scheduler loop: oas1                            
INFO     | 17:13:24.198 |   显示窗口:                                           
INFO     | 17:13:24.203 | Pending tasks: ['AreaBoss', 'Orochi']                 
INFO     | 17:13:24.204 | [Task] AreaBoss (Enable, 5, 2024-09-12 17:09:00)      
════════════════════════════════════ DEVICE ════════════════════════════════════
INFO     | 17:13:24.206 |   DEVICE                                              
INFO     | 17:13:24.207 | [AdbBinary]                                           
         F:/OnmyojiAutoScript/toolkit/Lib/site-packages/adbutils/binaries/adb.ex
         e                                                                      
INFO     | 17:13:24.208 | [AdbClient] AdbClient(127.0.0.1, 5037)                
INFO     | 17:13:24.209 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:24.210 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:24.212 | 127.0.0.1:16384                                       
INFO     | 17:13:24.212 | emulator-5554                                         
INFO     | 17:13:24.216 | already connected to 127.0.0.1:16384                  
INFO     | 17:13:24.217 | [AdbDevice] AdbDevice(serial=127.0.0.1:16384 )        
INFO     | 17:13:24.217 | <<< DETECT PACKAGE >>>                                
INFO     | 17:13:24.218 | Get package list                                      
INFO     | 17:13:24.248 | Here are the available packages in device             
         "127.0.0.1:16384 ", copy to Alas.Emulator.PackageName to use it        
INFO     | 17:13:24.250 | com.netease.onmyoji.wyzymnqsd_cps                     
INFO     | 17:13:24.251 | Auto package detection found only one package, using  
         it                                                                     
INFO     | 17:13:24.251 | Server changed, release resources                     
INFO     | 17:13:24.252 | [PackageName] com.netease.onmyoji.wyzymnqsd_cps       
INFO     | 17:13:24.253 | <<< HANDLE >>>                                        
INFO     | 17:13:24.254 | Handle is empty. oas not use handle                   
INFO     | 17:13:24.255 | Screenshot interval set to 0.3s                       
INFO     | 17:13:24.256 | run_simple_screenshot_benchmark                       
INFO     | 17:13:24.471 | Disable stuck detection                               
INFO     | 17:13:24.477 | sdk_ver: 32                                           
══════════════════════════════════ BENCHMARK ═══════════════════════════════════
INFO     | 17:13:24.478 | BENCHMARK                                             
INFO     | 17:13:24.479 | Testing screenshot methods: ('ADB', 'ADB_nc',         
         'uiautomator2', 'DroidCast_raw', 'DroidCast', 'nemu_ipc')              
INFO     | 17:13:24.480 | Testing click methods: ()                             
──────────────────────────────── BENCHMARK TEST ────────────────────────────────
INFO     | 17:13:24.481 | BENCHMARK TEST                                        
INFO     | 17:13:24.482 | Testing function: screenshot_adb                      
INFO     | 17:13:24.835 | [01/3] 0.352s                                         
INFO     | 17:13:25.174 | [02/3] 0.337s                                         
INFO     | 17:13:25.506 | [03/3] 0.330s                                         
INFO     | 17:13:25.507 | Benchmark tests done                                  
INFO     | 17:13:25.508 | Time cost 0.330s (1 best results out of 3 tests)      
──────────────────────────────── BENCHMARK TEST ────────────────────────────────
INFO     | 17:13:25.509 | BENCHMARK TEST                                        
INFO     | 17:13:25.510 | Testing function: screenshot_adb_nc                   
INFO     | 17:13:25.514 | Connecting to local emulator, using host 192.168.1.225
INFO     | 17:13:25.515 | Reverse server listening on 192.168.1.225:20909,      
         client can send data to 192.168.1.225:20909                            
INFO     | 17:13:25.516 | sdk_ver: 32                                           
INFO     | 17:13:25.531 | [nc command] ['nc']                                   
INFO     | 17:13:25.635 | [01/3] 0.123s                                         
INFO     | 17:13:25.732 | [02/3] 0.095s                                         
INFO     | 17:13:25.830 | [03/3] 0.098s                                         
INFO     | 17:13:25.832 | Benchmark tests done                                  
INFO     | 17:13:25.833 | Time cost 0.095s (1 best results out of 3 tests)      
──────────────────────────────── BENCHMARK TEST ────────────────────────────────
INFO     | 17:13:25.834 | BENCHMARK TEST                                        
INFO     | 17:13:25.835 | Testing function: screenshot_uiautomator2             
ERROR    | 17:13:25.838 | AdbError: unknown host service                        
INFO     | 17:13:25.843 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:25.849 | connected to 127.0.0.1:16384                          
INFO     | 17:13:25.850 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:25.851 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:25.853 | 127.0.0.1:16384                                       
INFO     | 17:13:25.854 | emulator-5554                                         
ERROR    | 17:13:25.856 | AdbError: unknown host service                        
INFO     | 17:13:26.860 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:26.866 | connected to 127.0.0.1:16384                          
INFO     | 17:13:26.867 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:26.868 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:26.869 | 127.0.0.1:16384                                       
INFO     | 17:13:26.870 | emulator-5554                                         
ERROR    | 17:13:26.872 | AdbError: unknown host service                        
INFO     | 17:13:29.876 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:29.882 | connected to 127.0.0.1:16384                          
INFO     | 17:13:29.883 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:29.885 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:29.886 | 127.0.0.1:16384                                       
INFO     | 17:13:29.887 | emulator-5554                                         
ERROR    | 17:13:29.889 | AdbError: unknown host service                        
INFO     | 17:13:32.894 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:32.900 | connected to 127.0.0.1:16384                          
INFO     | 17:13:32.901 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:32.902 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:32.904 | 127.0.0.1:16384                                       
INFO     | 17:13:32.905 | emulator-5554                                         
ERROR    | 17:13:32.907 | AdbError: unknown host service                        
CRITICAL | 17:13:32.908 | Retry screenshot_uiautomator2() failed                
CRITICAL | 17:13:32.909 | RequestHumanTakeover                                  
WARNING  | 17:13:32.910 | Benchmark tests failed on func:                       
         screenshot_uiautomator2                                                
──────────────────────────────── BENCHMARK TEST ────────────────────────────────
INFO     | 17:13:32.911 | BENCHMARK TEST                                        
INFO     | 17:13:32.912 | Testing function: screenshot_droidcast_raw            
INFO     | 17:13:33.042 | [nemud.app_keep_alive]                                
ERROR    | 17:13:33.043 | AdbError: unknown host service                        
INFO     | 17:13:33.048 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:33.054 | connected to 127.0.0.1:16384                          
INFO     | 17:13:33.055 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:33.056 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:33.058 | 127.0.0.1:16384                                       
INFO     | 17:13:33.059 | emulator-5554                                         
ERROR    | 17:13:33.061 | AdbError: unknown host service                        
INFO     | 17:13:34.066 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:34.071 | connected to 127.0.0.1:16384                          
INFO     | 17:13:34.072 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:34.074 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:34.075 | 127.0.0.1:16384                                       
INFO     | 17:13:34.076 | emulator-5554                                         
ERROR    | 17:13:34.077 | AdbError: unknown host service                        
INFO     | 17:13:37.082 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:37.087 | connected to 127.0.0.1:16384                          
INFO     | 17:13:37.088 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:37.089 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:37.091 | 127.0.0.1:16384                                       
INFO     | 17:13:37.091 | emulator-5554                                         
ERROR    | 17:13:37.093 | AdbError: unknown host service                        
INFO     | 17:13:40.097 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:40.105 | connected to 127.0.0.1:16384                          
INFO     | 17:13:40.106 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:40.107 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:40.108 | 127.0.0.1:16384                                       
INFO     | 17:13:40.109 | emulator-5554                                         
ERROR    | 17:13:40.110 | AdbError: unknown host service                        
CRITICAL | 17:13:40.111 | Retry screenshot_droidcast_raw() failed               
CRITICAL | 17:13:40.112 | RequestHumanTakeover                                  
WARNING  | 17:13:40.112 | Benchmark tests failed on func:                       
         screenshot_droidcast_raw                                               
──────────────────────────────── BENCHMARK TEST ────────────────────────────────
INFO     | 17:13:40.113 | BENCHMARK TEST                                        
INFO     | 17:13:40.114 | Testing function: screenshot_droidcast                
ERROR    | 17:13:40.116 | AdbError: unknown host service                        
INFO     | 17:13:40.120 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:40.216 | connected to 127.0.0.1:16384                          
INFO     | 17:13:40.217 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:40.218 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:40.220 | 127.0.0.1:16384                                       
INFO     | 17:13:40.221 | emulator-5554                                         
ERROR    | 17:13:40.222 | AdbError: unknown host service                        
INFO     | 17:13:41.227 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:41.233 | connected to 127.0.0.1:16384                          
INFO     | 17:13:41.234 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:41.235 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:41.236 | 127.0.0.1:16384                                       
INFO     | 17:13:41.237 | emulator-5554                                         
ERROR    | 17:13:41.239 | AdbError: unknown host service                        
INFO     | 17:13:44.243 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:44.249 | connected to 127.0.0.1:16384                          
INFO     | 17:13:44.251 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:44.252 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:44.253 | 127.0.0.1:16384                                       
INFO     | 17:13:44.254 | emulator-5554                                         
ERROR    | 17:13:44.255 | AdbError: unknown host service                        
INFO     | 17:13:47.259 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:47.265 | connected to 127.0.0.1:16384                          
INFO     | 17:13:47.266 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:47.267 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:47.268 | 127.0.0.1:16384                                       
INFO     | 17:13:47.269 | emulator-5554                                         
ERROR    | 17:13:47.270 | AdbError: unknown host service                        
CRITICAL | 17:13:47.271 | Retry screenshot_droidcast() failed                   
CRITICAL | 17:13:47.271 | RequestHumanTakeover                                  
WARNING  | 17:13:47.272 | Benchmark tests failed on func: screenshot_droidcast  
──────────────────────────────── BENCHMARK TEST ────────────────────────────────
INFO     | 17:13:47.274 | BENCHMARK TEST                                        
INFO     | 17:13:47.274 | Testing function: screenshot_nemu_ipc                 
INFO     | 17:13:47.276 | NemuIpcImpl init, nemu_folder=D:\MuMuPlayer,          
         ipc_dll=D:\MuMuPlayer\nx_device\12.0\shell\sdk\external_renderer_ipc.dl
         l, instance_id=0, display_id=0                                         
INFO     | 17:13:47.284 | [01/3] 0.010s                                         
INFO     | 17:13:47.289 | [02/3] 0.004s                                         
INFO     | 17:13:47.296 | [03/3] 0.005s                                         
INFO     | 17:13:47.297 | Benchmark tests done                                  
INFO     | 17:13:47.298 | Time cost 0.004s (1 best results out of 3 tests)      
══════════════════════════════ BENCHMARK RESULTS ═══════════════════════════════
INFO     | 17:13:47.300 | BENCHMARK RESULTS                                     
Align(<rich.table.Table object at 0x000002CF210A6E60>, 'center')INFO     | 17:13:47.304 | Recommend screenshot method: nemu_ipc (0.004s)        
INFO     | 17:13:47.311 | Scheduler: Start task `AreaBoss`                      
════════════════════════════════════════════════════════════════════════════════
─────────────────────────────────── AREABOSS ───────────────────────────────────
════════════════════════════════════════════════════════════════════════════════
INFO     | 17:13:47.317 | [Screen_size] 1280x720                                
INFO     | 17:13:47.319 | module_path:                                          
         F:\OnmyojiAutoScript\tasks\AreaBoss\script_task.py, module_name:       
         script_task                                                            
INFO     | 17:13:47.380 | UI get current page                                   
INFO     | 17:13:47.408 | [UI] page_onmyodo                                     
INFO     | 17:13:47.409 | <<< UI GOTO PAGE_AREA_BOSS >>>                        
INFO     | 17:13:47.418 | Page switch: page_onmyodo -> page_main                
INFO     | 17:13:47.420 | Click (  41,   32) @ PAGE_BACK_Y                      
ERROR    | 17:13:47.422 | AdbError: unknown host service                        
INFO     | 17:13:47.427 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:47.432 | connected to 127.0.0.1:16384                          
INFO     | 17:13:47.433 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:47.435 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:47.435 | 127.0.0.1:16384                                       
INFO     | 17:13:47.436 | emulator-5554                                         
ERROR    | 17:13:47.439 | AdbError: unknown host service                        
INFO     | 17:13:48.443 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:48.449 | connected to 127.0.0.1:16384                          
INFO     | 17:13:48.450 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:48.451 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:48.453 | 127.0.0.1:16384                                       
INFO     | 17:13:48.454 | emulator-5554                                         
ERROR    | 17:13:48.456 | AdbError: unknown host service                        
INFO     | 17:13:51.461 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:51.467 | connected to 127.0.0.1:16384                          
INFO     | 17:13:51.468 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:51.468 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:51.470 | 127.0.0.1:16384                                       
INFO     | 17:13:51.471 | emulator-5554                                         
ERROR    | 17:13:51.473 | AdbError: unknown host service                        
INFO     | 17:13:54.478 | disconnected 127.0.0.1:16384                          
INFO     | 17:13:54.484 | connected to 127.0.0.1:16384                          
INFO     | 17:13:54.485 | <<< DETECT DEVICE >>>                                 
INFO     | 17:13:54.486 | Here are the available devices, copy to               
         Alas.Emulator.Serial to use it or set Alas.Emulator.Serial="auto"      
INFO     | 17:13:54.487 | 127.0.0.1:16384                                       
INFO     | 17:13:54.487 | emulator-5554                                         
ERROR    | 17:13:54.490 | AdbError: unknown host service                        
CRITICAL | 17:13:54.491 | Retry click_uiautomator2() failed                     
CRITICAL | 17:13:54.492 |                                                       
CRITICAL | 17:13:54.492 | Request human takeover                                
INFO     | 17:13:54.493 | Notifier: OAS1                                        
INFO     | 17:13:54.495 | Script oas1 process exit                              
ERROR    | 17:13:54.496 | Error: 1

截图

Image

还有别的吗?

No response

yyswj avatar Sep 12 '25 09:09 yyswj

Image

runhey avatar Sep 12 '25 13:09 runhey

你可以先搜索看看这些类似的

runhey avatar Sep 12 '25 13:09 runhey