pokemongo-dev-contrib / pokemongo-json-pokedex

Transform the data from the Pokemon GO master files to a better readable & processable JSON file.
Apache License 2.0
54 stars 14 forks source link

Doesn't work with latest Gamemaster #41

Closed Sil3ntStorm closed 5 years ago

Sil3ntStorm commented 5 years ago

Using docker building manually from current master, then running it produces the following errors:


i Using GAME_MASTER version 1540779412719

✘ Error while writing Pokemons:
TypeError: Cannot read property 'templateId' of undefined
    at Object.exports.TemplateIdToId (/var/lib/pokemongo-json-pokedex/src/processing/pokemon/components/shared/templateIdToId.ts:8:28)
    at /var/lib/pokemongo-json-pokedex/src/processing/pokemon/components/evolution/futureBranches.ts:88:44
    at Array.map (<anonymous>)
    at FutureBranches.GetFutureBranches (/var/lib/pokemongo-json-pokedex/src/processing/pokemon/components/evolution/futureBranches.ts:87:31)
    at /var/lib/pokemongo-json-pokedex/src/processing/pokemon/components/evolution/futureBranches.ts:98:53
    at Array.map (<anonymous>)
    at FutureBranches.Process (/var/lib/pokemongo-json-pokedex/src/processing/pokemon/components/evolution/futureBranches.ts:96:25)
    at /var/lib/pokemongo-json-pokedex/src/core/pipeline/pipeline.ts:88:40
    at new Promise (<anonymous>)
    at PokemonPipeline.<anonymous> (/var/lib/pokemongo-json-pokedex/src/core/pipeline/pipeline.ts:83:12)
✘ Error while writing Pokemon Translations:
TypeError: Cannot read property 'length' of undefined
    at Object.exports.forEachSeries (/var/lib/pokemongo-json-pokedex/node_modules/p-iteration/lib/static-methods.js:32:29)
    at PokemonLocalesPipeline.<anonymous> (/var/lib/pokemongo-json-pokedex/src/core/pipeline/localePipeline.ts:62:15)
    at step (/var/lib/pokemongo-json-pokedex/src/core/pipeline/localePipeline.ts:32:23)
    at Object.next (/var/lib/pokemongo-json-pokedex/src/core/pipeline/localePipeline.ts:13:53)
    at /var/lib/pokemongo-json-pokedex/src/core/pipeline/localePipeline.ts:7:71
    at new Promise (<anonymous>)
    at __awaiter (/var/lib/pokemongo-json-pokedex/src/core/pipeline/localePipeline.ts:3:12)
    at PokemonLocalesPipeline.LocalesPipeline.getLocaleByName (/var/lib/pokemongo-json-pokedex/src/core/pipeline/localePipeline.ts:85:16)
    at Object.<anonymous> (/var/lib/pokemongo-json-pokedex/src/core/pipeline/localePipeline.ts:70:59)
    at Object.exports.mapSeries (/var/lib/pokemongo-json-pokedex/node_modules/p-iteration/lib/static-methods.js:73:34)
(node:27) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined
    at Object.exports.forEachSeries (/var/lib/pokemongo-json-pokedex/node_modules/p-iteration/lib/static-methods.js:32:29)
    at Object.<anonymous> (/var/lib/pokemongo-json-pokedex/src/app.ts:55:5)
    at step (/var/lib/pokemongo-json-pokedex/src/app.ts:32:23)
    at Object.throw (/var/lib/pokemongo-json-pokedex/src/app.ts:13:53)
    at rejected (/var/lib/pokemongo-json-pokedex/src/app.ts:5:65)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)
    at Function.Module.runMain (module.js:705:11)
    at Object.<anonymous> (/var/lib/pokemongo-json-pokedex/node_modules/ts-node/src/_bin.ts:177:12)
    at Module._compile (module.js:662:30)
(node:27) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)
(node:27) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
Drexlin commented 5 years ago

I got the same error. Is any body working on this @BrunnerLivio ? I rely on this repo to update my database.

BrunnerLivio commented 5 years ago

I am currently super busy. Do not know when I have time for this. I highly encourage you to fix it your self though. Otherwise you'll have to wait earliest mid next week.

Drexlin commented 5 years ago

I apologize, I wrote that message in haste. I'm just a little frustrated. I appreciate the work that you guys put into this repo and did not mean it to sound like I don't.

I can of course try to take a look at this, but I'm not really familiar with the code. It would probably take me until next week to even figure it out.

BrunnerLivio commented 5 years ago

@Drexlin Do not worry, I did not pick it up badly :) I agree, as a good maintainer I should look into these kinds of things, but handling a full time job and several Github repositories I contribute to is not easy and really time consuming. I still want to have some free time :tada:

Your choice whether you wait for me to fix it, or do it yourself...

Sil3ntStorm commented 5 years ago

would certainly try, but I don't have the slightest idea how this stuff works, and so far any attempts have failed to even get it running with debug in VS Code. First it complains about a bunch of files being there, which are apparently magically generated somehow on each debug session (and have to be deleted), then it complains about not finding things for no apparent reason...

Guess I'll have to wait for someone that understands the magic to find some time to fix this.

haynesherway commented 5 years ago

I was trying to look into it as well, and was able to get the first error to go away by adding a check for undefined, but then just got an error for something else that was undefined. It appears that objects are being used without checking that they are initialized?

BrunnerLivio commented 5 years ago

Currently working on #43.

Got interrupted again, can not do it today, but at least there is a pokemon.json file being generated. But did not update any tests, nor the translation files are updated..

haynesherway commented 5 years ago

I snagged the pokemon.json file from your commit, and that seems to work in my app at least, so thank you for getting that done @BrunnerLivio !

Drexlin commented 5 years ago

Thanks @BrunnerLivio , I was able to use the new pokemon.json as well.

I was able to make some progress on the issue however. I'm not sure if the issue is with this repo or the gamemaster repo. Cherubi's evolution branch look like the following:

      "evolutionBranch": [{
        "evolution": "CHERRIM",
        "candyCost": 50,
        "form": "CHERRIM_OVERCAST"
      }, {
        "evolution": "CHERRIM",
        "candyCost": 50,
        "form": "CHERRIM_SUNNY"
      }, {
        "candyCost": 50
      }, {
        "candyCost": 50
      }],

The last 2 entries are not needed, not sure why they are there. But if you remove them, the resulting gamemaster file works fine. Hope this helps!

BrunnerLivio commented 5 years ago

@Drexlin exactly, that is what caused the error obviously. I’ll investigate further into this, maybe the game master data itself was corrupted..

BrunnerLivio commented 5 years ago

Seems like the Pokemon GO translation assets are not updated yet. See issue here. I want to wait until it is released, before I merge #43