LmeSzinc / AzurLaneAutoScript

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

重啟設定經常卡死, 不懂什麼原因 #2839

Open bagamonjai opened 1 year ago

bagamonjai commented 1 year ago

在提问之前...

描述你的问题

重啟設定經常卡死, 不懂什麼原因

如何复现

只要執行重啟設定有一定機率發生

预期行为

No response

相关 Logs

════════════════════════════════════════════════════════════════════════════════════════════════════════
                                                            RESTART                                                             
════════════════════════════════════════════════════════════════════════════════════════════════════════INFO     09:05:18.388 │ <<< APP RESTART >>>                                                                                     
INFO     09:05:18.389 │ App stop: com.YoStarJP.AzurLane                                                                         
INFO     09:05:18.659 │ App start: com.YoStarJP.AzurLane                                                                        
INFO     09:05:19.097 │ <<< APP LOGIN >>>                                                                                       
INFO     09:05:19.110 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:05:24.423 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:05:30.423 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:05:36.427 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:05:42.440 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:05:48.435 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:05:54.443 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:06:00.451 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:06:06.460 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:06:12.460 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:06:18.466 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:06:24.470 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:06:30.476 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:06:36.483 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:06:42.490 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:06:48.495 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:06:54.509 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:07:00.512 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:07:06.520 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:07:12.523 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:07:18.522 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:07:24.533 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:07:30.537 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:07:36.535 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:07:42.549 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:07:48.554 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:07:54.554 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:08:00.566 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:08:06.565 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:08:12.578 │ [Device Orientation] 0 (Normal)                                                                         
INFO     09:08:18.575 │ [Device Orientation] 0 (Normal)                                                                         
WARNING  09:08:19.574 │ Wait too long                                                                                           
WARNING  09:08:19.575 │ Waiting for {'PLAYER_CHECK', 'GOTO_MAIN', 'META_CHECK', 'LOGIN_ANNOUNCE', 'GET_ITEMS_1',                
         'GUILD_POPUP_CONFIRM', 'MAINTENANCE_ANNOUNCE', 'LOGIN_CHECK', 'BATTLE_PASS_NOTICE', 'MAIN_GOTO_CAMPAIGN',              
         'EVENT_LIST_CHECK', 'GET_MISSION', 'GET_ITEMS_2', 'LOGIN_RETURN_INFO', 'MONTHLY_PASS_NOTICE', 'SHIPYARD_CHECK',        
         'PURCHASE_POPUP', 'POPUP_CANCEL', 'LOGIN_GAME_UPDATE', 'LOGIN_RETURN_SIGN'}                                            
ERROR    09:08:20.280 │ OSError: Couldn't get focused app                                                                       
         ╭───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────╮
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\module\device\method\uiautomator_2.py:32 in        │
         │ retry_wrapper                                                                                                       │
         │                                                                                                                     │
         │    30 │   │   │   │   │   retry_sleep(_)                                                                            │
         │    31 │   │   │   │   │   init()                                                                                    │
         │ ❱  32 │   │   │   │   return func(self, *args, **kwargs)                                                            │
         │    33 │   │   │   # Can't handle                                                                                    │
         │    34 │   │   │   except RequestHumanTakeover:                                                                      │
         │                                                                                                                     │
         │ ╭──────────────────────────────────── locals ─────────────────────────────────────╮                                 │
         │ │      _ = 0                                                                      │                                 │
         │ │   args = ()                                                                     │                                 │
         │ │      e = OSError("Couldn't get focused app")                                    │                                 │
         │ │   func = <function Uiautomator2.app_current_uiautomator2 at 0x000002647E014E58> │                                 │
         │ │   init = None                                                                   │                                 │
         │ │ kwargs = {}                                                                     │                                 │
         │ │   self = <module.device.device.Device object at 0x0000026437926088>             │                                 │
         │ ╰─────────────────────────────────────────────────────────────────────────────────╯                                 │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\module\device\method\uiautomator_2.py:219 in       │
         │ app_current_uiautomator2                                                                                            │
         │                                                                                                                     │
         │   217 │   │   │   str: Package name.                                                                                │
         │   218 │   │   """                                                                                                   │
         │ ❱ 219 │   │   result = self.u2.app_current()                                                                        │
         │   220 │   │   return result['package']                                                                              │
         │   221                                                                                                               │
         │                                                                                                                     │
         │ ╭───────────────────────────── locals ──────────────────────────────╮                                               │
         │ │ self = <module.device.device.Device object at 0x0000026437926088> │                                               │
         │ ╰───────────────────────────────────────────────────────────────────╯                                               │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\decorator.py:232 in fun  │
         │                                                                                                                     │
         │   230 │   │   │   if not kwsyntax:                                                                                  │
         │   231 │   │   │   │   args, kw = fix(args, kw, sig)                                                                 │
         │ ❱ 232 │   │   │   return caller(func, *(extras + args), **kw)                                                       │
         │   233 │   fun.__name__ = func.__name__                                                                              │
         │   234 │   fun.__doc__ = func.__doc__                                                                                │
         │                                                                                                                     │
         │ ╭──────────────────────────────────── locals ────────────────────────────────────╮                                  │
         │ │     args = (<module.device.method.utils.Device object at 0x000002647C8B8708>,) │                                  │
         │ │   caller = <function retry.<locals>.retry_decorator at 0x000002647DFEF168>     │                                  │
         │ │   extras = ()                                                                  │                                  │
         │ │     func = <function _AppMixIn.app_current at 0x000002647DFEF1F8>              │                                  │
         │ │       kw = {}                                                                  │                                  │
         │ │ kwsyntax = False                                                               │                                  │
         │ │      sig = <Signature (self)>                                                  │                                  │
         │ ╰────────────────────────────────────────────────────────────────────────────────╯                                  │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\retry\api.py:74 in       │
         │ retry_decorator                                                                                                     │
         │                                                                                                                     │
         │    72 │   │   kwargs = fkwargs if fkwargs else dict()                                                               │
         │    73 │   │   return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay,                        │
         │       max_delay, backoff, jitter,                                                                                   │
         │ ❱  74 │   │   │   │   │   │   │   │   logger)                                                                       │
         │    75 │                                                                                                             │
         │    76 │   return retry_decorator                                                                                    │
         │                                                                                                                     │
         │ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
         │ │       args = (<module.device.method.utils.Device object at 0x000002647C8B8708>,)                                │ │
         │ │    backoff = 1                                                                                                  │ │
         │ │      delay = 0.3                                                                                                │ │
         │ │ exceptions = <class 'OSError'>                                                                                  │ │
         │ │          f = <function _AppMixIn.app_current at 0x000002647DFEF1F8>                                             │ │
         │ │      fargs = (<module.device.method.utils.Device object at 0x000002647C8B8708>,)                                │ │
         │ │    fkwargs = {}                                                                                                 │ │
         │ │     jitter = 0                                                                                                  │ │
         │ │     kwargs = {}                                                                                                 │ │
         │ │     logger = <module 'logging' from                                                                             │ │
         │ │              'C:\\Users\\Isaac\\Documents\\AlasApp_0.4.3_fullcn\\AzurLaneAutoScript\\toolkit\\lib\\logging\\__… │ │
         │ │  max_delay = None                                                                                               │ │
         │ │      tries = 3                                                                                                  │ │
         │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
                                                                            │
         │ ╭───────────────────────────── locals ──────────────────────────────╮                                               │
         │ │ self = <module.device.device.Device object at 0x0000026437926088> │                                               │
         │ ╰───────────────────────────────────────────────────────────────────╯                                               │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\decorator.py:232 in fun  │
         │                                                                                                                     │
         │   230 │   │   │   if not kwsyntax:                                                                                  │
         │   231 │   │   │   │   args, kw = fix(args, kw, sig)                                                                 │
         │ ❱ 232 │   │   │   return caller(func, *(extras + args), **kw)                                                       │
         │   233 │   fun.__name__ = func.__name__                                                                              │
         │   234 │   fun.__doc__ = func.__doc__                                                                                │
         │                                                                                                                     │
         │ ╭──────────────────────────────────── locals ────────────────────────────────────╮                                  │
         │ │     args = (<module.device.method.utils.Device object at 0x000002647C8B8708>,) │                                  │
         │ │   caller = <function retry.<locals>.retry_decorator at 0x000002647DFEF168>     │                                  │
         │ │   extras = ()                                                                  │                                  │
         │ │     func = <function _AppMixIn.app_current at 0x000002647DFEF1F8>              │                                  │
         │ │       kw = {}                                                                  │                                  │
         │ │ kwsyntax = False                                                               │                                  │
         │ │      sig = <Signature (self)>                                                  │                                  │
         │ ╰────────────────────────────────────────────────────────────────────────────────╯                                  │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\retry\api.py:74 in       │
         │ retry_decorator                                                                                                     │
         │                                                                                                                     │
         │    72 │   │   kwargs = fkwargs if fkwargs else dict()                                                               │
         │    73 │   │   return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay,                        │
         │       max_delay, backoff, jitter,                                                                                   │
         │ ❱  74 │   │   │   │   │   │   │   │   logger)                                                                       │
         │    75 │                                                                                                             │
         │    76 │   return retry_decorator                                                                                    │
         │                                                                                                                     │
         │ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
         │ │       args = (<module.device.method.utils.Device object at 0x000002647C8B8708>,)                                │ │
         │ │    backoff = 1                                                                                                  │ │
         │ │      delay = 0.3                                                                                                │ │
         │ │ exceptions = <class 'OSError'>                                                                                  │ │
         │ │          f = <function _AppMixIn.app_current at 0x000002647DFEF1F8>                                             │ │
         │ │      fargs = (<module.device.method.utils.Device object at 0x000002647C8B8708>,)                                │ │
         │ │    fkwargs = {}                                                                                                 │ │
         │ │     jitter = 0                                                                                                  │ │
         │ │     kwargs = {}                                                                                                 │ │
         │ │     logger = <module 'logging' from                                                                             │ │
         │ │              'C:\\Users\\Isaac\\Documents\\AlasApp_0.4.3_fullcn\\AzurLaneAutoScript\\toolkit\\lib\\logging\\__… │ │
         │ │  max_delay = None                                                                                               │ │
         │ │      tries = 3                                                                                                  │ │
         │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\retry\api.py:33 in       │
         │ __retry_internal                                                                                                    │
         │                                                                                                                     │
         │    31 │   while _tries:                                                                                             │
         │    32 │   │   try:                                                                                                  │
         │ ❱  33 │   │   │   return f()                                                                                        │
         │    34 │   │   except exceptions as e:                                                                               │
         │    35 │   │   │   _tries -= 1                                                                                       │
         │                                                                                                                     │
         │ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
         │ │     _delay = 0.3                                                                                                │ │
         │ │     _tries = 0                                                                                                  │ │
         │ │    backoff = 1                                                                                                  │ │
         │ │      delay = 0.3                                                                                                │ │
         │ │ exceptions = <class 'OSError'>                                                                                  │ │
         │ │          f = functools.partial(<function _AppMixIn.app_current at 0x000002647DFEF1F8>,                          │ │
         │ │              <module.device.method.utils.Device object at 0x000002647C8B8708>)                                  │ │
         │ │     jitter = 0                                                                                                  │ │
         │ │     logger = <module 'logging' from                                                                             │ │
         │ │              'C:\\Users\\Isaac\\Documents\\AlasApp_0.4.3_fullcn\\AzurLaneAutoScript\\toolkit\\lib\\logging\\__… │ │
         │ │  max_delay = None                                                                                               │ │
         │ │      tries = 3                                                                                                  │ │
         │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\uiautomator2\__init__.py │
         │ :1373 in app_current                                                                                                │
         │                                                                                                                     │
         │   1371 │   │   if ret:  # get last result                                                                           │
         │   1372 │   │   │   return ret                                                                                       │
         │ ❱ 1373 │   │   raise OSError("Couldn't get focused app")                                                            │
         │   1374 │                                                                                                            │
         │   1375 │   def app_install(self, data):                                                                             │
         │                                                                                                                     │
         │ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
         │ │           _ = 0                                                                                                 │ │
         │ │ _activityRE = re.compile('ACTIVITY (?P<package>[^\\s]+)/(?P<activity>[^/\\s]+) \\w+ pid=(?P<pid>\\d+)')         │ │
         │ │  _focusedRE = re.compile('mCurrentFocus=Window{.*?\\s+(?P<package>[^\\s]+)/(?P<activity>[^\\s]+)\\}')           │ │
         │ │   _recordRE = re.compile('mResumedActivity:                                                                     │ │
         │ │               ActivityRecord\\{.*?\\s+(?P<package>[^\\s]+)/(?P<activity>[^\\s]+)\\s.*?\\}')                     │ │
         │ │           m = None                                                                                              │ │
         │ │          ms = <callable_iterator object at 0x0000026401FCA408>                                                  │ │
         │ │      output = 'TASK com.YoStarJP.AzurLane id=4\n  ACTIVITY com.YoStarJP.AzurLane/com.manjuu.azur'+53            │ │
         │ │     package = None                                                                                              │ │
         │ │         ret = None                                                                                              │ │
         │ │        self = <module.device.method.utils.Device object at 0x000002647C8B8708>                                  │ │
         │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
         ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
         OSError: Couldn't get focused app                                                                                      
ERROR    09:08:27.126 │ OSError: Couldn't get focused app                                                                       
         ╭───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────╮
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\module\device\method\uiautomator_2.py:32 in        │
         │ retry_wrapper                                                                                                       │
         │                                                                                                                     │
         │    30 │   │   │   │   │   retry_sleep(_)                                                                            │
         │    31 │   │   │   │   │   init()                                                                                    │
         │ ❱  32 │   │   │   │   return func(self, *args, **kwargs)                                                            │
         │    33 │   │   │   # Can't handle                                                                                    │
         │    34 │   │   │   except RequestHumanTakeover:                                                                      │
         │                                                                                                                     │
         │ ╭─────────────────────────────────────── locals ───────────────────────────────────────╮                            │
         │ │      _ = 3                                                                           │                            │
         │ │   args = ()                                                                          │                            │
         │ │      e = OSError("Couldn't get focused app")                                         │                            │
         │ │   func = <function Uiautomator2.app_current_uiautomator2 at 0x000002647E014E58>      │                            │
         │ │   init = <function retry.<locals>.retry_wrapper.<locals>.init at 0x0000026401CBEA68> │                            │
         │ │ kwargs = {}                                                                          │                            │
         │ │   self = <module.device.device.Device object at 0x0000026437926088>                  │                            │
         │ ╰──────────────────────────────────────────────────────────────────────────────────────╯                            │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\module\device\method\uiautomator_2.py:219 in       │
         │ app_current_uiautomator2                                                                                            │
         │                                                                                                                     │
         │   217 │   │   │   str: Package name.                                                                                │
         │   218 │   │   """                                                                                                   │
         │ ❱ 219 │   │   result = self.u2.app_current()                                                                        │
         │   220 │   │   return result['package']                                                                              │
         │   221                                                                                                               │
         │                                                                                                                     │
         │ ╭───────────────────────────── locals ──────────────────────────────╮                                               │
         │ │ self = <module.device.device.Device object at 0x0000026437926088> │                                               │
         │ ╰───────────────────────────────────────────────────────────────────╯                                               │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\decorator.py:232 in fun  │
         │                                                                                                                     │
         │   230 │   │   │   if not kwsyntax:                                                                                  │
         │   231 │   │   │   │   args, kw = fix(args, kw, sig)                                                                 │
         │ ❱ 232 │   │   │   return caller(func, *(extras + args), **kw)                                                       │
         │   233 │   fun.__name__ = func.__name__                                                                              │
         │   234 │   fun.__doc__ = func.__doc__                                                                                │
         │                                                                                                                     │
         │ ╭──────────────────────────────────── locals ────────────────────────────────────╮                                  │
         │ │     args = (<module.device.method.utils.Device object at 0x000002647C8B8708>,) │                                  │
         │ │   caller = <function retry.<locals>.retry_decorator at 0x000002647DFEF168>     │                                  │
         │ │   extras = ()                                                                  │                                  │
         │ │     func = <function _AppMixIn.app_current at 0x000002647DFEF1F8>              │                                  │
         │ │       kw = {}                                                                  │                                  │
         │ │ kwsyntax = False                                                               │                                  │
         │ │      sig = <Signature (self)>                                                  │                                  │
         │ ╰────────────────────────────────────────────────────────────────────────────────╯                                  │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\retry\api.py:74 in       │
         │ retry_decorator                                                                                                     │
         │                                                                                                                     │
         │    72 │   │   kwargs = fkwargs if fkwargs else dict()                                                               │
         │    73 │   │   return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay,                        │
         │       max_delay, backoff, jitter,                                                                                   │
         │ ❱  74 │   │   │   │   │   │   │   │   logger)                                                                       │
         │    75 │                                                                                                             │
         │    76 │   return retry_decorator                                                                                    │
         │                                                                                                                     │
         │ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
         │ │       args = (<module.device.method.utils.Device object at 0x000002647C8B8708>,)                                │ │
         │ │    backoff = 1                                                                                                  │ │
         │ │      delay = 0.3                                                                                                │ │
         │ │ exceptions = <class 'OSError'>                                                                                  │ │
         │ │          f = <function _AppMixIn.app_current at 0x000002647DFEF1F8>                                             │ │
         │ │      fargs = (<module.device.method.utils.Device object at 0x000002647C8B8708>,)                                │ │
         │ │    fkwargs = {}                                                                                                 │ │
         │ │     jitter = 0                                                                                                  │ │
         │ │     kwargs = {}                                                                                                 │ │
         │ │     logger = <module 'logging' from                                                                             │ │
         │ │              'C:\\Users\\Isaac\\Documents\\AlasApp_0.4.3_fullcn\\AzurLaneAutoScript\\toolkit\\lib\\logging\\__… │ │
         │ │  max_delay = None                                                                                               │ │
         │ │      tries = 3                                                                                                  │ │
         │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\retry\api.py:33 in       │
         │ __retry_internal                                                                                                    │
         │                                                                                                                     │
         │    31 │   while _tries:                                                                                             │
         │    32 │   │   try:                                                                                                  │
         │ ❱  33 │   │   │   return f()                                                                                        │
         │    34 │   │   except exceptions as e:                                                                               │
         │    35 │   │   │   _tries -= 1                                                                                       │
         │                                                                                                                     │
         │ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
         │ │     _delay = 0.3                                                                                                │ │
         │ │     _tries = 0                                                                                                  │ │
         │ │    backoff = 1                                                                                                  │ │
         │ │      delay = 0.3                                                                                                │ │
         │ │ exceptions = <class 'OSError'>                                                                                  │ │
         │ │          f = functools.partial(<function _AppMixIn.app_current at 0x000002647DFEF1F8>,                          │ │
         │ │              <module.device.method.utils.Device object at 0x000002647C8B8708>)                                  │ │
         │ │     jitter = 0                                                                                                  │ │
         │ │     logger = <module 'logging' from                                                                             │ │
         │ │              'C:\\Users\\Isaac\\Documents\\AlasApp_0.4.3_fullcn\\AzurLaneAutoScript\\toolkit\\lib\\logging\\__… │ │
         │ │  max_delay = None                                                                                               │ │
         │ │      tries = 3                                                                                                  │ │
         │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\uiautomator2\__init__.py │
         │ :1373 in app_current                                                                                                │
         │                                                                                                                     │
         │   1371 │   │   if ret:  # get last result                                                                           │
         │   1372 │   │   │   return ret                                                                                       │
         │ ❱ 1373 │   │   raise OSError("Couldn't get focused app")                                                            │
         │   1374 │                                                                                                            │
         │   1375 │   def app_install(self, data):                                                                             │
         │                                                                                                                     │
         │ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
         │ │           _ = 0                                                                                                 │ │
         │ │ _activityRE = re.compile('ACTIVITY (?P<package>[^\\s]+)/(?P<activity>[^/\\s]+) \\w+ pid=(?P<pid>\\d+)')         │ │
         │ │  _focusedRE = re.compile('mCurrentFocus=Window{.*?\\s+(?P<package>[^\\s]+)/(?P<activity>[^\\s]+)\\}')           │ │
         │ │   _recordRE = re.compile('mResumedActivity:                                                                     │ │
         │ │               ActivityRecord\\{.*?\\s+(?P<package>[^\\s]+)/(?P<activity>[^\\s]+)\\s.*?\\}')                     │ │
         │ │           m = None                                                                                              │ │
         │ │          ms = <callable_iterator object at 0x000002647E4A0A88>                                                  │ │
         │ │      output = 'TASK com.YoStarJP.AzurLane id=4\n  ACTIVITY com.YoStarJP.AzurLane/com.manjuu.azur'+53            │ │
         │ │     package = None                                                                                              │ │
         │ │         ret = None                                                                                              │ │
         │ │        self = <module.device.method.utils.Device object at 0x000002647C8B8708>                                  │ │
         │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
         ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
         OSError: Couldn't get focused app                                                                                      
ERROR    09:08:31.034 │ OSError: Couldn't get focused app                                                                       
         ╭───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────╮
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\module\device\method\uiautomator_2.py:32 in        │
         │ retry_wrapper                                                                                                       │
         │                                                                                                                     │
         │    30 │   │   │   │   │   retry_sleep(_)                                                                            │
         │    31 │   │   │   │   │   init()                                                                                    │
         │ ❱  32 │   │   │   │   return func(self, *args, **kwargs)                                                            │
         │    33 │   │   │   # Can't handle                                                                                    │
         │    34 │   │   │   except RequestHumanTakeover:                                                                      │
         │                                                                                                                     │
         │ ╭─────────────────────────────────────── locals ───────────────────────────────────────╮                            │
         │ │      _ = 4                                                                           │                            │
         │ │   args = ()                                                                          │                            │
         │ │      e = OSError("Couldn't get focused app")                                         │                            │
         │ │   func = <function Uiautomator2.app_current_uiautomator2 at 0x000002647E014E58>      │                            │
         │ │   init = <function retry.<locals>.retry_wrapper.<locals>.init at 0x0000026401BD7828> │                            │
         │ │ kwargs = {}                                                                          │                            │
         │ │   self = <module.device.device.Device object at 0x0000026437926088>                  │                            │
         │ ╰──────────────────────────────────────────────────────────────────────────────────────╯                            │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\module\device\method\uiautomator_2.py:219 in       │
         │ app_current_uiautomator2                                                                                            │
         │                                                                                                                     │
         │   217 │   │   │   str: Package name.                                                                                │
         │   218 │   │   """                                                                                                   │
         │ ❱ 219 │   │   result = self.u2.app_current()                                                                        │
         │   220 │   │   return result['package']                                                                              │
         │   221                                                                                                               │
         │                                                                                                                     │
         │ ╭───────────────────────────── locals ──────────────────────────────╮                                               │
         │ │ self = <module.device.device.Device object at 0x0000026437926088> │                                               │
         │ ╰───────────────────────────────────────────────────────────────────╯                                               │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\decorator.py:232 in fun  │
         │                                                                                                                     │
         │   230 │   │   │   if not kwsyntax:                                                                                  │
         │   231 │   │   │   │   args, kw = fix(args, kw, sig)                                                                 │
         │ ❱ 232 │   │   │   return caller(func, *(extras + args), **kw)                                                       │
         │   233 │   fun.__name__ = func.__name__                                                                              │
         │   234 │   fun.__doc__ = func.__doc__                                                                                │
         │                                                                                                                     │
         │ ╭──────────────────────────────────── locals ────────────────────────────────────╮                                  │
         │ │     args = (<module.device.method.utils.Device object at 0x000002647C8B8708>,) │                                  │
         │ │   caller = <function retry.<locals>.retry_decorator at 0x000002647DFEF168>     │                                  │
         │ │   extras = ()                                                                  │                                  │
         │ │     func = <function _AppMixIn.app_current at 0x000002647DFEF1F8>              │                                  │
         │ │       kw = {}                                                                  │                                  │
         │ │ kwsyntax = False                                                               │                                  │
         │ │      sig = <Signature (self)>                                                  │                                  │
         │ ╰────────────────────────────────────────────────────────────────────────────────╯                                  │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\retry\api.py:74 in       │
         │ retry_decorator                                                                                                     │
         │                                                                                                                     │
         │    72 │   │   kwargs = fkwargs if fkwargs else dict()                                                               │
         │    73 │   │   return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay,                        │
         │       max_delay, backoff, jitter,                                                                                   │
         │ ❱  74 │   │   │   │   │   │   │   │   logger)                                                                       │
         │    75 │                                                                                                             │
         │    76 │   return retry_decorator                                                                                    │
         │                                                                                                                     │
         │ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
         │ │       args = (<module.device.method.utils.Device object at 0x000002647C8B8708>,)                                │ │
         │ │    backoff = 1                                                                                                  │ │
         │ │      delay = 0.3                                                                                                │ │
         │ │ exceptions = <class 'OSError'>                                                                                  │ │
         │ │          f = <function _AppMixIn.app_current at 0x000002647DFEF1F8>                                             │ │
         │ │      fargs = (<module.device.method.utils.Device object at 0x000002647C8B8708>,)                                │ │
         │ │    fkwargs = {}                                                                                                 │ │
         │ │     jitter = 0                                                                                                  │ │
         │ │     kwargs = {}                                                                                                 │ │
         │ │     logger = <module 'logging' from                                                                             │ │
         │ │              'C:\\Users\\Isaac\\Documents\\AlasApp_0.4.3_fullcn\\AzurLaneAutoScript\\toolkit\\lib\\logging\\__… │ │
         │ │  max_delay = None                                                                                               │ │
         │ │      tries = 3                                                                                                  │ │
         │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\retry\api.py:33 in       │
         │ __retry_internal                                                                                                    │
         │                                                                                                                     │
         │    31 │   while _tries:                                                                                             │
         │    32 │   │   try:                                                                                                  │
         │ ❱  33 │   │   │   return f()                                                                                        │
         │    34 │   │   except exceptions as e:                                                                               │
         │    35 │   │   │   _tries -= 1                                                                                       │
         │                                                                                                                     │
         │ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
         │ │     _delay = 0.3                                                                                                │ │
         │ │     _tries = 0                                                                                                  │ │
         │ │    backoff = 1                                                                                                  │ │
         │ │      delay = 0.3                                                                                                │ │
         │ │ exceptions = <class 'OSError'>                                                                                  │ │
         │ │          f = functools.partial(<function _AppMixIn.app_current at 0x000002647DFEF1F8>,                          │ │
         │ │              <module.device.method.utils.Device object at 0x000002647C8B8708>)                                  │ │
         │ │     jitter = 0                                                                                                  │ │
         │ │     logger = <module 'logging' from                                                                             │ │
         │ │              'C:\\Users\\Isaac\\Documents\\AlasApp_0.4.3_fullcn\\AzurLaneAutoScript\\toolkit\\lib\\logging\\__… │ │
         │ │  max_delay = None                                                                                               │ │
         │ │      tries = 3                                                                                                  │ │
         │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
         │                                                                                                                     │
         │ C:\Users\Isaac\Documents\AlasApp_0.4.3_fullcn\AzurLaneAutoScript\toolkit\lib\site-packages\uiautomator2\__init__.py │
         │ :1373 in app_current                                                                                                │
         │                                                                                                                     │
         │   1371 │   │   if ret:  # get last result                                                                           │
         │   1372 │   │   │   return ret                                                                                       │
         │ ❱ 1373 │   │   raise OSError("Couldn't get focused app")                                                            │
         │   1374 │                                                                                                            │
         │   1375 │   def app_install(self, data):                                                                             │
         │                                                                                                                     │
         │ ╭──────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────╮ │
         │ │           _ = 0                                                                                                 │ │
         │ │ _activityRE = re.compile('ACTIVITY (?P<package>[^\\s]+)/(?P<activity>[^/\\s]+) \\w+ pid=(?P<pid>\\d+)')         │ │
         │ │  _focusedRE = re.compile('mCurrentFocus=Window{.*?\\s+(?P<package>[^\\s]+)/(?P<activity>[^\\s]+)\\}')           │ │
         │ │   _recordRE = re.compile('mResumedActivity:                                                                     │ │
         │ │               ActivityRecord\\{.*?\\s+(?P<package>[^\\s]+)/(?P<activity>[^\\s]+)\\s.*?\\}')                     │ │
         │ │           m = None                                                                                              │ │
         │ │          ms = <callable_iterator object at 0x000002647E1C3D08>                                                  │ │
         │ │      output = 'TASK com.YoStarJP.AzurLane id=4\n  ACTIVITY com.YoStarJP.AzurLane/com.manjuu.azur'+53            │ │
         │ │     package = None                                                                                              │ │
         │ │         ret = None                                                                                              │ │
         │ │        self = <module.device.method.utils.Device object at 0x000002647C8B8708>                                  │ │
         │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
         ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
OSError: Couldn't get focused app                                                                                      
CRITICAL 09:08:31.250 │ Retry app_current_uiautomator2() failed                                                                 
CRITICAL 09:08:31.251 │ Request human takeover                                                                                  
INFO     09:08:31.252 │ No provider specified, skip sending

截图

No response

还有别的吗?

No response

LostMyMind commented 1 year ago

Wait too long 指的应该是等待太久了,也就是游戏启动的时间太长了,alas认为卡死了就报错了,你电脑是机械硬盘吗?