[GH-ISSUE #94] Need to scroll now #529

Closed
opened 2026-03-13 21:50:11 +03:00 by kerem · 6 comments
Owner

Originally created by @Orezhon on GitHub (Aug 26, 2020).
Original GitHub issue: https://github.com/alexal1/Insomniac/issues/94

The script always crashes when it displays: "Need to scroll now"

[08/26 21:09:43] Next item not found: probably reached end of the screen.
[08/26 21:09:43] Need to scroll now
[08/26 21:09:55] Traceback (most recent call last):
File "insomniac.py", line 379, in wrapper
func(*args, **kwargs)
File "insomniac.py", line 191, in job
on_interaction)
File "/home/pi/Insomniac/src/action_handle_blogger.py", line 39, in handle_blogger
_iterate_over_followers(device, interaction, is_follow_limit_reached, storage, on_interaction, is_myself)
File "/home/pi/Insomniac/src/action_handle_blogger.py", line 159, in _iterate_over_followers
list_view.scroll.toEnd(max_swipes=1)
File "/home/pi/.local/lib/python3.7/site-packages/uiautomator2/_selector.py", line 575, in call
max_swipes, steps)
File "/home/pi/.local/lib/python3.7/site-packages/uiautomator2/init.py", line 435, in call
http_timeout)
File "/home/pi/.local/lib/python3.7/site-packages/uiautomator2/init.py", line 441, in _jsonrpc_retry_call
return self._jsonrpc_call(*args, **kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/uiautomator2/init.py", line 513, 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

Originally created by @Orezhon on GitHub (Aug 26, 2020). Original GitHub issue: https://github.com/alexal1/Insomniac/issues/94 The script always crashes when it displays: "Need to scroll now" [08/26 21:09:43] Next item not found: probably reached end of the screen. [08/26 21:09:43] Need to scroll now [08/26 21:09:55] Traceback (most recent call last): File "insomniac.py", line 379, in wrapper func(*args, **kwargs) File "insomniac.py", line 191, in job on_interaction) File "/home/pi/Insomniac/src/action_handle_blogger.py", line 39, in handle_blogger _iterate_over_followers(device, interaction, is_follow_limit_reached, storage, on_interaction, is_myself) File "/home/pi/Insomniac/src/action_handle_blogger.py", line 159, in _iterate_over_followers list_view.scroll.toEnd(max_swipes=1) File "/home/pi/.local/lib/python3.7/site-packages/uiautomator2/_selector.py", line 575, in __call__ max_swipes, steps) File "/home/pi/.local/lib/python3.7/site-packages/uiautomator2/__init__.py", line 435, in __call__ http_timeout) File "/home/pi/.local/lib/python3.7/site-packages/uiautomator2/__init__.py", line 441, in _jsonrpc_retry_call return self._jsonrpc_call(*args, **kwargs) File "/home/pi/.local/lib/python3.7/site-packages/uiautomator2/__init__.py", line 513, 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
kerem closed this issue 2026-03-13 21:50:17 +03:00
Author
Owner

@Orezhon commented on GitHub (Aug 26, 2020):

Log in attached
log.txt

<!-- gh-comment-id:681077781 --> @Orezhon commented on GitHub (Aug 26, 2020): Log in attached [log.txt](https://github.com/alexal1/Insomniac/files/5132425/log.txt)
Author
Owner

@alexal1 commented on GitHub (Aug 26, 2020):

The script always crashes when it displays: "Need to scroll now"

As I see by logs it crashes only after second time it writes this. Any idea what's the difference?

<!-- gh-comment-id:681079120 --> @alexal1 commented on GitHub (Aug 26, 2020): > The script always crashes when it displays: "Need to scroll now" As I see by logs it crashes only after second time it writes this. Any idea what's the difference?
Author
Owner

@alexal1 commented on GitHub (Aug 26, 2020):

If this didn't happen before, then maybe there are some problems with device connection? As I see in logs, there's "HTTPConnectionPool(host='localhost', port=42723): Read timed out. (read timeout=10)". Have you already tried these advices https://www.patreon.com/posts/problems-with-to-38702683?

<!-- gh-comment-id:681080869 --> @alexal1 commented on GitHub (Aug 26, 2020): If this didn't happen before, then maybe there are some problems with device connection? As I see in logs, there's "HTTPConnectionPool(host='localhost', port=42723): Read timed out. (read timeout=10)". Have you already tried these advices https://www.patreon.com/posts/problems-with-to-38702683?
Author
Owner

@Orezhon commented on GitHub (Aug 26, 2020):

If this didn't happen before, then maybe there are some problems with device connection? As I see in logs, there's "HTTPConnectionPool(host='localhost', port=42723): Read timed out. (read timeout=10)". Have you already tried these advices https://www.patreon.com/posts/problems-with-to-38702683?

I tested on Raspberry and Windows, with different USB ports, and with different cables. The result is always the same, the first or second time of "need to scroll" crashes (always).

The script worked fine for me for months before the latest version.

<!-- gh-comment-id:681100360 --> @Orezhon commented on GitHub (Aug 26, 2020): > If this didn't happen before, then maybe there are some problems with device connection? As I see in logs, there's "HTTPConnectionPool(host='localhost', port=42723): Read timed out. (read timeout=10)". Have you already tried these advices https://www.patreon.com/posts/problems-with-to-38702683? I tested on Raspberry and Windows, with different USB ports, and with different cables. The result is always the same, the first or second time of "need to scroll" crashes (always). The script worked fine for me for months before the latest version.
Author
Owner

@alexal1 commented on GitHub (Aug 27, 2020):

Ok, got it.
Please try on this branch #95.
If we don't find solution, I will simply add possibility to the script to work on uiautomator1 as before.

<!-- gh-comment-id:681761618 --> @alexal1 commented on GitHub (Aug 27, 2020): Ok, got it. Please try on this branch #95. If we don't find solution, I will simply add possibility to the script to work on uiautomator1 as before.
Author
Owner

@alexal1 commented on GitHub (Sep 6, 2020):

Please try with the --old flag to run it on the old version of uiautomator.

<!-- gh-comment-id:687873836 --> @alexal1 commented on GitHub (Sep 6, 2020): Please try with the `--old` flag to run it on the old version of `uiautomator`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Insomniac#529
No description provided.