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

Dockerfile crash (does not include config files correctly) #5952

Closed
ikariya69 opened this issue Mar 5, 2017 · 13 comments
Closed

Dockerfile crash (does not include config files correctly) #5952

ikariya69 opened this issue Mar 5, 2017 · 13 comments

Comments

@ikariya69
Copy link

Expected Behavior

should start normally

Actual Behavior

crash at start on dockerfile or docker-compose, whatever the platform (tests on macOS and raspberrypi with armhf/alpine)

seems that path or volume mounting in docker are not correctly set, not sure that API is correctly set also

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

standard config.json

Output when issue occurred

bot1-pokego_1 | 05 07:45:58,592 [ cli] [INFO] PokemonGO Bot v1.0
bot1-pokego_1 | 2017-03-05 07:45:58,605 [ cli] [INFO] commit: 720c90a
bot1-pokego_1 | 2017-03-05 07:45:58,609 [ cli] [INFO] No auth argument specified, checking for /usr/src/app/pokemongo_bot/../configs/auth.json
bot1-pokego_1 | 2017-03-05 07:45:58,616 [ cli] [INFO] No config argument specified, checking for /usr/src/app/pokemongo_bot/../configs/config.json
bot1-pokego_1 | 2017-03-05 07:45:58,624 [ cli] [INFO] Configuration initialized
bot1-pokego_1 | 2017-03-05 07:45:58,624 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information:
bot1-pokego_1 | 2017-03-05 07:45:58,625 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
bot1-pokego_1 | 2017-03-05 07:45:58,638 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
bot1-pokego_1 | 2017-03-05 07:45:58,764 [PokemonGoBot] [INFO] Setting start location.
bot1-pokego_1 | 2017-03-05 07:45:58,765 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
bot1-pokego_1 | 2017-03-05 07:45:58,766 [PokemonGoBot] [INFO] Location found: 45.777403, 4.855214 (45.777403, 4.855214, 8.0)
bot1-pokego_1 | 2017-03-05 07:45:58,767 [PokemonGoBot] [INFO] Now at (45.777403, 4.855214, 8.0)
bot1-pokego_1 | 2017-03-05 07:45:58,767 [PokemonGoBot] [INFO] Login procedure started.
bot1-pokego_1 | _inventory was not initialized
bot1-pokego_1 | _inventory was not initialized
bot1-pokego_1 | 2017-03-05 07:45:58,875 [ cli] [INFO]
bot1-pokego_1 | 2017-03-05 07:45:58,876 [ cli] [INFO] Ran for 0:00:00
bot1-pokego_1 | 2017-03-05 07:45:58,876 [ cli] [INFO] Total XP Earned: 0 Average: 0.00/h
bot1-pokego_1 | 2017-03-05 07:45:58,876 [ cli] [INFO] Travelled 0.00km
bot1-pokego_1 | 2017-03-05 07:45:58,876 [ cli] [INFO] Visited 0 stops
bot1-pokego_1 | 2017-03-05 07:45:58,877 [ cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before ()
bot1-pokego_1 | 2017-03-05 07:45:58,877 [ cli] [INFO] Threw 0 pokeballs
bot1-pokego_1 | 2017-03-05 07:45:58,877 [ cli] [INFO] Earned 0 Stardust
bot1-pokego_1 | 2017-03-05 07:45:58,877 [ cli] [INFO] Hatched eggs 0
bot1-pokego_1 | 2017-03-05 07:45:58,877 [ cli] [INFO]
bot1-pokego_1 | 2017-03-05 07:45:58,877 [ cli] [INFO] Highest CP Pokemon:
bot1-pokego_1 | 2017-03-05 07:45:58,877 [ cli] [INFO] Most Perfect Pokemon:
bot1-pokego_1 | Traceback (most recent call last):
bot1-pokego_1 | File "pokecli.py", line 865, in
bot1-pokego_1 | main()
bot1-pokego_1 | File "pokecli.py", line 195, in main
bot1-pokego_1 | bot = start_bot(bot, config)
bot1-pokego_1 | File "pokecli.py", line 147, in start_bot
bot1-pokego_1 | bot.start()
bot1-pokego_1 | File "/usr/src/app/pokemongo_bot/init.py", line 155, in start
bot1-pokego_1 | self._setup_api()
bot1-pokego_1 | File "/usr/src/app/pokemongo_bot/init.py", line 1149, in _setup_api
bot1-pokego_1 | self.login()
bot1-pokego_1 | File "/usr/src/app/pokemongo_bot/init.py", line 957, in login
bot1-pokego_1 | str(self.config.password))
bot1-pokego_1 | File "/usr/src/app/pokemongo_bot/api_wrapper.py", line 103, in login
bot1-pokego_1 | password=password
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/pgoapi/pgoapi.py", line 95, in set_authentication
bot1-pokego_1 | if not self._auth_provider.user_login(username, password):
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/pgoapi/auth_google.py", line 58, in user_login
bot1-pokego_1 | user_login = perform_master_login(username, password, self.GOOGLE_LOGIN_ANDROID_ID, proxy=self._proxy)
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/gpsoauth/init.py", line 70, in perform_master_login
bot1-pokego_1 | return _perform_auth_request(data, proxy)
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/gpsoauth/init.py", line 26, in _perform_auth_request
bot1-pokego_1 | headers={'User-Agent': useragent})
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 518, in post
bot1-pokego_1 | return self.request('POST', url, data=data, json=json, **kwargs)
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
bot1-pokego_1 | resp = self.send(prep, **send_kwargs)
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 585, in send
bot1-pokego_1 | r = adapter.send(request, **kwargs)
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 477, in send
bot1-pokego_1 | raise SSLError(e, request=request)
bot1-pokego_1 | requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
bot1-pokego_1 | 2017-03-05 07:45:58,909 [sentry.errors] [ERROR] Sentry responded with an error: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) (url: https://app.getsentry.com/api/90254/store/)
bot1-pokego_1 | Traceback (most recent call last):
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
bot1-pokego_1 | super(ThreadedHTTPTransport, self).send(data, headers)
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
bot1-pokego_1 | ca_certs=self.ca_certs,
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
bot1-pokego_1 | return opener.open(url, data, timeout)
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
bot1-pokego_1 | response = self._open(req, data)
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
bot1-pokego_1 | '_open', req)
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
bot1-pokego_1 | result = func(*args)
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
bot1-pokego_1 | return self.do_open(ValidHTTPSConnection, req)
bot1-pokego_1 | File "/usr/lib/python2.7/site-packages/future/backports/urllib/request.py", line 1284, in do_open
bot1-pokego_1 | h.request(req.get_method(), req.selector, req.data, headers)
bot1-pokego_1 | File "/usr/lib/python2.7/httplib.py", line 1042, in request
bot1-pokego_1 | self._send_request(method, url, body, headers)
bot1-pokego_1 | File "/usr/lib/python2.7/httplib.py", line 1082, in _send_request
bot1-pokego_1 | self.endheaders(body)
bot1-pokego_1 | File "/usr/lib/python2.7/httplib.py", line 1038, in endheaders
bot1-pokego_1 | self._send_output(message_body)
bot1-pokego_1 | File "/usr/lib/python2.7/httplib.py", line 880, in _send_output
bot1-pokego_1 | msg += message_body
bot1-pokego_1 | UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)
bot1-pokego_1 | 2017-03-05 07:45:58,912 [sentry.errors.uncaught] [ERROR] [u'SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)', u' File "pokecli.py", line 865, in ', u' File "pokecli.py", line 195, in main', u' File "pokecli.py", line 147, in start_bot', u' File "pokemongo_bot/init.py", line 155, in start', u' File "pokemongo_bot/init.py", line 1149, in _setup_api', u' File "pokemongo_bot/init.py", line 957, in login', u' File "pokemongo_bot/api_wrapper.py", line 103, in login', u' File "pgoapi/pgoapi.py", line 95, in set_authentication', u' File "pgoapi/auth_google.py", line 58, in user_login', u' File "gpsoauth/init.py", line 70, in perform_master_login', u' File "gpsoauth/init.py", line 26, in _perform_auth_request', u' File "requests/sessions.py", line 518, in post', u' File "requests/sessions.py", line 475, in request', u' File "requests/sessions.py", line 585, in send', u' File "requests/adapters.py", line 477, in send']

Steps to Reproduce

docker-compose up

Other Information

OS: MacOS / Raspbian

Branch: master or dev

Python Version: 2.7

@ikariya69
Copy link
Author

installed bot inside fresh ubuntu docker container and works flawlessly
seems dockerfile are misconstructed

@pogarek
Copy link
Contributor

pogarek commented Mar 27, 2017

yeah, someone (forgot who) promised to work on docker images. :-)

@TraggerHippy
Copy link

I have the same problem on my Raspberry Pi 3B with the latest Raspbian version. I can actually start and run the bot for a while after startup problems, is there a solution in scope ? Or can i draw the conclusion my system might not be compatible ? It is very frustrating to onstantly see the bot crash. It did run better before the updates. Now i get a maximum of 200 caught pokemon per day with almost as many crashes 😣

@pogarek
Copy link
Contributor

pogarek commented Apr 11, 2017

Don't be frustrated. Take a beer or something. The bot is free, community driven, in spare time. If someone knew already how to fix it, it would be done. Help us if you can.

@TraggerHippy
Copy link

PS when i start the bot accounts, usually i have to re attempt quite often before a succes. It usually stops before the captcha request, or stops on login procedure started. Once started it runs for a short while than crashes with server busy messages, reonnecting in xxx seconds

Is it possible to shorten this amount of seconds to lets say 30 seconds ? This will get me more runtime per day when i do not touch the system.

@TraggerHippy
Copy link

Haha not frustrated 👌

@pogarek
Copy link
Contributor

pogarek commented Apr 11, 2017

:) Let me try to use docker for the very first time in my life. I'll follow step in https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/docs/installation.md#docker , However docker will be hosted on Windows 10 in my case.

@pogarek
Copy link
Contributor

pogarek commented Apr 11, 2017

Sorry, I've tried. I Need to share a drive to allow docket image to see config. Docker says that Windows Firewall is blocking it, while I've created a proper exception.. No idea how to go from there.

We need a docker expert to fix the problem. Probably by editing https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/Dockerfile

@TraggerHippy
Copy link

I've reinstalled the bot using the manual installation instructions, now using dev branch. Bot runs better now, probably also due to upgrades on dev tools and system.

https://github.com/PokemonGoF/PokemonGo-Bot/blob/dev/docs/manual_installation.md

Often it does still crash with address already in use or server not responding or offline. But so far starting the bot does work using 4 accounts.

Running commands in new lx terminal:
Sudo su

cd PokemonGo-Bot
#activate virtualenv and start
source bin/activate
./run.sh

For each account i have set separate run, auth and config files, where in the run file i have changed the path to point to the correct config and auth file.

As a workaround i want to change the timeout for server offline messages from 10+ minutes to 30 seconds, where can i apply this change ? Not sure what file i need to look at.

@pogarek
Copy link
Contributor

pogarek commented Apr 12, 2017

try with "reconnecting_timeout"

@TraggerHippy
Copy link

In the config file ? Was set to 15, asumed these are minutes ? changed to 0.5 now.
I thought about this option before but the timeout is not always the same amount, and given in seconds ?

will see thank you, in run i have changed the 20 seconds delay to 1, also will make a huge diffference overday

@TraggerHippy
Copy link

reconnecting_timeout set to 0.5 did the trick in config.json thanks a lot again. not the way it should, but this gives me a good uptime.

hopefully this also helps the original issue reporter a bit as well, otherwise my apologees for the amount of replies.

@davidakachaos
Copy link
Contributor

Closing old issue, if you think this is an error let me know or open a new issue. Thank you.

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

4 participants