PokemonGoBot icon indicating copy to clipboard operation
PokemonGoBot copied to clipboard

LoginFailed after (exactly) 1,5h

Open HoneyWheat opened this issue 10 years ago • 15 comments

I noticed that the/my bot stops working after nearly excact 1,5h. After that I only get LoginFailedExeptions. Can somebody confirm this?!

  • Google login
  • Version 0.5.0alpha3

HoneyWheat avatar Jul 31 '16 08:07 HoneyWheat

yes, I experience this too. I'm using a google account, in case that helps someone, but I only have wild speculation about why.

alexpw avatar Jul 31 '16 09:07 alexpw

I use google login too. Guess this is something to check for human vs bot

HoneyWheat avatar Jul 31 '16 09:07 HoneyWheat

I just got it too, but using PTC. My error says LoginFailedException: Error in API Url

GeitV avatar Jul 31 '16 12:07 GeitV

i think its because of not renewing the token or something

e: only happening on my google login XD

TheJ0k3r avatar Jul 31 '16 13:07 TheJ0k3r

I confirmed this too with PTC login. Most probably the sso token already expired, but the bot keep trying to re-authenticated with the expired token.

(In my case, usually the PTC token expired in about 2-3h time frame)

sphinxid avatar Jul 31 '16 14:07 sphinxid

I can confirm this too however ONLY with Google. I have several PTC bots running for many hours now, no issues.

Mewks avatar Jul 31 '16 15:07 Mewks

I'm getting this error as well.

matholland618 avatar Jul 31 '16 18:07 matholland618

Can somebody come up with a script to kill and reload the bot every 1.5 hours ?

BugSyst3m avatar Jul 31 '16 18:07 BugSyst3m

i'm working on it

TheJ0k3r avatar Jul 31 '16 18:07 TheJ0k3r

With some batch files you can terminate your cmd and restart it its a crapy fix but it works

edit: I used 2 files for this

file start and to restart: START cmd /k "java -jar pogo.scraper-all-0.5.0-alpha3.jar & timeout /t 5400 & kill & bat"

And file kill START cmd /k "Taskkill /im cmd.exe"

TheJ0k3r avatar Jul 31 '16 19:07 TheJ0k3r

Running 4 precompiled alpha.4 builds, I got this after exactly 90 OR 150 minutes.... And it happened with google and PTC accounts. From my logs:

After 150 min:... "01 Aug 01:04:29: Error running loop BotLoop! com.pokegoapi.exceptions.LoginFailedException: Error in API Url at com.pokegoapi.main.RequestHandler.internalSendServerRequests(RequestHandler.java:216) at com.pokegoapi.main.RequestHandler.run(RequestHandler.java:289) at java.lang.Thread.run(Thread.java:745) 01 Aug 01:04:34: Getting map of (..., ...) D/RequestHandler: Authenticated with static token"

After 90 min:… »01 Aug 01:26:44: Failed to update profile and inventories 01 Aug 01:26:44: Getting map of (…, …) D/RequestHandler: Authenticated with static token 01 Aug 01:26:44: Error running loop ProfileLoop! 01 Aug 01:26:44: Error running loop BotLoop! com.pokegoapi.exceptions.LoginFailedException: Error in API Url at com.pokegoapi.main.RequestHandler.internalSendServerRequests(RequestHandler.java:216) at com.pokegoapi.main.RequestHandler.run(RequestHandler.java:289) at java.lang.Thread.run(Thread.java:745) com.pokegoapi.exceptions.LoginFailedException: Error in API Url at com.pokegoapi.main.RequestHandler.internalSendServerRequests(RequestHandler.java:216) at com.pokegoapi.main.RequestHandler.run(RequestHandler.java:289) at java.lang.Thread.run(Thread.java:745) 01 Aug 01:26:49: Getting map of (…, -…) D/RequestHandler: Authenticated with static token 01 Aug 01:26:49: Error running loop BotLoop!«

After 150 min:… »D/RequestHandler: Authenticated with static token 01 Aug 01:40:29: Error running loop ProfileLoop! com.pokegoapi.exceptions.LoginFailedException: Error in API Url at com.pokegoapi.main.RequestHandler.internalSendServerRequests(RequestHandler.java:216) at com.pokegoapi.main.RequestHandler.run(RequestHandler.java:289) at java.lang.Thread.run(Thread.java:745) 01 Aug 01:40:31: Getting map of (…, …) D/RequestHandler: Authenticated with static token«

Casual-User avatar Jul 31 '16 22:07 Casual-User

Hacky workaround for me is to restart the bot every 90 minutes: while [ 1 ]; do killall java; nohup java -jar pogo.scraper-all-0.5.0-alpha4.jar &; sleep 5400; done

langerhans avatar Aug 01 '16 06:08 langerhans

How would you create a script for rebooting the bot for Mac OSX ?

Mikeykingz avatar Aug 01 '16 08:08 Mikeykingz

@Mikeykingz I think that this comment has your solution: https://github.com/jabbink/PokemonGoBot/issues/680#issuecomment-236499717

while [ 1 ]; do killall java; nohup java -jar pogo.scraper-all-0.5.0-alpha4.jar &; sleep 5400; done

Haven't personally tried but looks like a shell script to me ...

I think I've figured out a .bat restart script for windows - that was a huge pain in the ass. Here's how I did it (feel free to correct me btw!)

You need to create two .bat files in the same directory as your JAR:

start.bat

java -jar pogo.scraper-all-0.5.0-alpha4.jar

restartscript.bat

:loop
START "pogobot" start.bat &^
timeout /t 5400 &^
taskkill /fi "WINDOWTITLE eq pogobot - start.bat*" /f &^
taskkill /fi "WINDOWTITLE eq pogobot - start.bat*" /f
goto loop

And then... you run restartscript.bat from the terminal or just from the file explorer. I have no idea why you need to taskkill twice, but that's how I got it working for me.

cozos avatar Aug 01 '16 09:08 cozos

Should be fixed.

jabbink avatar Aug 03 '16 09:08 jabbink