PokemonGoF / PokemonGo-Bot

The Pokemon Go Bot, baking with community.
MIT License
3.86k stars 1.54k forks source link

[DOCKER] Unable to run bot on freshly created docker container #5822

Open AWSadmin opened 7 years ago

AWSadmin commented 7 years ago

Hi,

The bot crashes with error on start: OSError: Error relocating /usr/src/app/src/pgoapi/pgoapi/lib/libniahash-linux-x86-64.so: __memcpy_chk: symbol not found

Background: Docker container built with the following command using current Dockerfile : docker build -t pokemongo-bot .

The images get created with no issues:

...
(4/5) Purging tar (1.29-r1)
(5/5) Purging jq (1.5-r1)
Executing busybox-1.24.2-r11.trigger
OK: 64 MiB in 24 packages
 ---> 211c20eb37cb
Removing intermediate container 2be557376be4
Step 13 : CMD python pokecli.py
 ---> Running in 7d1c5f8d9403
 ---> 6f379da3f986
Removing intermediate container 7d1c5f8d9403
Successfully built 6f379da3f986

Then I run the container with: docker run --name=bot1-pokego -d -it -v $(pwd)/configs:/usr/src/app/configs -v $(pwd)/web/:/usr/src/app/web/ pokemongo-bot

And it crashes with this error:

2016-11-17 17:41:17,145 [       cli] [INFO] PokemonGO Bot v1.0
2016-11-17 17:41:17,153 [       cli] [INFO] commit: 30dbcc0d
2016-11-17 17:41:17,155 [       cli] [INFO] No auth argument specified, checking for /usr/src/app/pokemongo_bot/../configs/auth.json
2016-11-17 17:41:17,157 [       cli] [INFO] No config argument specified, checking for /usr/src/app/pokemongo_bot/../configs/config.json
2016-11-17 17:41:17,162 [       cli] [INFO] Configuration initialized
(1) wsgi starting up on http://127.0.0.1:4000
[2016-11-17 17:41:17] [PokemonGoBot] [INFO] Setting start location.
[2016-11-17 17:41:17] [PokemonGoBot] [INFO] Favorite location found: milan ([u'45.472849', u'9.177567'])
[2016-11-17 17:41:17] [PokemonGoBot] [INFO] Location found: Milan (45.472849, 9.177567, 8.0)
[2016-11-17 17:41:17] [PokemonGoBot] [INFO] Now at (45.472849, 9.177567, 8.0)
[2016-11-17 17:41:17] [PokemonGoBot] [INFO] Login procedure started.
_inventory was not initialized
_inventory was not initialized
[2016-11-17 17:41:23] [       cli] [INFO] 
[2016-11-17 17:41:23] [       cli] [INFO] Ran for 0:00:06
[2016-11-17 17:41:23] [       cli] [INFO] Total XP Earned: 0  Average: 0.00/h
[2016-11-17 17:41:23] [       cli] [INFO] Travelled 0.00km
[2016-11-17 17:41:23] [       cli] [INFO] Visited 0 stops
[2016-11-17 17:41:23] [       cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before ()
[2016-11-17 17:41:23] [       cli] [INFO] Threw 0 pokeballs
[2016-11-17 17:41:23] [       cli] [INFO] Earned 0 Stardust
[2016-11-17 17:41:23] [       cli] [INFO] Hatched eggs 0
[2016-11-17 17:41:23] [       cli] [INFO] 
[2016-11-17 17:41:23] [       cli] [INFO] Highest CP Pokemon: 
[2016-11-17 17:41:23] [       cli] [INFO] Most Perfect Pokemon: 
Traceback (most recent call last):
  File "pokecli.py", line 846, in <module>
    main()
  File "pokecli.py", line 194, in main
    bot = start_bot(bot, config)
  File "pokecli.py", line 146, in start_bot
    bot.start()
  File "/usr/src/app/pokemongo_bot/__init__.py", line 147, in start
    self._setup_api()
  File "/usr/src/app/pokemongo_bot/__init__.py", line 1045, in _setup_api
    self.login()
  File "/usr/src/app/pokemongo_bot/__init__.py", line 944, in login
    str(self.config.password))
  File "/usr/src/app/pokemongo_bot/api_wrapper.py", line 103, in login
    response = PGoApi.app_simulation_login(self)
  File "/usr/src/app/src/pgoapi/pgoapi/pgoapi.py", line 169, in app_simulation_login
    response = request.call()
  File "/usr/src/app/src/pgoapi/pgoapi/pgoapi.py", line 249, in call
    request.activate_signature(signature_lib_path, hash_lib_path)
  File "/usr/src/app/src/pgoapi/pgoapi/rpc_api.py", line 86, in activate_signature
    self._hash_engine = HashGenerator(hash_lib_path)
  File "/usr/src/app/src/pgoapi/pgoapi/utilities.py", line 232, in __init__
    self._hash_lib = ctypes.cdll.LoadLibrary(library_path)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 440, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 362, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: Error relocating /usr/src/app/src/pgoapi/pgoapi/lib/libniahash-linux-x86-64.so: __memcpy_chk: symbol not found

The bot could run with 0.43 API before API was updated to 0.45, so the config files are okay.

bentucker commented 7 years ago

I had that same issue. I believe removing the Alpine image and rebuilding it fixed things that error. But there are still other issues unfortunately.

On Nov 17, 2016 11:46 AM, "AWSadmin" notifications@github.com wrote:

Hi,

The bot crashes with error on start: OSError: Error relocating /usr/src/app/src/pgoapi/pgoapi/lib/libniahash-linux-x86-64.so: __memcpy_chk: symbol not found

Background: Docker container built with the following command using current Dockerfile https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/Dockerfile : docker build -t pokemongo-bot .

The images get created with no issues:

... (4/5) Purging tar (1.29-r1) (5/5) Purging jq (1.5-r1) Executing busybox-1.24.2-r11.trigger OK: 64 MiB in 24 packages ---> 211c20eb37cb Removing intermediate container 2be557376be4 Step 13 : CMD python pokecli.py ---> Running in 7d1c5f8d9403 ---> 6f379da3f986 Removing intermediate container 7d1c5f8d9403 Successfully built 6f379da3f986

Then I run the container with: docker run --name=bot1-pokego -d -it -v $(pwd)/configs:/usr/src/app/configs -v $(pwd)/web/:/usr/src/app/web/ pokemongo-bot

And it crashes with this error:

2016-11-17 17:41:17,145 [ cli] [INFO] PokemonGO Bot v1.0 2016-11-17 17:41:17,153 [ cli] [INFO] commit: 30dbcc0d 2016-11-17 17:41:17,155 [ cli] [INFO] No auth argument specified, checking for /usr/src/app/pokemongo_bot/../configs/auth.json 2016-11-17 17:41:17,157 [ cli] [INFO] No config argument specified, checking for /usr/src/app/pokemongo_bot/../configs/config.json 2016-11-17 17:41:17,162 [ cli] [INFO] Configuration initialized (1) wsgi starting up on http://127.0.0.1:4000 [2016-11-17 17:41:17] [PokemonGoBot] [INFO] Setting start location. [2016-11-17 17:41:17] [PokemonGoBot] [INFO] Favorite location found: milan ([u'45.472849', u'9.177567']) [2016-11-17 17:41:17] [PokemonGoBot] [INFO] Location found: Milan (45.472849, 9.177567, 8.0) [2016-11-17 17:41:17] [PokemonGoBot] [INFO] Now at (45.472849, 9.177567, 8.0) [2016-11-17 17:41:17] [PokemonGoBot] [INFO] Login procedure started. _inventory was not initialized _inventory was not initialized [2016-11-17 17:41:23] [ cli] [INFO] [2016-11-17 17:41:23] [ cli] [INFO] Ran for 0:00:06 [2016-11-17 17:41:23] [ cli] [INFO] Total XP Earned: 0 Average: 0.00/h [2016-11-17 17:41:23] [ cli] [INFO] Travelled 0.00km [2016-11-17 17:41:23] [ cli] [INFO] Visited 0 stops [2016-11-17 17:41:23] [ cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before () [2016-11-17 17:41:23] [ cli] [INFO] Threw 0 pokeballs [2016-11-17 17:41:23] [ cli] [INFO] Earned 0 Stardust [2016-11-17 17:41:23] [ cli] [INFO] Hatched eggs 0 [2016-11-17 17:41:23] [ cli] [INFO] [2016-11-17 17:41:23] [ cli] [INFO] Highest CP Pokemon: [2016-11-17 17:41:23] [ cli] [INFO] Most Perfect Pokemon: Traceback (most recent call last): File "pokecli.py", line 846, in main() File "pokecli.py", line 194, in main bot = start_bot(bot, config) File "pokecli.py", line 146, in start_bot bot.start() File "/usr/src/app/pokemongo_bot/init.py", line 147, in start self._setup_api() File "/usr/src/app/pokemongo_bot/init.py", line 1045, in _setup_api self.login() File "/usr/src/app/pokemongo_bot/init.py", line 944, in login str(self.config.password)) File "/usr/src/app/pokemongo_bot/api_wrapper.py", line 103, in login response = PGoApi.app_simulation_login(self) File "/usr/src/app/src/pgoapi/pgoapi/pgoapi.py", line 169, in app_simulation_login response = request.call() File "/usr/src/app/src/pgoapi/pgoapi/pgoapi.py", line 249, in call request.activate_signature(signature_lib_path, hash_lib_path) File "/usr/src/app/src/pgoapi/pgoapi/rpc_api.py", line 86, in activate_signature self._hash_engine = HashGenerator(hash_lib_path) File "/usr/src/app/src/pgoapi/pgoapi/utilities.py", line 232, in init self._hash_lib = ctypes.cdll.LoadLibrary(library_path) File "/usr/lib/python2.7/ctypes/init.py", line 440, in LoadLibrary return self._dlltype(name) File "/usr/lib/python2.7/ctypes/init.py", line 362, in init self._handle = _dlopen(self._name, mode) OSError: Error relocating /usr/src/app/src/pgoapi/pgoapi/lib/libniahash-linux-x86-64.so: __memcpy_chk: symbol not found

The bot could run with 0.43 API before API was updated to 0.45, so the config files are okay.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PokemonGoF/PokemonGo-Bot/issues/5822, or mute the thread https://github.com/notifications/unsubscribe-auth/ABaAgWzF9-IoANiwgbvqX04c4-oq7wpWks5q_JLzgaJpZM4K1mpF .

jamiekuo commented 7 years ago

You are right. Today I builded the docker image as "pokemongo-bot2" again below and then tested it. I found that pokemongo-bot2 doesn't work but old "pokemongo-bot1" is good.

command: docker build -t pokemongo-bot2 . list images: image

Because the Dockerfile does not change recently, I think maybe someone change the remote contents of the URLs.

AWSadmin commented 7 years ago

Hi @jamiekuo, I removed all the images including Alpine image, rebuilt the image for pokemongo-bot but still having the same error.

There must be something in Dockerfile that needs to be updated.

jamiekuo commented 7 years ago

Hi @jamiekuo, I removed all the images including Alpine image, rebuilt the image for pokemongo-bot but still having the same error.

There must be something in Dockerfile that needs to be updated.

Hi AWSadmin, You can try my "jamie820103/pokemongo-bot:45.0" remote image first...

docker run --name=bot1-pokego --rm -it -v $(pwd)/configs:/usr/src/app/configs -v $(pwd)/web/:/usr/src/app/web/ jamie820103/pokemongo-bot:45.0
ikariya69 commented 7 years ago

nice ! possible to have an ARM image ? for raspberry ?