[GH-ISSUE #80] Failed to get username #521

Closed
opened 2026-03-13 21:46:48 +03:00 by kerem · 9 comments
Owner

Originally created by @jonap339 on GitHub (Aug 8, 2020).
Original GitHub issue: https://github.com/alexal1/Insomniac/issues/80

Anotación 2020-08-07 214406

Hi good day. I believe the post since we are having this problem and it is a real headache. This happens randomly, sometimes it appears and sometimes it doesn't. It is corrected by restarting the script manually. The problem is that when automating it, when it throws this error, it is not recovered and therefore the session is dead. Any information you need, I am at your disposal!
Regards

Originally created by @jonap339 on GitHub (Aug 8, 2020). Original GitHub issue: https://github.com/alexal1/Insomniac/issues/80 ![Anotación 2020-08-07 214406](https://user-images.githubusercontent.com/50110374/89710525-5421b280-d95a-11ea-97bd-f7f3c9af4095.png) Hi good day. I believe the post since we are having this problem and it is a real headache. This happens randomly, sometimes it appears and sometimes it doesn't. It is corrected by restarting the script manually. The problem is that when automating it, when it throws this error, it is not recovered and therefore the session is dead. Any information you need, I am at your disposal! Regards
kerem 2026-03-13 21:46:48 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

@jonap339 well I can do a fix to prevent the crash when username cannot be parsed. But without a username --unfollow-non-followers won't work properly and session data won't be saved too. Anyway it's better than the crash I suppose.

But do you have any idea why it cannot be parsed sometimes? That's strange.

<!-- gh-comment-id:670927892 --> @alexal1 commented on GitHub (Aug 8, 2020): @jonap339 well I can do a fix to prevent the crash when username cannot be parsed. But without a username `--unfollow-non-followers` won't work properly and session data won't be saved too. Anyway it's better than the crash I suppose. But do you have any idea why it cannot be parsed sometimes? That's strange.
Author
Owner

@jonap339 commented on GitHub (Aug 9, 2020):

I don't know why it happens, because it cannot retrieve the username, what occurs to me is that the script can be restarted, since at this point it just cuts and does not start again.
Regarding what you do, retrieve the username to do some validation?

<!-- gh-comment-id:671056991 --> @jonap339 commented on GitHub (Aug 9, 2020): I don't know why it happens, because it cannot retrieve the username, what occurs to me is that the script can be restarted, since at this point it just cuts and does not start again. Regarding what you do, retrieve the username to do some validation?
Author
Owner

@diegoarizadev commented on GitHub (Aug 14, 2020):

Hi @alexal1 and @jonap339.

@alexal1, the bug that is reporting @jonap339 is showing up continuously and when you do the press profile action the bot is frozen.

It's already getting annoying those errors and I've noticed that by canceling the execution with the ctrl+c command it seems to be doing something of persistence that it can't do.

<!-- gh-comment-id:674290622 --> @diegoarizadev commented on GitHub (Aug 14, 2020): Hi @alexal1 and @jonap339. @alexal1, the bug that is reporting @jonap339 is showing up continuously and when you do the press profile action the bot is frozen. It's already getting annoying those errors and I've noticed that by canceling the execution with the ctrl+c command it seems to be doing something of persistence that it can't do.
Author
Owner

@diegoarizadev commented on GitHub (Aug 14, 2020):

error1
error2

<!-- gh-comment-id:674294666 --> @diegoarizadev commented on GitHub (Aug 14, 2020): ![error1](https://user-images.githubusercontent.com/5458354/90296780-2654d600-de52-11ea-8c66-d23b6f894fe5.PNG) ![error2](https://user-images.githubusercontent.com/5458354/90296784-294fc680-de52-11ea-9609-1512f0263f75.PNG)
Author
Owner

@diegoarizadev commented on GitHub (Aug 14, 2020):

Log Error

-------- START: 2020-08-14 17:46:58.676818 --------
[08/14 17:46:58] Open Instagram app
[08/14 17:46:59] Sleep for 2 seconds
[08/14 17:47:01] Press profile
Traceback (most recent call last):
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 426, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 421, in _make_request
httplib_response = conn.getresponse()
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 1332, in getresponse
response.begin()
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 303, in begin
version, status, reason = self._read_status()
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 264, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\socket.py", line 669, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "insomniac.py", line 373, in
main()
File "insomniac.py", line 89, in main
session_state.my_following_count = get_my_profile_info(device)
File "C:\Users\Alejo\bot\Insomniac\src\action_get_my_profile_info.py", line 9, in get_my_profile_info
update_interaction_rect(device)
File "C:\Users\Alejo\bot\Insomniac\src\interaction_rect_checker.py", line 11, in update_interaction_rect
action_bar_bottom = action_bar.bounds['bottom']
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator_init
.py", line 934, in getattr
info = self.info
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator_init_.py", line 945, in info
return self.jsonrpc.objInfo(self.selector)
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator_init_.py", line 443, in wrapper
return JsonRPCMethod(url, method, timeout, False)(*args, **kwargs)
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator_init
.py", line 438, in wrapper
return method_obj(*args, **kwargs)
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator_init
.py", line 115, in call
res = self.pool.urlopen("POST",
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\poolmanager.py", line 336, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 724, in urlopen
retries = retries.increment(
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\util\retry.py", line 403, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\packages\six.py", line 735, in reraise
raise value
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 428, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 335, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=9010): Read timed out. (read timeout=90)

C:\Users\Alejo\bot\Insomniac>

<!-- gh-comment-id:674302727 --> @diegoarizadev commented on GitHub (Aug 14, 2020): Log Error -------- START: 2020-08-14 17:46:58.676818 -------- [08/14 17:46:58] Open Instagram app [08/14 17:46:59] Sleep for 2 seconds [08/14 17:47:01] Press profile Traceback (most recent call last): File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 426, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 1332, in getresponse response.begin() File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 303, in begin version, status, reason = self._read_status() File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 264, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\socket.py", line 669, in readinto return self._sock.recv_into(b) socket.timeout: timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "insomniac.py", line 373, in <module> main() File "insomniac.py", line 89, in main session_state.my_following_count = get_my_profile_info(device) File "C:\Users\Alejo\bot\Insomniac\src\action_get_my_profile_info.py", line 9, in get_my_profile_info update_interaction_rect(device) File "C:\Users\Alejo\bot\Insomniac\src\interaction_rect_checker.py", line 11, in update_interaction_rect _action_bar_bottom = action_bar.bounds['bottom'] File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator\__init__.py", line 934, in __getattr__ info = self.info File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator\__init__.py", line 945, in info return self.jsonrpc.objInfo(self.selector) File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator\__init__.py", line 443, in wrapper return _JsonRPCMethod(url, method, timeout, False)(*args, **kwargs) File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator\__init__.py", line 438, in wrapper return _method_obj(*args, **kwargs) File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\uiautomator\__init__.py", line 115, in __call__ res = self.pool.urlopen("POST", File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\poolmanager.py", line 336, in urlopen response = conn.urlopen(method, u.request_uri, **kw) File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 724, in urlopen retries = retries.increment( File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\util\retry.py", line 403, in increment raise six.reraise(type(error), error, _stacktrace) File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\packages\six.py", line 735, in reraise raise value File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 428, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "C:\Users\Alejo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 335, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=9010): Read timed out. (read timeout=90) C:\Users\Alejo\bot\Insomniac>
Author
Owner

@soulpawa commented on GitHub (Sep 7, 2020):

today I got also this error with Failed to get username:

Screenshot 2020-09-07 at 23 20 26

any clue?

<!-- gh-comment-id:688514117 --> @soulpawa commented on GitHub (Sep 7, 2020): today I got also this error with Failed to get username: ![Screenshot 2020-09-07 at 23 20 26](https://user-images.githubusercontent.com/6342029/92417087-c3a8de80-f160-11ea-8949-abdbf3573a40.png) any clue?
Author
Owner

@soulpawa commented on GitHub (Sep 8, 2020):

seems like is still getting an error:

Screenshot 2020-09-08 at 12 31 44

<!-- gh-comment-id:688784737 --> @soulpawa commented on GitHub (Sep 8, 2020): seems like is still getting an error: ![Screenshot 2020-09-08 at 12 31 44](https://user-images.githubusercontent.com/6342029/92466806-f4c0f780-f1d0-11ea-9c36-cdd0aac07f36.png)
Author
Owner

@soulpawa commented on GitHub (Oct 3, 2020):

I´m, still facing problems showing an error with no user found
Crash-2020-10-03-17-47-01.zip

Screenshot 2020-10-03 at 17 57 54
<!-- gh-comment-id:703132408 --> @soulpawa commented on GitHub (Oct 3, 2020): I´m, still facing problems showing an error with no user found [Crash-2020-10-03-17-47-01.zip](https://github.com/alexal1/Insomniac/files/5322009/Crash-2020-10-03-17-47-01.zip) <img width="786" alt="Screenshot 2020-10-03 at 17 57 54" src="https://user-images.githubusercontent.com/6342029/94995954-00ba9200-05a2-11eb-92cf-749884355e44.png">
Author
Owner

@Rob192 commented on GitHub (Oct 21, 2020):

Hello, This also occurs to me, I think this is due to the new version of the Instagram app where the bottom layer displays the "Reels" button for the video.

<!-- gh-comment-id:713587374 --> @Rob192 commented on GitHub (Oct 21, 2020): Hello, This also occurs to me, I think this is due to the new version of the Instagram app where the bottom layer displays the "Reels" button for the video.
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#521
No description provided.