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

login error

Open elwinh opened this issue 10 years ago • 10 comments

Expected Behavior

Login succeeded

The Username and password are correct. It worked untill the Pokemon client (on my phone) updated today.

Actual Behavior

[08:41:18] Attempting login to Pokemon Go. 2016-07-31 08:41:18,301 [pgoapi.pgoapi] [DEBUG] Set Position - Lat: :hash: Long: :hash: Alt: 0 2016-07-31 08:41:18,301 [pgoapi.pgoapi] [DEBUG] Auth provider: google 2016-07-31 08:41:18,302 [pgoapi.auth] [ INFO] Google login for: :hash: 2016-07-31 08:41:18,311 [requests.packages.urllib3.connectionpool] [ INFO] Starting new HTTPS connection (1): android.clients.google.com 2016-07-31 08:41:18,790 [requests.packages.urllib3.connectionpool] [DEBUG] "POST /auth HTTP/1.1" 200 None 2016-07-31 08:41:18,794 [requests.packages.urllib3.connectionpool] [ INFO] Starting new HTTPS connection (1): android.clients.google.com 2016-07-31 08:41:18,932 [requests.packages.urllib3.connectionpool] [DEBUG] "POST /auth HTTP/1.1" 200 None 2016-07-31 08:41:18,934 [pgoapi.auth] [ INFO] Google Login successful. 2016-07-31 08:41:18,934 [pgoapi.auth] [DEBUG] Google Session Token: :hash: 2016-07-31 08:41:18,934 [pgoapi.pgoapi] [ INFO] Starting RPC login sequence (app simulation) 2016-07-31 08:41:18,934 [pgoapi.pgoapi] [ INFO] Create new request... 2016-07-31 08:41:18,935 [pgoapi.pgoapi] [ INFO] Adding 'GET_PLAYER' to RPC request 2016-07-31 08:41:18,935 [pgoapi.pgoapi] [ INFO] Adding 'GET_HATCHED_EGGS' to RPC request 2016-07-31 08:41:18,935 [pgoapi.pgoapi] [ INFO] Adding 'GET_INVENTORY' to RPC request 2016-07-31 08:41:18,935 [pgoapi.pgoapi] [ INFO] Adding 'CHECK_AWARDED_BADGES' to RPC request 2016-07-31 08:41:18,935 [pgoapi.pgoapi] [ INFO] Adding 'DOWNLOAD_SETTINGS' to RPC request including arguments 2016-07-31 08:41:18,935 [pgoapi.pgoapi] [DEBUG] Arguments of 'DOWNLOAD_SETTINGS': {'hash': ':hash:'} 2016-07-31 08:41:18,936 [pgoapi.pgoapi] [ INFO] Execution of RPC 2016-07-31 08:41:18,936 [pgoapi.rpc_api] [DEBUG] Generating main RPC request... 2016-07-31 08:41:18,936 [pgoapi.rpc_api] [DEBUG] Generating sub RPC requests... 2016-07-31 08:41:19,028 [pgoapi.rpc_api] [DEBUG] Subrequest class: POGOProtos.Networking.Requests.Messages_pb2.DownloadSettingsMessage 2016-07-31 08:41:19,029 [pgoapi.rpc_api] [DEBUG] Generated protobuf request: status_code: 2 request_id: :hash: requests { request_type: GET_PLAYER } requests { request_type: GET_HATCHED_EGGS } requests { request_type: GET_INVENTORY } requests { request_type: CHECK_AWARDED_BADGES } requests { request_type: DOWNLOAD_SETTINGS request_message: "\n(:hash:" } latitude: :hash: longitude: :hash: auth_info { provider: "google" token { contents: ":hash:" unknown2: 59` } } unknown12: 989

2016-07-31 08:41:19,036 [pgoapi.rpc_api] [DEBUG] Execution of RPC`2016-07-31 08:41:19,037 [requests.packages.urllib3.connectionpool] [ INFO] Starting new HTTPS connection (1): pgorelease.nianticlabs.com 2016-07-31 08:41:19,208 [requests.packages.urllib3.connectionpool] [DEBUG] "POST /plfe/rpc HTTP/1.1" 403 None 2016-07-31 08:41:19,210 [pgoapi.rpc_api] [DEBUG] Parsing main RPC response... 2016-07-31 08:41:19,210 [pgoapi.rpc_api] [WARNING] Unexpected HTTP server response - needs 200 got 403 2016-07-31 08:41:19,210 [pgoapi.rpc_api] [DEBUG] HTTP output:

<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx/1.11.1</center>
</body>
</html>

2016-07-31 08:41:19,210 [pgoapi.pgoapi] [ INFO] Cleanup of request! 2016-07-31 08:41:19,212 [pgoapi.pgoapi] [ INFO] Login failed! [08:41:19] [X] Login Error, server busy `[08:41:19] [X] Waiting 10 seconds to try again

Steps to Reproduce

Run myrun.sh

Other Information

OS: Ubuntu Server 1604 LTS Server location: Microsoft Azure Datacenter in America GPS location: Somewhere in the Netherlands. Git Commit: d41f70ab8e8aa8e99686067c1270ad29bb66e8c4 myrun.sh:

# Change these settings:
PKMNUSERNAME=""
PKMNPASSWORD=""
PKMNLOCATION=""
PKMNAPI=""
PKMNMAXSTEPS="15"
PKMNWALK="5.36"
EVOLVEALL="Weedle,Caterpie,Spearow,Zubat,Rattata,Paras"
EVOLVECPMIN="500"
RELEASEBELOWCP="400"
KEEP="100"
n=0
SLEEPMIN=$(shuf -i 300-600 -n 1)

# Do not change anything below:
until [ $n -ge 10 ]
do
   # Go to the Pokemon dir
   cd ~/pokemon-dev/PokemonGo-Bot/

   # Activate:
   source bin/activate  

   # Update to latest version:
   git pull
   sudo pip install -r requirements.txt

   # Change the config file:
   cp ~/pokemon-dev/PokemonGo-Bot/configs/config.json.example ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/YOUR_USERNAME/$PKMNUSERNAME/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/YOUR_PASSWORD/$PKMNPASSWORD/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/SOME_LOCATION/$PKMNLOCATION/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/GOOGLE_MAPS_API_KEY/$PKMNAPI/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/\"walk\": 4.16,/\"walk\": $PKMNWALK,/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/\"max_steps\": 5,/\"max_steps\": $PKMNMAXSTEPS,/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/\"evolve_all\": \"NONE\",/\"evolve_all\": \"$EVOLVEALL\",/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/\"evolve_cp_min\": 300,/\"evolve_cp_min\": $EVOLVECPMIN,/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/\"release_below_cp\": 0,/\"release_below_cp\": $RELEASEBELOWCP,/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/\"keep\" : 10 },/\"keep\" : $KEEP },/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/\"keep\" : 20 },/\"keep\" : $KEEP },/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/\"keep\" : 30 },/\"keep\" : $KEEP },/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json
   sed -i "s/\"keep\" : 100 },/\"keep\" : $KEEP },/" ~/pokemon-dev/PokemonGo-Bot/configs/config.json

   # Run the pokemon bot:
   sh ~/pokemon-dev/PokemonGo-Bot/run.sh && break

   # Sleep a few minutes and try again:
   echo "Critical error found!"
   echo "I shall pull a new version from github and try again in a few minutes"
   sleep $SLEEPMIN
done

elwinh avatar Jul 31 '16 08:07 elwinh

Getting the same:

2016-07-31 09:02:25,655 [ rpc_api] [DEBUG] Execution of RPC

2016-07-31 09:02:25,656 [connectionpool] [ INFO] Starting new HTTPS connection (1): pgorelease.nianticlabs.com

2016-07-31 09:02:25,798 [connectionpool] [DEBUG] "POST /plfe/rpc HTTP/1.1" 403 None

2016-07-31 09:02:25,800 [ rpc_api] [DEBUG] Parsing main RPC response...

2016-07-31 09:02:25,800 [ rpc_api] [WARNING] Unexpected HTTP server response - needs 200 got 403

2016-07-31 09:02:25,800 [ rpc_api] [DEBUG] HTTP output: `

403 Forbidden

403 Forbidden


nginx/1.11.1
`

MartinTerp avatar Jul 31 '16 09:07 MartinTerp

It may be because i host this script from a Microsoft Azure datacenter in America en the GPS location is in the Netherlands. In the new version they may block certain IP Addresses if the locations do not match. Need to test that on my local pc...

elwinh avatar Jul 31 '16 09:07 elwinh

@elwinh : This is probably not the case. I have ran 2 bots with docker from a server, which is hosted in NL, with NL coordinates. One phone client was updated by accident, which now causes 1 bot to not be able to login. This is with the latest dev as of 11:15 today.

So it only seems to work with the old client.

edit: I've tried it after setting debug to true, it seems to be working now....

sebastianberm avatar Jul 31 '16 09:07 sebastianberm

I also use Docker, and just tested moving from my vps in london, to a server located in my house, and i now get the correct response.

MartinTerp avatar Jul 31 '16 09:07 MartinTerp

Confirmed that the location is an issue. Running from an ip that is within the gps area fixed the problem.

Should be in the FAQ form now on.

elwinh avatar Jul 31 '16 10:07 elwinh

[10:14:13] Attempting login to Pokemon Go.
2016-07-31 10:14:13,392 [pgoapi.pgoapi] [DEBUG] Set Position - Lat: 40.7650765806 Long: -73.9787808458 Alt: 0
2016-07-31 10:14:13,393 [pgoapi.pgoapi] [DEBUG] Auth provider: ptc
2016-07-31 10:14:13,393 [pgoapi.auth] [ INFO] Login for: xxxxxxxxxx
2016-07-31 10:14:13,404 [requests.packages.urllib3.connectionpool] [ INFO] Starting new HTTPS connection (1): sso.pokemon.com
2016-07-31 10:14:14,133 [requests.packages.urllib3.connectionpool] [DEBUG] "GET /sso/login?service=https%3A%2F%2Fsso.pokemon.com%2Fsso%2Foauth2.0%2FcallbackAuthorize HTTP/1.1" 200 104
2016-07-31 10:14:14,497 [requests.packages.urllib3.connectionpool] [DEBUG] "POST /sso/login?service=https%3A%2F%2Fsso.pokemon.com%2Fsso%2Foauth2.0%2FcallbackAuthorize HTTP/1.1" 302 0
2016-07-31 10:14:14,822 [requests.packages.urllib3.connectionpool] [DEBUG] "GET /sso/oauth2.0/callbackAuthorize?ticket=ST-10442023-VvBaqQpoLn4wleGbMMMC-sso.pokemon.com HTTP/1.1" 500 2565
2016-07-31 10:14:14,995 [requests.packages.urllib3.connectionpool] [DEBUG] "POST /sso/oauth2.0/accessToken HTTP/1.1" 200 106
2016-07-31 10:14:14,996 [pgoapi.auth] [ INFO] PTC Login successful
2016-07-31 10:14:14,996 [pgoapi.auth] [DEBUG] PTC Session Token: TGT-10416957-QOGuATl1RAaK
2016-07-31 10:14:14,996 [pgoapi.pgoapi] [ INFO] Starting RPC login sequence (app simulation)
2016-07-31 10:14:14,996 [pgoapi.pgoapi] [ INFO] Create new request...
2016-07-31 10:14:14,996 [pgoapi.pgoapi] [ INFO] Adding 'GET_PLAYER' to RPC request
2016-07-31 10:14:14,997 [pgoapi.pgoapi] [ INFO] Adding 'GET_HATCHED_EGGS' to RPC request
2016-07-31 10:14:14,997 [pgoapi.pgoapi] [ INFO] Adding 'GET_INVENTORY' to RPC request
2016-07-31 10:14:14,997 [pgoapi.pgoapi] [ INFO] Adding 'CHECK_AWARDED_BADGES' to RPC request
2016-07-31 10:14:14,997 [pgoapi.pgoapi] [ INFO] Adding 'DOWNLOAD_SETTINGS' to RPC request including arguments
2016-07-31 10:14:14,997 [pgoapi.pgoapi] [DEBUG] Arguments of 'DOWNLOAD_SETTINGS': 
{'hash': '05daf51635c82611d1aac95c0b051d3ec088a930'}
2016-07-31 10:14:14,997 [pgoapi.pgoapi] [ INFO] Execution of RPC
2016-07-31 10:14:14,998 [pgoapi.rpc_api] [DEBUG] Generating main RPC request...
2016-07-31 10:14:14,998 [pgoapi.rpc_api] [DEBUG] Generating sub RPC requests...
2016-07-31 10:14:15,096 [pgoapi.rpc_api] [DEBUG] Subrequest class: POGOProtos.Networking.Requests.Messages_pb2.DownloadSettingsMessage
2016-07-31 10:14:15,097 [pgoapi.rpc_api] [DEBUG] Generated protobuf request: 
status_code: 2
request_id: 8145806132888207460
requests {
  request_type: GET_PLAYER
}
requests {
  request_type: GET_HATCHED_EGGS
}
requests {
  request_type: GET_INVENTORY
}
requests {
  request_type: CHECK_AWARDED_BADGES
}
requests {
  request_type: DOWNLOAD_SETTINGS
  request_message: "\n(05daf51635c82611d1aac95c0b051d3ec088a930"
}
latitude: 40.7650765806
longitude: -73.9787808458
auth_info {
  provider: "ptc"
  token {
    contents: "TGT-10416957-QOGuATl1RAaKpdUTMowu52wZ9PAWx2TCyrvHL9t9TQj5PNDxvn-sso.pokemon.com"
    unknown2: 59
  }
}
unknown12: 989

2016-07-31 10:14:15,102 [pgoapi.rpc_api] [DEBUG] Execution of RPC
2016-07-31 10:14:15,103 [requests.packages.urllib3.connectionpool] [ INFO] Starting new HTTPS connection (1): pgorelease.nianticlabs.com
2016-07-31 10:14:15,297 [requests.packages.urllib3.connectionpool] [DEBUG] "POST /plfe/rpc HTTP/1.1" 403 None
2016-07-31 10:14:15,299 [pgoapi.rpc_api] [DEBUG] Parsing main RPC response...
2016-07-31 10:14:15,299 [pgoapi.rpc_api] [WARNING] Unexpected HTTP server response - needs 200 got 403
2016-07-31 10:14:15,299 [pgoapi.rpc_api] [DEBUG] HTTP output: 
<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx/1.11.1</center>
</body>
</html>

2016-07-31 10:14:15,300 [pgoapi.pgoapi] [ INFO] Cleanup of request!
2016-07-31 10:14:15,301 [pgoapi.pgoapi] [ INFO] Login failed!
[10:14:15]  [X] Login Error, server busy 
[10:14:15]  [X] Waiting 10 seconds to try again 

josegrobles avatar Jul 31 '16 10:07 josegrobles

It looks like AWS, heroku, azure and friends are blocked out by Niantic, I'm following the PokemonGo-Map repo and there is a lot of people using those services not able to login with the same error, also they talk about this: http://www.businessinsider.com/pokemon-go-niantic-shut-down-pokevision-2016-7

justinbeatz avatar Jul 31 '16 10:07 justinbeatz

so We will have to go back to the RasPi

josegrobles avatar Jul 31 '16 10:07 josegrobles

I am having the same issue locally as on amazon. I can however login with the iOS app just fine.

tvb avatar Jul 31 '16 11:07 tvb

I used Digital Ocean

MartinTerp avatar Jul 31 '16 12:07 MartinTerp