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

Problems connecting to Pokemon-Go Map #3918

Closed
ph3l1x opened this issue Aug 14, 2016 · 5 comments
Closed

Problems connecting to Pokemon-Go Map #3918

ph3l1x opened this issue Aug 14, 2016 · 5 comments

Comments

@ph3l1x
Copy link

ph3l1x commented Aug 14, 2016

  1. Have you validated that your config.json is valid JSON? Use http://jsonlint.com/ to check.
    Yes JSON is validated.
  2. Have you searched to see if there are other issues for the same issue? If so, comment on that issue instead.
    Yes have not found any issues that are related.
  3. Are you running master? We work on the dev branch and then add that functionality to master. Your issue may be fixed on dev and there is no need for this issue, just wait and it will eventually be merged to master.
    Yes I am using most current dev release

Expected Behavior

Using config.map.json file it should be able to connect to PokemonGo-Map

Actual Behavior

Not receving any errors and able to read data from PokemonGo-Map

Your config.json (remove your credentials and any other private info)

{
    "auth_service": "ptc",
    "username": "username",
    "password": "password",
    "location": "xxxxxxx,-xxxxxxx",
    "gmapkey": "xxxxxxxxxxx",
    "encrypt_location": "",
    "tasks": [
      {
        "type": "HandleSoftBan"
      },
      {
        "type": "SleepSchedule",
        "config": {
          "enabled": true,
          "time": "01:54",
          "duration":"5:46",
          "time_random_offset": "00:24",
          "duration_random_offset": "00:43"
        }
      },
      {
        "type": "CollectLevelUpReward"
      },
      {
        "type": "IncubateEggs",
        "config": {
          "longer_eggs_first": true
        }
      },
      {
        "type": "UpdateLiveStats",
        "config": {
          "enabled": true,
          "min_interval": 10,
          "stats": ["uptime", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited"],
          "terminal_log": true,
          "terminal_title": true
        }
      },
      {
        "type": "TransferPokemon"
      },
      {
        "type": "EvolvePokemon",
        "config": {
          "evolve_all": "NONE",
          "evolve_cp_min": 300,
          "evolve_speed": 20,
          "use_lucky_egg": false
        }
      },
      {
        "type": "RecycleItems",
        "config": {
          "item_filter": {
                "Pokeball":     { "keep" : 20 },
                "Greatball":    { "keep" : 30 },
                "Ultraball":    { "keep" : 75 },
                "Potion":       { "keep" : 0 },
                "Super Potion": { "keep" : 5 },
                "Hyper Potion": { "keep" : 25 },
                "Max Potion":   { "keep" : 50 },
                "Revive":       { "keep" : 10 },
        "Max Revive":   { "keep" : 50 },
                "Razz Berry":   { "keep" : 7 }
          }
        }
      },
      {
        "type": "CatchVisiblePokemon"
      },
      {
        "type": "CatchLuredPokemon"
      },
      {
        "type": "SpinFort"
      },
      {
        "type": "MoveToMapPokemon",
        "config": {
          "address": "http://PokomonGo-Map-Server.com:5000",
          "max_distance": 15,
          "min_time": 60,
          "min_ball": 20,
          "prioritize_vips": true,
          "snipe": true,
      "snipe_high_prio_only": true,
      "snipe_high_prio_threshold": 400,
          "update_map": false,
          "mode": "priority",
      "map_path": "raw_data",
          "catch": {
            "==========Legendaries==========": 0,
            "Aerodactyl": 1000,
            "Snorlax": 1000,
            "Articuno": 1000,
            "Zapdos": 1000,
            "Moltres": 1000,
            "Dratini": 1000,
            "Dragonair": 1000,
            "Dragonite": 1000,
            "Mewtwo": 1000,
            "Mew": 1000,

            "==========Region Locked==========": 0,
            "Farfetch'd": 1000,
            "Kangaskhan": 1000,
            "Mr. Mime": 1000,
            "Tauros": 1000,

            "==========Very Rare==========": 0,
            "Lapras": 900,
            "Electabuzz": 900,
            "Magmar": 900,
            "Ditto": 900,

            "==========Starters==========": 0,
            "Bulbasaur": 400,
            "Ivysaur": 600,
            "Venusaur": 1000,

            "Charmander": 400,
            "Charmeleon": 600,
            "Charizard": 1000,

            "Squirtle": 400,
            "Wartortle": 600,
            "Blastoise": 1000,

            "Pikachu": 600,
            "Raichu": 1000,

            "==========Semi Rare==========": 0,
            "Porygon": 800,
            "Scyther": 200,
            "Jynx": 200,

            "==========Uncommon==========": 0,

            "Omanyte": 150,
            "Omastar": 500,

            "Seel": 300,
            "Dewgong": 500,

            "Grimer": 200,
            "Muk": 500,

            "Shellder": 200,
            "Cloyster": 500,

            "Gastly": 200,
            "Haunter": 500,
            "Gengar": 1000,

            "Onix": 600,

            "Drowzee": 600,

            "Hypno": 600,

            "Vulpix": 200,
            "Ninetales": 600,

            "Paras": 100,
            "Parasect": 200,

            "Growlithe": 200,
            "Arcanine": 700,

            "Tentacool": 200,
            "Tentacruel": 300,

            "Mankey": 150,
            "Primeape": 300,

            "Clefairy": 150,
            "Clefable": 500,

            "Jigglypuff": 150,
            "Wigglytuff": 500,

            "Venonat": 100,
            "Venomoth": 300,

            "Diglett": 200,
            "Dugtrio": 300,

            "Meowth": 250,
            "Persian": 300,

            "Psyduck": 150,
            "Golduck": 500,

            "Geodude": 100,
            "Graveler": 300,
            "Golem": 800,

            "Eevee": 200,
            "Vaporeon": 800,
            "Jolteon": 800,
            "Flareon": 800,

            "Kabuto": 150,
            "Kabutops": 500,

            "Magikarp": 150,
            "Gyarados": 800,

            "Pinsir": 150,

            "Ponyta": 200,
            "Rapidash": 300,

            "Slowpoke": 200,
            "Slowbro": 500,

            "Magnemite": 250,
            "Magneton": 500,

            "Krabby": 100,
            "Kingler": 300,

            "Voltorb": 200,
            "Electrode": 500,

            "Exeggcute": 250,
            "Exeggcutor": 500,

            "Cubone": 300,
            "Marowak": 800,

            "Hitmonlee": 400,

            "Hitmonchan": 400,

            "Lickitung": 500,

            "Koffing": 200,
            "Weezing": 500,

            "Rhyhorn": 200,
            "Rhydon": 500,

            "Chansey": 800,

            "Tangela": 300,

            "Horsea": 200,
            "Seadra": 600,

            "Goldeen": 150,
            "Seaking": 500,

            "Staryu": 200,
            "Starmie": 800,


            "==========T1 Evolvers==========": 0,
            "Caterpie": 10,
            "Metapod": 10,
            "Butterfree": 500,

            "Weedle": 10,
            "Kakuna": 10,
            "Beedrill": 300,

            "Pidgey": 10,
            "Pidgeotto": 10,
            "Pidgeot": 300,

            "==========T2 Evolvers==========": 0,
            "Nidoran F": 10,
            "Nidorina": 10,
            "Nidoqueen": 10,

            "Nidoran M": 10,
            "Nidorino": 10,
            "Nidoking": 10,

            "Oddish": 100,
            "Gloom": 200,
            "Vileplume": 600,

            "Poliwag": 200,
            "Poliwhirl": 300,
            "Poliwrath": 800,

            "Abra": 300,
            "Kadabra": 300,
            "Alakazam": 300,

            "Machop": 150,
            "Machoke": 300,
            "Machamp": 800,

            "Bellsprout": 100,
            "Weepinbell": 300,
            "Victreebel": 800,

            "==========Trash==========": 0,

            "Rattata": 10,
            "Raticate": 10,

            "Spearow": 10,
            "Fearow": 10,

            "Ekans": 10,
            "Arbok": 10,

            "Sandshrew": 10,
            "Sandslash": 10,

            "Zubat": 10,
            "Golbat": 10,

            "Doduo": 10,
            "Dodrio": 10

          }
        }
      },
      {
        "type": "MoveToFort"
      },
      {
        "type": "FollowSpiral"
      }
    ],
    "map_object_cache_time": 5,
    "forts": {
      "avoid_circles": true,
      "max_circle_size": 50
    },
    "websocket_server": false,
    "walk": 4.16,
    "action_wait_min": 1,
    "action_wait_max": 4,
    "debug": false,
    "test": false,
    "health_record": false,
    "location_cache": true,
    "distance_unit": "km",
    "reconnecting_timeout": 15,
    "catch_randomize_reticle_factor": 1.0,
    "catch_randomize_spin_factor": 1.0,
    "min_ultraball_to_keep": 10,
    "logging_color": true,
    "catch": {
      "any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
      "// Example of always catching Rattata:": {},
      "// Rattata": { "always_catch" : true }
    },
    "release": {
      "Electabuzz": {"release_below_cp": 1500},
      "Aerodactyl": {"release_below_cp": 1400},
      "Arbok": {"release_below_cp": 1200},
      "Arcanine": {"release_below_cp": 1500},
      "Dragonite": {"release_beleow_cp": 2500},
      "Drowzee": {"release_below_cp": 1000},
      "Evee": {"release_bel0w_cp": 1000},
      "Exeggutor": {"release_below_cp": 2300},
      "Fearow": {"release_below_cp": 1300},
      "Flareon": {"release_below_cp": 2000},
      "Gengar": {"release_below_cp": 1300},
      "Golbat": {"release_below_cp": 1300},
      "Golem": {"release_below_cp": 1300},
      "Graveler": {"release_below_cp": 1300},
      "Dratini": {"release_below_cp": 600},
      "Dodrio": {"release_below_cp": 1300},
      "Pidgeot": {"release_below_cp": 1600},
      "Pinsir": {"release_below_cp": 1500},
      "Tangela": {"release_below_cp": 1199},
      "Tauros": {"release_below_cp": 1500},
      "Magikarp": {"release_below_cp": 190},
      "Raticate": {"always_release": true},
      "Kingler": {"release_below_cp": 1100},
      "Growlithe": {"release_below_cp": 1000},
      "Dodrio": {"release_below_cp": 1199},
      "Ponyta": {"release_below_cp": 1200},
      "Scyther": {"release_below_cp": 1200},
      "Snorlax": {"release_below_cp": 2300},
      "Gyrados": {"release_below_cp": 2200},
      "Hitmonchan": {"release_below_cp": 1000},
      "Hypno": {"release_below_cp": 1700},
      "Jolteon": {"release_below_cp": 1700},
      "Magmar": {"release_below_cp": 1500},
      "Parasect": {"release_below_cp": 1300},
      "Rapidash": {"release_below_cp": 1300},
      "Rhydon": {"release_below_cp": 1700},
      "Vaporeon": {"release_below_cp": 2300},
      "any": {"release_below_cp": 400, "release_below_iv": 0, "logic": "or"}
    },
    "vips" : {
         "Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate!": {},
        "any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },
        "Lapras": {},
        "Moltres": {},
        "Zapdos": {},
        "Articuno": {},

        "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
        "Mewtwo": {},
        "Dragonite": {},
        "Snorlax": {},
        "// Mew evolves to Mewtwo": {},
        "Mew": {},
        "Arcanine": {},
        "Vaporeon": {},
        "Gyarados": {},
        "Exeggutor": {},
        "Muk": {},
        "Weezing": {},
        "Flareon": {}
    }
}

Steps to Reproduce

Used most recent git clone -b develop https://github.com/PokemonGoMap/PokemonGo-Map.git
Used most recent git clone --recursive -b dev https://github.com/PokemonGoF/PokemonGo-Bot.git

Bot runs fine using config without map and PokemonGoMap loads and runs properly. However using the map example config, it doesn't seem to connect without giving me an error. I have done this many times before and it used to recently work a couple days ago. Curious if something may have changed that could be preventing this from happening.

Console messages:

2016-08-14 08:41:51,266 [ cli] [INFO] PokemonGO Bot v1.0
2016-08-14 08:41:51,270 [ cli] [INFO] Configuration initialized
2016-08-14 08:41:51,280 [PokemonGoBot] [INFO] [set_start_location] Setting start location.
2016-08-14 08:41:51,281 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-14 08:41:51,281 [PokemonGoBot] [INFO] [location_found] Location found: 43.6235669,-116.2096644 (43.6235669, -116.2096644, 0.0)
2016-08-14 08:41:51,281 [PokemonGoBot] [INFO] [position_update] Now at (43.6235669, -116.2096644, 0)
2016-08-14 08:41:51,282 [PokemonGoBot] [INFO] [login_started] Login procedure started.
2016-08-14 08:41:52,469 [PokemonGoBot] [INFO] [login_successful] Login successful.
2016-08-14 08:41:52,670 [PokemonGoBot] [INFO]
2016-08-14 08:41:52,670 [PokemonGoBot] [INFO] --- username ---
2016-08-14 08:41:52,670 [PokemonGoBot] [INFO] Level: 20 (Next Level: 16655 XP) (Total: 243345 XP)
2016-08-14 08:41:52,671 [PokemonGoBot] [INFO] Pokemon Captured: 798 | Pokestops Visited: 1465
2016-08-14 08:41:52,671 [PokemonGoBot] [INFO] Pokemon Bag: 44/250
2016-08-14 08:41:52,672 [PokemonGoBot] [INFO] Items: 273/350
2016-08-14 08:41:52,672 [PokemonGoBot] [INFO] Stardust: 116244 | Pokecoins: 0
2016-08-14 08:41:52,672 [PokemonGoBot] [INFO] PokeBalls: 96 | GreatBalls: 80 | UltraBalls: 39 | MasterBalls: 0
2016-08-14 08:41:52,672 [PokemonGoBot] [INFO] RazzBerries: 14 | BlukBerries: 0 | NanabBerries: 0
2016-08-14 08:41:52,673 [PokemonGoBot] [INFO] LuckyEgg: 5 | Incubator: 0 | TroyDisk: 5
2016-08-14 08:41:52,673 [PokemonGoBot] [INFO] Potion: 10 | SuperPotion: 4 | HyperPotion: 0 | MaxPotion: 0
2016-08-14 08:41:52,673 [PokemonGoBot] [INFO] Incense: 8 | IncenseSpicy: 0 | IncenseCool: 0
2016-08-14 08:41:52,673 [PokemonGoBot] [INFO] Revive: 10 | MaxRevive: 0
2016-08-14 08:41:52,673 [PokemonGoBot] [INFO]
2016-08-14 08:41:52,673 [PokemonGoBot] [INFO] Found encrypt.so! Platform: linux2 Encrypt.so directory: /var/www/p4999.xxx.net/PokemonGo-Bot
2016-08-14 08:41:52,674 [PokemonGoBot] [INFO]
2016-08-14 08:41:53,805 [SleepSchedule] [INFO] [next_sleep] Next sleep at 2016-08-15 01:50:55.805163
2016-08-14 08:41:54,924 [PokemonGoBot] [INFO] [bot_start] Starting bot...
2016-08-14 08:41:55,072 [CollectLevelUpReward] [INFO] [level_up_reward] Received level up reward: []
2016-08-14 08:41:55,073 [IncubateEggs] [INFO] [next_egg_incubates] Next egg incubates in 0.78 km
2016-08-14 08:41:56,118 [UpdateLiveStats] [INFO] [log_stats] Uptime : 0:00:05 | Earned 0 Stardust | +0 XP | 0 XP/h | Visited 0 stops
2016-08-14 08:41:56,335 [TransferPokemon] [INFO] [future_pokemon_release] Releasing Cubone [CP 264] [IV 0.56] based on rule: CP < 400 OR IV < 0
2016-08-14 08:41:56,545 [TransferPokemon] [INFO] [pokemon_release] Exchanged Cubone [CP 264] [IV 0.56] for candy.
2016-08-14 08:42:00,495 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_fail] Failure! Map data was not valid
2016-08-14 08:42:00,581 [MoveToFort] [INFO] [moving_to_fort] Moving towards pokestop William E. Manning Gazebo - 0.06km
2016-08-14 08:42:02,857 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_fail] Failure! Map data was not valid
2016-08-14 08:42:02,859 [MoveToFort] [INFO] [moving_to_fort] Moving towards pokestop William E. Manning Gazebo - 0.06km
2016-08-14 08:42:04,772 [IncubateEggs] [INFO] [next_egg_incubates] Next egg incubates in 0.77 km
2016-08-14 08:42:05,017 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_fail] Failure! Map data was not valid
2016-08-14 08:42:05,019 [MoveToFort] [INFO] [moving_to_fort] Moving towards pokestop William E. Manning Gazebo - 0.06km
2016-08-14 08:42:06,357 [UpdateLiveStats] [INFO] [log_stats] Uptime : 0:00:15 | Earned 0 Stardust | +0 XP | 0 XP/h | Visited 0 stops
2016-08-14 08:42:07,939 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_fail] Failure! Map data was not valid
2016-08-14 08:42:07,941 [MoveToFort] [INFO] [moving_to_fort] Moving towards pokestop William E. Manning Gazebo - 0.05km
2016-08-14 08:42:10,477 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_fail] Failure! Map data was not valid
2016-08-14 08:42:10,479 [MoveToFort] [INFO] [moving_to_fort] Moving towards pokestop William E. Manning Gazebo - 0.05km
^C2016-08-14 08:42:11,168 [PokemonGoBot] [INFO] [bot_exit] Exiting bot.

Other Information

OS: Ubuntu
Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here)
9b72ee5
Python Version: (run 'python -V' and paste it here)
Python 2.7.6

@k4n30
Copy link
Contributor

k4n30 commented Aug 14, 2016

  1. Are you running PokemonGo-map on the same server as the bot or a different server?
  2. What command are you using to load PokemonGo-map?
  3. Have you followed the proper method for updating both PokemonGo-Bot and PokemonGo-Map? (i.e git pull, pip install -r requirements.txt --upgrade, npm install, npm run build etc. )

@ph3l1x
Copy link
Author

ph3l1x commented Aug 14, 2016

  1. I am running this on a different server. This used to work just fine before.
  2. python runserver.py -a ptc -u username -p pass -st 10 -k mygoogleapikey -l "xx.xxxxxx,-xxx.xxxxx" -H my.mapdomain.com --db-type mysql --db-name radar --db-user user --db-pass pass --db-host localhost -P 5000
  3. Yes I have. Everything works and runs properly. The bot works using a non map config and I can view the map and it is tracking and I do not receive any errors in console log.

@k4n30
Copy link
Contributor

k4n30 commented Aug 14, 2016

#3874 has a similar issue, Hosting the bot & map on different servers needs to be investigated further

@mjmadsen
Copy link
Contributor

Still having problems with this?

@mjmadsen
Copy link
Contributor

Closing as we haven't heard anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants