Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error - module 'uiautomator2' has no attribute 'JSONRPCError' #444

Open
codeclinic opened this issue Sep 20, 2022 · 2 comments
Open

Error - module 'uiautomator2' has no attribute 'JSONRPCError' #444

codeclinic opened this issue Sep 20, 2022 · 2 comments

Comments

@codeclinic
Copy link

codeclinic commented Sep 20, 2022

I keep getting the following error. It happens almost every session (possibly all sessions).

Here is the most recent crash log:
Crash-2022-09-20-17-10-30.zip

[09/20 17:10:30] Error - module 'uiautomator2' has no attribute 'JSONRPCError'
Traceback (most recent call last):
File "C:\Users\phill.pyenv\pyenv-win\versions\3.10.7\lib\site-packages\insomniac\device_facade.py", line 537, in scroll
self.viewV2.scroll.toEnd(max_swipes=1)
File "C:\Users\phill.pyenv\pyenv-win\versions\3.10.7\lib\site-packages\uiautomator2\session.py", line 1196, in call
return jsonrpc.scrollToEnd(selector, self.vertical,
File "C:\Users\phill.pyenv\pyenv-win\versions\3.10.7\lib\site-packages\uiautomator2_init_.py", line 546, in call
return self.server.jsonrpc_retry_call(self.method, params,
File "C:\Users\phill.pyenv\pyenv-win\versions\3.10.7\lib\site-packages\uiautomator2_init_.py", line 553, in jsonrpc_retry_call
return self.jsonrpc_call(*args, **kwargs)
File "C:\Users\phill.pyenv\pyenv-win\versions\3.10.7\lib\site-packages\uiautomator2_init_.py", line 645, in jsonrpc_call
raise err
uiautomator2.exceptions.UiObjectNotFoundError: -32001 Jsonrpc error: <android.support.test.uiautomator.UiObjectNotFoundException> data: UiSelector[CLASS=android.widget.ListView, RESOURCE_ID=android:id/list], method: scrollToEnd

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "insomniac/extra_features/session.py", line 277, in run
File "C:\Users\phill.pyenv\pyenv-win\versions\3.10.7\lib\site-packages\insomniac\action_runners\interact_init_.py", line 203, in run
job()
File "C:\Users\phill.pyenv\pyenv-win\versions\3.10.7\lib\site-packages\insomniac\safely_runner.py", line 24, in wrapper
return func(*args, **kwargs)
File "C:\Users\phill.pyenv\pyenv-win\versions\3.10.7\lib\site-packages\insomniac\action_runners\interact_init_.py", line 151, in job
handle_blogger(device_wrapper.get(),
File "C:\Users\phill.pyenv\pyenv-win\versions\3.10.7\lib\site-packages\insomniac\action_runners\interact\action_handle_blogger.py", line 234, in handle_blogger
followers_following_list_view.iterate_over_followers(is_myself, interact_with_follower, pre_conditions)
File "C:\Users\phill.pyenv\pyenv-win\versions\3.10.7\lib\site-packages\insomniac\views.py", line 1502, in iterate_over_followers
list_view.scroll(DeviceFacade.Direction.BOTTOM)
File "C:\Users\phill.pyenv\pyenv-win\versions\3.10.7\lib\site-packages\insomniac\device_facade.py", line 538, in scroll
except uiautomator2.JSONRPCError as e:
AttributeError: module 'uiautomator2' has no attribute 'JSONRPCError'

@evanpoliquin
Copy link

I'm having the same issue on Linux Mint. Installed everything correctly and have no crashes using the same interaction.json file on Windows. Any help or explanation would be super appreciated! @alexal1
Crash-2022-10-03-13-22-59.zip

@giobbepelle
Copy link

Error - module 'uiautomator2' has no attribute 'JSONRPCError'
Traceback (most recent call last):
File "/home/giobbe/.local/lib/python3.10/site-packages/insomniac/device_facade.py", line 537, in scroll
self.viewV2.scroll.toEnd(max_swipes=1)
File "/home/giobbe/.local/lib/python3.10/site-packages/uiautomator2/session.py", line 1196, in call
return jsonrpc.scrollToEnd(selector, self.vertical,
File "/home/giobbe/.local/lib/python3.10/site-packages/uiautomator2/init.py", line 546, in call
return self.server.jsonrpc_retry_call(self.method, params,
File "/home/giobbe/.local/lib/python3.10/site-packages/uiautomator2/init.py", line 553, in jsonrpc_retry_call
return self.jsonrpc_call(*args, **kwargs)
File "/home/giobbe/.local/lib/python3.10/site-packages/uiautomator2/init.py", line 645, in jsonrpc_call
raise err
uiautomator2.exceptions.UiObjectNotFoundError: -32001 Jsonrpc error: <android.support.test.uiautomator.UiObjectNotFoundException> data: UiSelector[CLASS=android.widget.ListView, RESOURCE_ID=android:id/list], method: scrollToEnd

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/giobbe/.local/lib/python3.10/site-packages/insomniac/session.py", line 361, in run
action_runner.run(device_wrapper,
File "/home/giobbe/.local/lib/python3.10/site-packages/insomniac/action_runners/interact/init.py", line 203, in run
job()
File "/home/giobbe/.local/lib/python3.10/site-packages/insomniac/safely_runner.py", line 24, in wrapper
return func(*args, **kwargs)
File "/home/giobbe/.local/lib/python3.10/site-packages/insomniac/action_runners/interact/init.py", line 151, in job
handle_blogger(device_wrapper.get(),
File "/home/giobbe/.local/lib/python3.10/site-packages/insomniac/action_runners/interact/action_handle_blogger.py", line 234, in handle_blogger
followers_following_list_view.iterate_over_followers(is_myself, interact_with_follower, pre_conditions)
File "/home/giobbe/.local/lib/python3.10/site-packages/insomniac/views.py", line 1502, in iterate_over_followers
list_view.scroll(DeviceFacade.Direction.BOTTOM)
File "/home/giobbe/.local/lib/python3.10/site-packages/insomniac/device_facade.py", line 538, in scroll
except uiautomator2.JSONRPCError as e:
AttributeError: module 'uiautomator2' has no attribute 'JSONRPCError'

I have a similar problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants