PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

Map not functioning

Open K4DiR opened this issue 10 years ago • 22 comments

Expected Behavior

The Bot is working fine. But if i start SimplyHTTPServer. Came an Error.

Actual Behavior

Serving HTTP on 0.0.0.0 port 8000 ... 127.0.0.1 - - [28/Jul/2016 23:02:42] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [28/Jul/2016 23:02:42] "GET /css/main.css HTTP/1.1" 200 - 127.0.0.1 - - [28/Jul/2016 23:02:42] code 404, message File not found 127.0.0.1 - - [28/Jul/2016 23:02:42] "GET /config/userdata.js HTTP/1.1" 404 - 127.0.0.1 - - [28/Jul/2016 23:02:42] "GET /js/main.js HTTP/1.1" 200 - 127.0.0.1 - - [28/Jul/2016 23:02:42] code 404, message File not found 127.0.0.1 - - [28/Jul/2016 23:02:42] "GET /config/userdata.js HTTP/1.1" 404 -

Steps to Reproduce

  1. Run Bot
  2. Run SimplyHTTPServer

Other Information

OS: Mac OSX 10.11.5

K4DiR avatar Jul 28 '16 21:07 K4DiR

Make sure you've set /config/userdata.js, it will work

fe-ax avatar Jul 28 '16 21:07 fe-ax

looks like you don't have the file userdata.js, try re-running:

git submodule init
git submodule update

VictorChen avatar Jul 28 '16 21:07 VictorChen

The newest version of the WebIF has a config folder and some changes in the userdata.js.. just rename the config/userdata.js.example and put in your trainer-name and api-key.

But there are some other errors with the newest version:

socket.io-1.4.5.js:1 GET http://MyHost:MyPort/socket.io/?EIO=3&transport=polling&t=LOpUoZJ 404 (Not Found)

main.js:615 Uncaught TypeError: Cannot read property 'Name' of undefined http://MyHost:MyPort/location-TrainerName.json?1469742163618

Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH main.js:615

Also the Pokedex doesn't work and the amount of candy is always "undefined"

lennart24 avatar Jul 28 '16 21:07 lennart24

thanks the terminal works fine but yet if i open localhost:8000 the browser show me the map for a second then came a error that googlemaps cant load correctly :S tecnical deteils can i see on the java skript window.

K4DiR avatar Jul 28 '16 21:07 K4DiR

did you include google maps' api key in userdata.js?

ex: https://github.com/OpenPoGo/OpenPoGoWeb/blob/83463c2bcd5c4360adbc41c61e6572406fec54ce/userdata.js.example#L7

VictorChen avatar Jul 28 '16 22:07 VictorChen

yes, but must the api key in the config.json the same key, as the key in the userdata.js? because i have different key in the config.json and in the userdata.js.

K4DiR avatar Jul 28 '16 22:07 K4DiR

shouldn't matter

VictorChen avatar Jul 28 '16 22:07 VictorChen

what are the errors?

VictorChen avatar Jul 28 '16 22:07 VictorChen

Same error. Both my API's are the same, but the web server is searching for files associated with the username on the API, my PkGO username is different....

RedViper9 avatar Jul 28 '16 22:07 RedViper9

did you use the new userdata.js.example or just copied the old? Because there were some changes:

var users = ["username"]; var userZoom = true; var userFollow = true; var imageExt = ".png"; var gMapsAPIKey = "YOUR_API_KEY_HERE";

changed to

var userInfo = { users: ["username"], userZoom: true, zoom: 16, userFollow: true, gMapsAPIKey: "YOUR_API_KEY_HERE" };

lennart24 avatar Jul 28 '16 22:07 lennart24

does it work if you change the username in userdata.js so that it matches?

VictorChen avatar Jul 28 '16 22:07 VictorChen

This Error is coming in the browser if i open localhost:8000 Oops! An error has occurred. Google Maps was not loaded properly on this page . Technical details to you entnimmst the JavaScript Console .

K4DiR avatar Jul 28 '16 22:07 K4DiR

After Ced4's comment, I wiped the whole install and reinstalled (DEV) New web folder contains update.js.example that matches formatting of the previous version.

var users = ["username"]; var userZoom = true; var userFollow = true; var imageExt = ".png"; var gMapsAPIKey = "YOUR_API_KEY_HERE";

Will try your new version.


My username matches in both config.json and userdata.js; however, the API is registered under a different username and that alternate username seems to be what the servers is looking for.

RedViper9 avatar Jul 28 '16 22:07 RedViper9

Ok, I downloaded what is apparently the new version of the web viewer from the OpenPoGoBot fork. This contains the proper userdata.js file.

Now the server seems to load; however, when I try to connect to the server, I only see the contents of the data directory.

RedViper9 avatar Jul 29 '16 00:07 RedViper9

don't think you downloaded it correctly, sounds like you're missing index.html

VictorChen avatar Jul 29 '16 00:07 VictorChen

I had index.html in the web folder. Copied to every subfolder just in case. I now get a screen with Settings, Submenu, Logs, but no map of any sort.

It does seem that I'm having trouble installing this thing. How do you do it? I originally did git submodule init git submodule update

but this gave me the older version.

Using "git submodule foreach git pull origin master" does nothing.

RedViper9 avatar Jul 29 '16 00:07 RedViper9

does the old version not work?

VictorChen avatar Jul 29 '16 01:07 VictorChen

Nope. I've now gotten it to show me the map and overlay parts of the UI, but it does not see my location.

RedViper9 avatar Jul 29 '16 04:07 RedViper9

@K4DiR your API is not setup correctly, you need to add Java to your Google maps API for the map to function properly. @RedViper9 I've had a couple of problems with the map, the best solution I found was to delete the whole web folder, pull again using git submodule init git submodule update

Update the userdata.js again then add two blank notepad files called "catchable-username.json" and "location-username.json"

Also - after running the map and erroring or closing, it seems to stay open on the port for a short while afterwards, so change port to start a new session.

Nemahh avatar Jul 29 '16 04:07 Nemahh

Since this is not a bot issue i'll close this issue. You can still comment and discuss here though.

tstumm avatar Jul 29 '16 11:07 tstumm