LoginFailed after (exactly) 1,5h
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
yes, I experience this too. I'm using a google account, in case that helps someone, but I only have wild speculation about why.
I use google login too. Guess this is something to check for human vs bot
I just got it too, but using PTC. My error says LoginFailedException: Error in API Url
i think its because of not renewing the token or something
e: only happening on my google login XD
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)
I can confirm this too however ONLY with Google. I have several PTC bots running for many hours now, no issues.
I'm getting this error as well.
Can somebody come up with a script to kill and reload the bot every 1.5 hours ?
i'm working on it
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"
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«
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
How would you create a script for rebooting the bot for Mac OSX ?
@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.
Should be fixed.