Git Product home page Git Product logo

pokemon-go-node-api's People

Contributors

armax avatar awk34 avatar bart-0110 avatar d-pollard avatar fidian avatar havrylenkok avatar jdpnielsen avatar jimmywarting avatar tuxer2299 avatar wain-pc avatar xbytez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pokemon-go-node-api's Issues

Random -> TypeError: Cannot read property 'username' of null

Sometimes I'm getting this:

[i] Received Google access token! {Expires: 1469838239}
[i] Received API Endpoint: https://pgorelease.nianticlabs.com/plfe/553/rpc
TypeError: Cannot read property 'username' of null
    at api_req.then (/home/fabio/playground/pokemon-go-map/node_modules/pokemon-go-node-api/pokego.js:260:16)
    at process._tickCallback (internal/process/next_tick.js:103:7)

Errors on Examples

Hey guys,

Tried to run the examples, and im getting errors on MOST of them. So, lets go one at a time. I tried the examples with default location with my login info.

it crashes like this (ill remove some sensitive info)
ExampleFort

<MY_DIR>\Pokemon-GO-node-api>node exampleFort.js
[i] Logging with user: <MY_USER>
[i] Session token: <MY_USER_TOKEN>
[i] Received PTC access token! {Expires: 10800}
[i] Received API Endpoint: https://pgorelease.nianticlabs.com/plfe/352/rpc
[i] Current location: Time Square
[i] lat/long/alt: : 42.4907071 -76.2979782 0
[i] Logged in!
[i] Username: <MY_USER>
[i] Poke Storage: 250
[i] Item Storage: 350
[i] Pokecoin: 0
[i] Stardust: 100
[o] pump...
.:Fort is a gym, pass:.
{ result: 2,
  items_awarded: [],
  gems_awarded: null,
  pokemon_data_egg: null,
  experience_awarded: null,
  cooldown_complete_timestamp_ms: null,
  chain_hack_sequence_number: null }
{ result: 2,
  items_awarded: [],
  gems_awarded: null,
  pokemon_data_egg: null,
  experience_awarded: null,
  cooldown_complete_timestamp_ms: null,
  chain_hack_sequence_number: null }
<MY_DIR>\Pokemon-GO-node-api\example
Fort.js:68

                if(b.result === 2) {

                    ^

TypeError: Cannot read property 'result' of undefined
    at <MY_DIR>\Pokemon-GO-node-api\exampleFort.js:68:16
    at <MY_DIR>\Pokemon-GO-node-api\poke.io.js:527:24
    at Request._callback (<MY_DIR>\Pokemon-GO-node-api\poke.io.js:188:18)
    at Request.self.callback (<MY_DIR>\Pokemon-GO-node-api\node_modules\request\request.js:187:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (<MY_DIR>\Pokemon-GO-node-api\node_modules\request\request.js:1044:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (<MY_DIR>\Pokemon-GO-node-api\node_modules\request\request.js:965:12)

when i run the example.js, i get this:

Encountering pokemon Pidgey...
Attempting to catch now...
<MY_DIR>\Pokemon-GO-node-api\node_modu
les\protobufjs\dist\protobuf.js:2938
                        throw(e);
                        ^

Error: Missing at least one required field for Message .ResponseEnvelop
.CatchPokemonResponse: Status

examplestats:

<MY_DIR>\Pokemon-GO-node-api\node_modu
les\bytebuffer\dist\bytebuffer-node.js:346
            throw TypeError("Illegal buffer");
            ^

TypeError: Illegal buffer

Any ideas?

Getting stuck after received access token

Running any of the examples to test with, using either PTC or Google get stuck after receiving the access token -

[i] Logging with user: *********
[i] Session token: *************************
[i] Received PTC access token! {Expires: 10800}

The script then hangs here with no further progress.

I appreciate that the unknown6 patch is still new.
Thanks

Error Thrown When Running Examples During Heartbeat

Hey, can you shed some light on this please?
When running pokeio examples this error is thrown.


/home/ubuntu/workspace/node_modules/pokemon-go-node-api/node_modules/protobufjs/dist/protobuf.js:1801
                throw Error("Illegal value for "+self.toString(true)+" of type "+self.type.name+": "+val+" ("+msg+")");
                ^

Error: Illegal value for [object Object] of type uint64: object (not convertible to Long)
    at Error (native)
    at fail (/home/ubuntu/workspace/node_modules/pokemon-go-node-api/node_modules/protobufjs/dist/protobuf.js:1801:23)
    at ProtoBuf.Reflect.ElementPrototype.verifyValue (/home/ubuntu/workspace/node_modules/pokemon-go-node-api/node_modules/protobufjs/dist/protobuf.js:1841:29)
    at ProtoBuf.Reflect.FieldPrototype.verifyValue (/home/ubuntu/workspace/node_modules/pokemon-go-node-api/node_modules/protobufjs/dist/protobuf.js:3455:43)
    at MessagePrototype.set (/home/ubuntu/workspace/node_modules/pokemon-go-node-api/node_modules/protobufjs/dist/protobuf.js:2475:59)
    at MessagePrototype.set (/home/ubuntu/workspace/node_modules/pokemon-go-node-api/node_modules/protobufjs/dist/protobuf.js:2466:38)
    at Message (/home/ubuntu/workspace/node_modules/pokemon-go-node-api/node_modules/protobufjs/dist/protobuf.js:2395:34)
    at Pokeio.self.Heartbeat (/home/ubuntu/workspace/node_modules/pokemon-go-node-api/poke.io.js:256:24)
    at null._repeat (/home/ubuntu/workspace/Pokemon-GO-node-api/exampleFort.js:40:11)
    at wrapper [as _onTimeout] (timers.js:275:11)

When Running pokego examples, I get

/home/ubuntu/workspace/Pokemon-GO-node-api/pokego.js:22
const {RequestEnvelop, ResponseEnvelop} = pokemonProto;
      ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/ubuntu/workspace/Pokemon-GO-node-api/ExampleInventory.js:12:14)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

Error in exampleFort.js (Fix Included)

There are 2 nested loops in exampleFort.js -

...
for (var i = hb.cells.length - 1; i >= 0; i--) {
        // console.log(hb.cells[i])
        console.log(i)
        if(hb.cells[i].Fort) {
            var currentFortArr = hb.cells[i].Fort;
            for (var i = currentFortArr.length - 1; i >= 0; i--) {
                var currentFort = currentFortArr[i];
...

The outer for loop will only iterate once due to the reuse of "i" as a loop variable. Please change this to something else to fix. Thanks :)

Example.

...
for (var i = hb.cells.length - 1; i >= 0; i--) {
        // console.log(hb.cells[i])
        console.log(i)
        if(hb.cells[i].Fort) {
            var currentFortArr = hb.cells[i].Fort;
            for (var j = currentFortArr.length - 1; j >= 0; j--) {
                    var currentFort = currentFortArr[j];
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.