alexal1 / Insomniac

Instagram bot for automated Instagram interaction using Android device via ADB
https://insomniac-bot.com
MIT License
693 stars 159 forks source link

Failed to get username #80

Closed jonap339 closed 4 years ago

jonap339 commented 4 years ago

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

alexal1 commented 4 years ago

@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.

jonap339 commented 4 years ago

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?

diegoarizadev commented 4 years ago

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.

diegoarizadev commented 4 years ago

error1 error2

diegoarizadev commented 4 years ago

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>

soulpawa commented 4 years ago

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

Screenshot 2020-09-07 at 23 20 26

any clue?

soulpawa commented 4 years ago

seems like is still getting an error:

Screenshot 2020-09-08 at 12 31 44

soulpawa commented 4 years ago

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
Rob192 commented 4 years ago

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.