Armax / Pokemon-GO-node-api

Pokemon GO api node.js library
MIT License
875 stars 198 forks source link

Example not working: Errors #229

Open syrys opened 7 years ago

syrys commented 7 years ago

Running the basic example.js with username and password and ptovider:ptc. everything else exactly as git.

i get the following error:

...
example.js:59
                        console.log('1[+] There is a ' + pokemon.name + '
at ' + hb.cells[i].NearbyPokemon[0].DistanceMeters.toString() + ' meters')
;

                                                  ^

TypeError: Cannot read property 'toString' of null
    at <MY_DIR>\example.js:59:125
...

Just to test out, i then commented out everything inside the for loop (there is only one obvious one in the example) and added console.log(hb.cells[i].NearbyPokemon); and i get the following:

[ { PokedexNumber: 81,
    DistanceMeters: null,
    EncounterId: Long { low: 755078493, high: 885346464, unsigned: true }
},
  { PokedexNumber: 101,
    DistanceMeters: null,
    EncounterId: Long { low: -1788942931, high: 308582127, unsigned: true
} } ]
[ { PokedexNumber: 66,
    DistanceMeters: null,
    EncounterId: Long { low: 1938543981, high: -1203081808, unsigned: true
 } },
  { PokedexNumber: 81,
    DistanceMeters: null,
    EncounterId: Long { low: -1543255971, high: 2001047967, unsigned: true
 } },
  { PokedexNumber: 21,
    DistanceMeters: null,
    EncounterId: Long { low: -1875834483, high: -1671983217, unsigned: tru
e } },
  { PokedexNumber: 100,
    DistanceMeters: null,
    EncounterId: Long { low: -1560655203, high: -1019824929, unsigned: tru
e } } ]
[ { PokedexNumber: 17,
    DistanceMeters: null,
    EncounterId: Long { low: 1788310525, high: -130755456, unsigned: true
} } ]

Clearly some info are missing here? How do you actually get the pokemon's location from this?

markusz commented 7 years ago

+1 Same problem for me

d-pollard commented 7 years ago

Niantic took this feature out of the game - this was the "foot steps" feature.

andnp commented 7 years ago

Pull request #224 takes care of this issue. Can close this once that merges.