gallexme / pokemongo-api

22 stars 8 forks source link

TypeError: Cannot read property 'push' of null #9

Closed uzaif313 closed 8 years ago

uzaif313 commented 8 years ago

I got this when i am running test example node example-es5/example.js

st0ffern commented 8 years ago

it is ES6 you should either run it throu babel-node or compile it until nodejs supports ES6

uzaif313 commented 8 years ago

i compile it with package.json script tag which mention like npm run compile

st0ffern commented 8 years ago

compile-example

uzaif313 commented 8 years ago

yes it generated new folder named as example-es5

marcelaraujo commented 8 years ago

@stoffern

var res = this.signatureBuilder.encrypt(req, (err, sigEncrypted) => {

        console.log(data) //data.unknown6 is null

        data.unknown6.push(new POGOProtos.Networking.Envelopes.Unknown6({
            request_type: 6,
            unknown2: new POGOProtos.Networking.Envelopes.Unknown6.Unknown2({
                encrypted_signature: sigEncrypted
            })
        }))
      })
st0ffern commented 8 years ago

@marcelaraujo looks like they updated the node-pogo-protos... updated the repo now.. NPM out shortly https://github.com/gallexme/pokemongo-api/commit/5d3047bcee7281128d04f6a0ba6c661f333ae815