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

Repeatedly get "Request for new Access Token failed! Logged out..." #5867

Closed
saliapin opened this issue Jan 11, 2017 · 30 comments
Closed

Repeatedly get "Request for new Access Token failed! Logged out..." #5867

saliapin opened this issue Jan 11, 2017 · 30 comments

Comments

@saliapin
Copy link

Expected Behavior

Bot starts running

Actual Behavior

Bot stops with:
[pgoapi.pgoapi] [ERROR] Request for new Access Token failed! Logged out...

Your FULL config.json (remove your username, password, gmapkey and any other private info)

using the default as in config.json.example.

Output when issue occurred

2017-01-11 13:45:19,052 [ cli] [INFO] PokemonGO Bot v1.0
2017-01-11 13:45:19,060 [ cli] [INFO] commit: 1dd0bb1
2017-01-11 13:45:19,064 [ cli] [INFO] Configuration initialized
2017-01-11 13:45:19,064 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information:
2017-01-11 13:45:19,064 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
2017-01-11 13:45:19,075 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
(29786) wsgi starting up on http://127.0.0.1:4000
[2017-01-11 13:45:19] [PokemonGoBot] [WARNING] SleepSchedule is disabled
[2017-01-11 13:45:19] [PokemonGoBot] [INFO] Setting start location.
[2017-01-11 13:45:19] [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
[2017-01-11 13:45:19] [PokemonGoBot] [INFO] Location found: 37.437555,-122.111946 (37.437555, -122.111946, 8)
[2017-01-11 13:45:19] [PokemonGoBot] [INFO] Now at (37.437555, -122.111946, 8)
[2017-01-11 13:45:19] [PokemonGoBot] [INFO] Login procedure started.
[2017-01-11 13:45:23] [pgoapi.pgoapi] [ERROR] Request for new Access Token failed! Logged out...
[2017-01-11 13:45:23] [PokemonGoBot] [INFO] Not logged in, reconnecting in 914 seconds

Steps to Reproduce

Occurs every time the bot is started, throughout the day

Other Information

OS:
Mac OS 10.12.2 (16C67)
Branch:
master
Git Commit:
1dd0bb1
Python Version:
2.7.12
Any other relevant files/configs (eg: path files)

@pogarek
Copy link
Contributor

pogarek commented Jan 11, 2017

try to run the bot without / outside virtualenv as the workaround while the main issue in under investigation

@mgp25
Copy link

mgp25 commented Jan 12, 2017

@pogarek same 😕

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

Try to reinstall the bot, this time skip commands about virtualenv. and activate .

@smirciat
Copy link

Having same issue, not sure how to install the bot without virtualenv, run.sh throws error when virtualenv is not there.

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

try manual installation from docs, then just run the bot from python directly :

python pokecli.py --config configs\myconfig.json --auth configs\my_auth.json

@smirciat
Copy link

Traceback (most recent call last):
  File "pokecli.py", line 48, in <module>
    from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException, NoPlayerPositionSetException
ImportError: No module named pgoapi.exceptions

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

ok, like libs not found. let me try to find the root cause then. checking now

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

ok. Guys, please test the workaround:

  1. clone the repository of bot
  2. edit requirements.txt , find the line about pogoapi and replace it with this line:
git+https://github.com/pogodevorg/pgoapi.git@0b13191a8043d8572647a17326b0f7b384774c63#egg=pgoapi

continue with bot installation as usual, with virtualenv. Please update this issue if it helped.

@smirciat
Copy link

Still same errors for me. You are awesome for being so responsive!

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

:)
really still the same ? So once again I have tested the latest release of bot on empty directory (Windows) :

git clone https://github.com/PokemonGoF/PokemonGo-Bot
cd PokemonGo-Bot
code requirements.txt (to change the line to the one in 2 comments above)
pip2 install --upgrade -r requirements.txt
virtualenv .
call Scripts\activate.bat
pip2 install --upgrade -r requirements.txt
python pokecli.py --config configs\my_config.json --auth configs\my_auth.json -ws 127.0.0.1:4001 -wss true

bot works.. without/before the change in requirements.txt it was failing ,as for you..

@smirciat
Copy link

Thanks, im in Ubuntu will try to set up in Windows and report back

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

Try follow these step on Linux . You can take commands from here: https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/docs/manual_installation.md#linux-and-mac

@smirciat
Copy link

OK I'll try that on Linux, I had not seen that doc before. I followed the directions to install on read.me

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

sure. just update requirements.txt before running 'pip2 install --upgrade -r requirements.txt'

@pogarek pogarek mentioned this issue Jan 12, 2017
@smirciat
Copy link

Success! Thanks @pogarek !

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

👍

@dogeatdog
Copy link

Yessss..works again here as well (Ubuntu) : this one was key for me :

pip2 install --upgrade -r requirements.txt

Using pip instead of pip2 didn't work :)

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

:-) I didn't even noticed, that linux manual installation and setup.sh says about pip and windows manual about pip2 :)
anyway - I'm glad that it worked :)

@saliapin
Copy link
Author

Great job @pogarek ! Thanks for your help!
@smirciat : Could you please summarize what you did to get the bot running for the occasional computer illiterate among us? 😄 Hopefully the procedure for Linux will work on MacOS...

@smirciat
Copy link

smirciat commented Jan 12, 2017

@saliapin I followed https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/docs/manual_installation.md#linux-and-mac that @pogarek posted above. He mentioned changing requirements.txt, but I don't think that's necessary anymore, the change appears to be merged. Interestingly, it worked for 1.5 hours and now I'm getting Hashing Exception, and more login errors. Guessing some more issues need to be worked through. Looks like its been reported as issue #5868

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

requirements.txt change is not merged yet ( #5870 )
Exceptions happens - pogoapi 0.51 with hashing is stil under development :-)
#5868 is the root cause why folks cannot login ; changing requirements.txt is a workaround for it.

@smirciat
Copy link

smirciat commented Jan 12, 2017

@pogarek thanks for the clarification!
So I'm now back to the error "Server busy or offline, reconnecting" Every time even with the change to requirements.txt. Something changing upstream somewhere.

@saliapin
Copy link
Author

Thanks to @pogarek and @smirciat !
The bot works for now. My steps:

Follow exactly this procedure:
[https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/docs/manual_installation.md#mac--linux-installation]

right before entering:
pip install -r requirements.txt
edit requirement.txt by replacing the third line (starting with git+https:// ... ) with this line:
git+https://github.com/pogodevorg/pgoapi.git@0b13191a8043d8572647a17326b0f7b384774c63#egg=pgoapi

Proceed with:
pip install -r requirements.txt
and the rest of the instructions. Hopefully it will work for you, too!

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

👍
@smirciat I have some issue like you. Then I just kill and start the bot again.

@smirciat
Copy link

smirciat commented Jan 12, 2017

@pogarek I can't get it restarted, I'm going to try reinstalling and see if that helps
UPDATE: Still can't login, not sure what changed, complete reinstall did not help
UPDATE2: After a few hours, it started working again.
UPDATE3: Now its off again. Seems like the hashing server is overwhelmed, probably has nothing to do with this repo

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

or your network connectivity.. "My" outages are short..

@smirciat
Copy link

@pogarek That is interesting. I am in Alaska, do you think that makes a difference? I have connectivity to other sites servers but the Hashing server is off more than on for me

@pogarek
Copy link
Contributor

pogarek commented Jan 12, 2017

Might be the case.. The hashing server used by pogoapi is the one: https://pokehash.buddyauth.com . Try to collect some logs with debug enable to see, if errors are due connectivity. Then you can try to contact support : https://talk.pogodev.org/t/api-hashing-support OR https://bosslandgmbh.zendesk.com/hc/en-us OR on hashing-support channel on https://discord.pogodev.org/ .
I'm in Europe, the ping to pokehash.buddyauth.com is at around 40ms for me. ..

@MerlionRock
Copy link
Contributor

@smirciat Check this for hashing server status: https://status.buddyauth.com/

@pogarek
Copy link
Contributor

pogarek commented Jan 13, 2017

It should be solved now - the change is merged to the repository.

@pogarek pogarek closed this as completed Jan 13, 2017
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

6 participants