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

Kepp getting NotLoggedInException #2231

Closed
talmachani opened this issue Aug 1, 2016 · 22 comments
Closed

Kepp getting NotLoggedInException #2231

talmachani opened this issue Aug 1, 2016 · 22 comments

Comments

@talmachani
Copy link

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

@jbleyaert
Copy link

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

@talmachani
Copy link
Author

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

@xorinzor
Copy link

xorinzor commented Aug 1, 2016

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

@talmachani
Copy link
Author

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

@xorinzor
Copy link

xorinzor commented Aug 1, 2016

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

@talmachani
Copy link
Author

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
Copy link
Author

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

@xorinzor
Copy link

xorinzor commented Aug 1, 2016

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?

@talmachani
Copy link
Author

talmachani commented Aug 1, 2016

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

and the time here is 10:12 PM

@xorinzor
Copy link

xorinzor commented Aug 1, 2016

@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

@talmachani
Copy link
Author

crap :(

@talmachani
Copy link
Author

@xorinzor
Copy link

xorinzor commented Aug 1, 2016

@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

@talmachani
Copy link
Author

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
#2231 (comment),
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.

@xorinzor
Copy link

xorinzor commented Aug 1, 2016

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

@zetasq
Copy link

zetasq commented Aug 2, 2016

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

@krotin
Copy link

krotin commented Aug 2, 2016

+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 👍

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.

@talmachani
Copy link
Author

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

@jeremylvln
Copy link

jeremylvln commented Aug 2, 2016

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

<title>Holoholo Player Frontend</title> Dude, this is the Player Frontend. `

@julien-blanchon
Copy link

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

@jeremylvln
Copy link

I changed the address in the config.json and it's works now! Very strange...

@Napator
Copy link
Contributor

Napator commented Aug 3, 2016

Hi, I have Python 2.7.12 and tried several GPS coordinates and adresses, and i still have this issue when trying to run the dev version.
The master works perfectly for me.

Thank you for your help.

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

10 participants