Skip to content

Commit

Permalink
Addresses issue #823 in owner repo. (#870)
Browse files Browse the repository at this point in the history
Forces a reset when NPE exception happens.
  • Loading branch information
Kardelio authored Mar 16, 2023
1 parent dd537e6 commit d56e5e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions uiautomator2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ def _jsonrpc_retry_call(self, *args, **kwargs):
NullPointerExceptionError,
StaleObjectExceptionError) as e:
self.logger.warning("jsonrpc call got: %s", str(e))
self.reset_uiautomator(str(e)) # added to fix strange fatal jsonrpc NullPointerException
return self._jsonrpc_call(*args, **kwargs)

def _jsonrpc_call(self, method, params=[], http_timeout=60):
Expand Down

0 comments on commit d56e5e2

Please sign in to comment.