canonn-science / CAPIv2-Updater

Nodejs based tool to update the Canonn API with planetary and stellar data from EDSM
GNU General Public License v3.0
1 stars 0 forks source link

Bug while running build updateAll #10

Closed derrickmehaffy closed 5 years ago

derrickmehaffy commented 5 years ago
[1225/1255] ~~ Updating WREGOE QD-K D8-37: 1 bodies
 > [EDSM] Fetching... WREGOE QD-K D8-37
 < [EDSM] Ok...
(node:6248) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'forEach' of undefined
    at /nixstorage/Github/capi/Canonn-EDSM-Updater/build/updater.js:137:15
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:6248) 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: 1)
(node:6248) [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.

Caused the update to force stop, seems like an error only in the build as running npm run updateAll:dev works fine

derrickmehaffy commented 5 years ago

@coldwhitelight this was the error I hit yesterday and skipped over.

coldwhitelight commented 5 years ago

Please check it again with #12

derrickmehaffy commented 5 years ago

Was able to hit it again, I'm wondering if it is an issue with that system name, was able to hit it twice on localhost update:

Waiting 1000ms...

[130/600] ~~ Updating PLEIADES SECTOR IR-W D1-55: 4 bodies

[EDSM] Fetching... PLEIADES SECTOR IR-W D1-55 < [EDSM] Ok... (node:22824) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'forEach' of undefined at /media/nixstorage/github/canonn/Canonn-EDSM-Updater/src/updater.js:131:15 at process._tickCallback (internal/process/next_tick.js:68:7) (node:22824) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either bythrowing inside of an async function without a catch block, or by rejecting a promise which was not handledwith .catch(). (rejection id: 1) (node:22824) [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. [nodemon] clean exit - waiting for changes before restart

derrickmehaffy commented 5 years ago

Here are the bodies in the DB related to that system:

[
    {
        "id": 979,
        "system": {
            "id": 1118,
            "systemName": "PLEIADES SECTOR IR-W D1-55",
            "id64": null,
            "edsmID": null,
            "edsmCoordX": null,
            "edsmCoordY": null,
            "edsmCoordZ": null,
            "edsmCoordLocked": false,
            "missingSkipCount": null,
            "created_at": "2018-12-24T00:09:18.000Z",
            "updated_at": "2018-12-24T00:09:18.000Z"
        },
        "bodyName": "PLEIADES SECTOR IR-W D1-55 1",
        "id64": null,
        "edsmID": null,
        "bodyID": null,
        "type": null,
        "subType": null,
        "offset": null,
        "distanceToArrival": null,
        "isMainStar": false,
        "isScoopable": false,
        "isLandable": false,
        "age": null,
        "luminosity": null,
        "absoluteMagnitude": null,
        "solarMasses": null,
        "solarRadius": null,
        "gravity": null,
        "earthMasses": null,
        "radius": null,
        "surfaceTemperature": null,
        "surfacePressure": null,
        "volcanismType": null,
        "atmosphereType": null,
        "terraformingState": null,
        "orbitalPeriod": null,
        "semiMajorAxis": null,
        "orbitalEccentricity": null,
        "orbitalInclination": null,
        "argOfPeriapsis": null,
        "rotationalPeriod": null,
        "rotationalPeriodTidallyLocked": false,
        "axialTilt": null,
        "solidComposition": null,
        "atmosphere": null,
        "material": null,
        "missingSkipCount": null,
        "created_at": "2018-12-24T00:00:50.000Z",
        "updated_at": "2018-12-24T00:00:50.000Z",
        "rings": []
    },
    {
        "id": 980,
        "system": {
            "id": 1118,
            "systemName": "PLEIADES SECTOR IR-W D1-55",
            "id64": null,
            "edsmID": null,
            "edsmCoordX": null,
            "edsmCoordY": null,
            "edsmCoordZ": null,
            "edsmCoordLocked": false,
            "missingSkipCount": null,
            "created_at": "2018-12-24T00:09:18.000Z",
            "updated_at": "2018-12-24T00:09:18.000Z"
        },
        "bodyName": "PLEIADES SECTOR IR-W D1-55 2 B",
        "id64": null,
        "edsmID": null,
        "bodyID": null,
        "type": null,
        "subType": null,
        "offset": null,
        "distanceToArrival": null,
        "isMainStar": false,
        "isScoopable": false,
        "isLandable": false,
        "age": null,
        "luminosity": null,
        "absoluteMagnitude": null,
        "solarMasses": null,
        "solarRadius": null,
        "gravity": null,
        "earthMasses": null,
        "radius": null,
        "surfaceTemperature": null,
        "surfacePressure": null,
        "volcanismType": null,
        "atmosphereType": null,
        "terraformingState": null,
        "orbitalPeriod": null,
        "semiMajorAxis": null,
        "orbitalEccentricity": null,
        "orbitalInclination": null,
        "argOfPeriapsis": null,
        "rotationalPeriod": null,
        "rotationalPeriodTidallyLocked": false,
        "axialTilt": null,
        "solidComposition": null,
        "atmosphere": null,
        "material": null,
        "missingSkipCount": null,
        "created_at": "2018-12-24T00:00:50.000Z",
        "updated_at": "2018-12-24T00:00:50.000Z",
        "rings": []
    },
    {
        "id": 981,
        "system": {
            "id": 1118,
            "systemName": "PLEIADES SECTOR IR-W D1-55",
            "id64": null,
            "edsmID": null,
            "edsmCoordX": null,
            "edsmCoordY": null,
            "edsmCoordZ": null,
            "edsmCoordLocked": false,
            "missingSkipCount": null,
            "created_at": "2018-12-24T00:09:18.000Z",
            "updated_at": "2018-12-24T00:09:18.000Z"
        },
        "bodyName": "PLEIADES SECTOR IR-W D1-55 4 A",
        "id64": null,
        "edsmID": null,
        "bodyID": null,
        "type": null,
        "subType": null,
        "offset": null,
        "distanceToArrival": null,
        "isMainStar": false,
        "isScoopable": false,
        "isLandable": false,
        "age": null,
        "luminosity": null,
        "absoluteMagnitude": null,
        "solarMasses": null,
        "solarRadius": null,
        "gravity": null,
        "earthMasses": null,
        "radius": null,
        "surfaceTemperature": null,
        "surfacePressure": null,
        "volcanismType": null,
        "atmosphereType": null,
        "terraformingState": null,
        "orbitalPeriod": null,
        "semiMajorAxis": null,
        "orbitalEccentricity": null,
        "orbitalInclination": null,
        "argOfPeriapsis": null,
        "rotationalPeriod": null,
        "rotationalPeriodTidallyLocked": false,
        "axialTilt": null,
        "solidComposition": null,
        "atmosphere": null,
        "material": null,
        "missingSkipCount": null,
        "created_at": "2018-12-24T00:00:50.000Z",
        "updated_at": "2018-12-24T00:00:50.000Z",
        "rings": []
    },
    {
        "id": 982,
        "system": {
            "id": 1118,
            "systemName": "PLEIADES SECTOR IR-W D1-55",
            "id64": null,
            "edsmID": null,
            "edsmCoordX": null,
            "edsmCoordY": null,
            "edsmCoordZ": null,
            "edsmCoordLocked": false,
            "missingSkipCount": null,
            "created_at": "2018-12-24T00:09:18.000Z",
            "updated_at": "2018-12-24T00:09:18.000Z"
        },
        "bodyName": "PLEIADES SECTOR IR-W D1-55 5 A",
        "id64": null,
        "edsmID": null,
        "bodyID": null,
        "type": null,
        "subType": null,
        "offset": null,
        "distanceToArrival": null,
        "isMainStar": false,
        "isScoopable": false,
        "isLandable": false,
        "age": null,
        "luminosity": null,
        "absoluteMagnitude": null,
        "solarMasses": null,
        "solarRadius": null,
        "gravity": null,
        "earthMasses": null,
        "radius": null,
        "surfaceTemperature": null,
        "surfacePressure": null,
        "volcanismType": null,
        "atmosphereType": null,
        "terraformingState": null,
        "orbitalPeriod": null,
        "semiMajorAxis": null,
        "orbitalEccentricity": null,
        "orbitalInclination": null,
        "argOfPeriapsis": null,
        "rotationalPeriod": null,
        "rotationalPeriodTidallyLocked": false,
        "axialTilt": null,
        "solidComposition": null,
        "atmosphere": null,
        "material": null,
        "missingSkipCount": null,
        "created_at": "2018-12-24T00:00:50.000Z",
        "updated_at": "2018-12-24T00:00:50.000Z",
        "rings": []
    }
]
derrickmehaffy commented 5 years ago

Ahhh here we go:

image

https://www.edsm.net/en/system/id/22205/name/Pleiades+Sector+IR-W+d1-55

derrickmehaffy commented 5 years ago

Changing the system name in the DB fixed it. Marking this as closed for now we will have to work on better error handling later.