PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

Kepp getting NotLoggedInException

Open talmachani opened this issue 10 years ago • 22 comments

Expected Behavior

log in as 24 hours ago

Actual Behavior

Not logging in

[16:46:31] Not logged in! Traceback (most recent call last): File "pokecli.py", line 436, in main() File "pokecli.py", line 81, in main report_summary(bot) File "pokecli.py", line 89, in report_summary metrics.capture_stats() File "C:\Users\xxx\PycharmProjects\Projects\PokemonGo-Bot\pokemongo_bot\metrics.py", line 75, in capture_stats response_dict = self.bot.api.call() File "C:\Users\xxx\PycharmProjects\Projects\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 58, in call if not self._can_call(): File "C:\Users\xxx\PycharmProjects\Projects\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 29, in _can_call raise NotLoggedInException() pgoapi.exceptions.NotLoggedInException

Steps to Reproduce

try to log in

Other Information

OS: Win 10 Git Commit: latest from dev

talmachani avatar Aug 01 '16 13:08 talmachani

Enable debug in your config and rerun the bot. You'll get more information then :)

jbleyaert avatar Aug 01 '16 13:08 jbleyaert

Not much, just this:

[17:02:18] PokemonGO Bot v1.0 [17:02:18] Configuration initialized [17:02:18] [x] Coordinates found in passed in location, not geocoding. 2016-08-01 17:02:18,867 [pgoapi.pgoapi] [DEBUG] Set Position - Lat: 51.4996672 Long: -0.1257679 Alt: 0.0 [17:02:18] [17:02:18] Location Found: 51.4996672,-0.1257679 [17:02:18] GeoPosition: (51.4996672, -0.1257679, 0) [17:02:18] [17:02:18] [x] Parsing cached location... 2016-08-01 17:02:18,868 [pgoapi.pgoapi] [DEBUG] Set Position - Lat: 51.4977210583 Long: -0.128018405063 Alt: 0.0 [17:02:18] [17:02:18] [x] Last location flag used. Overriding passed in location [17:02:18] [x] Last in-game location was set as: (51.49772105826862, -0.12801840506293838, 0) [17:02:18] [17:02:18] Attempting login to Pokemon Go. 2016-08-01 17:02:18,868 [pgoapi.pgoapi] [DEBUG] Set Position - Lat: 51.4977210583 Long: -0.128018405063 Alt: 0 2016-08-01 17:02:18,868 [pgoapi.pgoapi] [DEBUG] Auth provider: google 2016-08-01 17:02:18,868 [pgoapi.auth] [ INFO] Google login for: [email protected] 2016-08-01 17:02:18,878 [requests.packages.urllib3.connectionpool] [ INFO] Starting new HTTPS connection (1): android.clients.google.com 2016-08-01 17:02:20,071 [pgoapi.pgoapi] [ INFO] Create new request... 2016-08-01 17:02:20,072 [pgoapi.pgoapi] [ INFO] Adding 'GET_INVENTORY' to RPC request 2016-08-01 17:02:20,072 [pgoapi.pgoapi] [ INFO] Adding 'GET_PLAYER' to RPC request

talmachani avatar Aug 01 '16 14:08 talmachani

If you use 2 factor authentication in your google account you will need to create an app-specific password

xorinzor avatar Aug 01 '16 14:08 xorinzor

I Dont have 2 factor authentication . BTW I can login threw the app

talmachani avatar Aug 01 '16 14:08 talmachani

@mushi8 logging in through the app doesn't require an app-specific password (on android devices at least) because the phone already has an access-token for that account which it uses, the bot does however. So I was just asking to make sure.

Does the console output more information after Adding 'GET_PLAYER' to RPC request?

xorinzor avatar Aug 01 '16 14:08 xorinzor

nope.. thats ill i got. the weird thing is that it worked 2 hours ago... I pulled from latest dev it ran for a few minutes then i got server error retrying... now it wont start at all,

how can I do a 'fresh install' e.g delete all the pip install files?

talmachani avatar Aug 01 '16 15:08 talmachani

if it helps on master i get

Traceback (most recent call last): File "pokecli.py", line 220, in main() File "pokecli.py", line 206, in main bot.start() File "C:\Users\Tal\PycharmProjects\Projects\PokemonGo-Bot\pokemongo_bot__init__.py", line 31, in start self.setup_api() File "C:\Users\Tal\PycharmProjects\Projects\PokemonGo-Bot\pokemongo_bot__init_.py", line 136, in setup_api str(self.config.password)): File "c:\users\tal\pycharmprojects\projects\pokemongo-bot\src\pgoapi\pgoapi\pgoapi.py", line 145, in login if not self.auth_provider.login(username, password): File "c:\users\tal\pycharmprojects\projects\pokemongo-bot\src\pgoapi\pgoapi\auth_google.py", line 47, in login login = perform_master_login(username, password, self.GOOGLE_LOGIN_ANDROID_ID) File "C:\Python27\lib\site-packages\gpsoauth__init.py", line 66, in perform_master_login return perform_auth_request(data) File "C:\Python27\lib\site-packages\gpsoauth__init_.py", line 22, in _perform_auth_request headers={'User-Agent': useragent}) File "C:\Python27\lib\site-packages\requests\api.py", line 111, in post return request('post', url, data=data, json=json, *_kwargs) File "C:\Python27\lib\site-packages\requests\api.py", line 57, in request return session.request(method=method, url=url, *_kwargs) File "C:\Python27\lib\site-packages\requests\sessions.py", line 475, in request resp = self.send(prep, *_send_kwargs) File "C:\Python27\lib\site-packages\requests\sessions.py", line 585, in send r = adapter.send(request, *_kwargs) File "C:\Python27\lib\site-packages\requests\adapters.py", line 477, in send raise SSLError(e, request=request) requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

talmachani avatar Aug 01 '16 19:08 talmachani

oh that's weird.. for some reason your computer doesn't like the SSL certificate :/

Is the time set correctly on your computer?

What happens if you visit https://pgorelease.nianticlabs.com/plfe/ in your browser?

xorinzor avatar Aug 01 '16 19:08 xorinzor

i get "Dude, this is the Player Frontend."

and the time here is 10:12 PM

talmachani avatar Aug 01 '16 19:08 talmachani

@mushi8 okay, that's good. at least your browser / computer accepts the SSL certificate then.

If your time is set correctly too I'd think there's something within python causing the SSL issue, but I have zero knowledge of python so I cant help you with that I'm afraid

xorinzor avatar Aug 01 '16 19:08 xorinzor

crap :(

talmachani avatar Aug 01 '16 19:08 talmachani

could this be related? https://eaton-works.com/2016/07/31/reverse-engineering-and-removing-pokemon-gos-certificate-pinning/

talmachani avatar Aug 01 '16 19:08 talmachani

@mushi8 unlikely, that's about a man-in-the-middle (ie: eavesdropping to (for example) see what authentication information you're sending). the ssl certificate is preventing that.

Although, if there would be someone attacking you, that could cause the SSL validation error. but, assuming you're in your own home, that seems unlikely (especially if it still works on your phone).

edit I'm actually 99.999999% sure that's not the case, because else your browser would have shown an SSL error too

xorinzor avatar Aug 01 '16 19:08 xorinzor

Define attacking me?

On Mon, Aug 1, 2016, 22:23 Jorin Vermeulen [email protected] wrote:

@mushi8 https://github.com/mushi8 no, that's about a man-in-the-middle (ie: eavesdropping to (for example) see what authentication information you're sending). the ssl certificate is preventing that.

Although, if there would be someone attacking you, that could cause the SSL validation error. but, assuming you're in your own home, that seems unlikely (especially if it still works on your phone).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PokemonGoF/PokemonGo-Bot/issues/2231#issuecomment-236680468, or mute the thread https://github.com/notifications/unsubscribe-auth/AMMXODXyWZ4rUljWAegaAWzBKmEUUbumks5qbkfMgaJpZM4JZmmN .

This email and any files transmitted with it contain information from Idomoo which may be privileged and confidential and intended solely for the use of the addressee. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is strictly prohibited; please notify us immediately by _an _email reply and delete it from your system. Idomoo accepts no liability for any personal views or opinions expressed in this email. Email transmission cannot be guaranteed to be secure or error-free. Idomoo therefore is not liable for any errors or omissions in the contents of this message, which arise as a result of email transmission.

talmachani avatar Aug 01 '16 19:08 talmachani

@mushi8 a hacker. don't worry, that's not whats happening here.

Just wait for someone with knowledge about Python to reply to your issue.

xorinzor avatar Aug 01 '16 19:08 xorinzor

+1, I have the same issue. I'm using the desktop version (npm).

zetasq avatar Aug 02 '16 09:08 zetasq

+1, Running on Debian, it happened 3 consecutive times on two different computers. Here is the scenario for me : It works well for about an hour then I get the message posted by OP. I just activated Internet Time Sync (which was off by a minute on both machine) as suggested by @xorinzor I'll be back with results this afternoon. Thank you.

[Edit] Same as before 1 Hour and 4 minutes and then :+1:

Traceback (most recent call last): File "./pokecli.py", line 220, in main() File "./pokecli.py", line 211, in main bot.take_step() File "/home/tv/PokemonGo-Bot/pokemongo_bot/init.py", line 36, in take_step self.stepper.take_step() File "/home/tv/PokemonGo-Bot/pokemongo_bot/stepper.py", line 53, in take_step self._walk_to(self.config.walk, *position) File "/home/tv/PokemonGo-Bot/pokemongo_bot/stepper.py", line 88, in _walk_to alt, False) File "/home/tv/PokemonGo-Bot/pokemongo_bot/stepper.py", line 139, in _work_at_position self.bot.work_on_cell(cell, position, pokemon_only) File "/home/tv/PokemonGo-Bot/pokemongo_bot/init.py", line 76, in work_on_cell if self.catch_pokemon(pokemon) == PokemonCatchWorker.NO_POKEBALLS: File "/home/tv/PokemonGo-Bot/pokemongo_bot/init.py", line 190, in catch_pokemon return_value = worker.work() File "/home/tv/PokemonGo-Bot/pokemongo_bot/cell_workers/pokemon_catch_worker.py", line 30, in work response_dict = self.api.call() File "/home/tv/PokemonGo-Bot/src/pgoapi/pgoapi/pgoapi.py", line 81, in call response = request.request(api_endpoint, self._req_method_list, player_position) File "/home/tv/PokemonGo-Bot/src/pgoapi/pgoapi/rpc_api.py", line 100, in request raise NotLoggedInException() pgoapi.exceptions.NotLoggedInException

Then I can just restart it without any worries.

krotin avatar Aug 02 '16 11:08 krotin

Found a sulution upgrade python version to 2.7.11+ and it work for me :)

talmachani avatar Aug 02 '16 17:08 talmachani

I've the same issue. All my packages are up to date and I can't login:

blueslime@nsxxxxxxxx:~/Pokemon$ ./run.sh [19:44:17] PokemonGO Bot v1.0 [19:44:17] Configuration initialized 2016-08-02 19:44:18,440 [pgoapi.pgoapi] [ INFO] Create new request... 2016-08-02 19:44:18,440 [pgoapi.pgoapi] [ INFO] Adding 'GET_INVENTORY' to RPC request 2016-08-02 19:44:18,440 [pgoapi.pgoapi] [ INFO] Adding 'GET_PLAYER' to RPC request [19:44:18] Not logged in! Traceback (most recent call last): File "pokecli.py", line 442, in main() File "pokecli.py", line 85, in main report_summary(bot) File "pokecli.py", line 93, in report_summary metrics.capture_stats() File "/home/blueslime/Pokemon/pokemongo_bot/metrics.py", line 75, in capture_stats response_dict = self.bot.api.call() File "/home/blueslime/Pokemon/pokemongo_bot/api_wrapper.py", line 57, in call if not self._can_call(): File "/home/blueslime/Pokemon/pokemongo_bot/api_wrapper.py", line 29, in _can_call raise NotLoggedInException() pgoapi.exceptions.NotLoggedInException

My config.json is correct.

System:

blueslime@nsxxxxxxxx:~/Pokemon$ python2 --version Python 2.7.9

blueslime@nsxxxxxxxx:~/Pokemon$ cat /proc/version Linux version 3.14.32-xxxx-grs-ipv6-64 ([email protected]) (gcc version 4.7.2 (Debian 4.7.2-5 (Jessie)) ) #7 SMP Wed Jan 27 18:05:09 CET 2016

Hope you'll help me to fix this :(

Edit: I've updated Python and nothing changed :/

blueslime@nsxxxxxxxx:~/Pokemon$ python2 --version Python 2.7.12

Edit: This is not a SSL issue because I can download the correct page at https://pgorelease.nianticlabs.com/plfe/:

`blueslime@nsxxxxxxxx:~/Pokemon$ cat index.html

Holoholo Player Frontend Dude, this is the Player Frontend. `

jeremylvln avatar Aug 02 '16 17:08 jeremylvln

Don't work for me I'm on Python 2.7.12

julien-blanchon avatar Aug 02 '16 20:08 julien-blanchon