joepavitt / node-red-satellites

A web map app for Node-RED to put blobs on
Apache License 2.0
9 stars 12 forks source link

NR 2.2.2 thru NR 3.0.0.-beta-4 - keeps getting UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'jdsatepoch' of undefined #15

Open juggledad opened 2 years ago

juggledad commented 2 years ago

Device: Mac mini (M1, 2020) OS: macOS Montery v13.3.1 Node-RED version: v3.0.0-beta.4 Node.js version: v14.16.0

Startup log: Paul@PaulsM1 .node-red % node-red
5 Jul 16:55:59 - [info]

Welcome to Node-RED

5 Jul 16:55:59 - [info] Node-RED version: v3.0.0-beta.4 5 Jul 16:55:59 - [info] Node.js version: v14.16.0 5 Jul 16:55:59 - [info] Darwin 21.4.0 x64 LE 5 Jul 16:55:59 - [info] Loading palette nodes 5 Jul 16:56:00 - [info] Worldmap version 2.28.3 5 Jul 16:56:00 - [info] Dashboard version 3.1.7 started at /ui 5 Jul 16:56:00 - [warn] rpi-gpio : Raspberry Pi specific node set inactive 5 Jul 16:56:00 - [info] Settings file : /Users/Paul/.node-red/settings.js 5 Jul 16:56:00 - [info] HTTP Static : /Users/Paul/node-red-static > / 5 Jul 16:56:00 - [info] Context store : 'default' [module=localfilesystem] 5 Jul 16:56:00 - [info] Context store : 'memory' [module=memory] 5 Jul 16:56:00 - [info] User directory : /Users/Paul/.node-red 5 Jul 16:56:00 - [info] Projects directory: /Users/Paul/.node-red/projects 5 Jul 16:56:01 - [info] Server now running at http://127.0.0.1:1880/ 5 Jul 16:56:01 - [info] Active project : ISS-satellite 5 Jul 16:56:01 - [info] Flows file : /Users/Paul/.node-red/projects/ISS-satellite/flow.json 5 Jul 16:56:01 - [warn] Using unencrypted credentials 5 Jul 16:56:01 - [info] Starting flows 5 Jul 16:56:01 - [info] [worldmap:5857b34e.13e5dc] started at /worldmap 5 Jul 16:56:01 - [info] Started flows (node:33885) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'jdsatepoch' of undefined at Object.propagate (/Users/Paul/.node-red/node_modules/satellite.js/dist/satellite.js:1889:29) at createSatObject (/Users/Paul/.node-red/node_modules/node-red-contrib-satellites/satellites.js:38:32) at /Users/Paul/.node-red/node_modules/node-red-contrib-satellites/satellites.js:176:38 at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:33885) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:33885) [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. (node:33885) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'jdsatepoch' of undefined at Object.propagate (/Users/Paul/.node-red/node_modules/satellite.js/dist/satellite.js:1889:29) at createSatObject (/Users/Paul/.node-red/node_modules/node-red-contrib-satellites/satellites.js:38:32) at /Users/Paul/.node-red/node_modules/node-red-contrib-satellites/satellites.js:180:45 at Array.forEach () at /Users/Paul/.node-red/node_modules/node-red-contrib-satellites/satellites.js:179:37 at processTicksAndRejections (internal/process/task_queues.js:93:5)

This continues over and over again and no satellite(s) shows on the map.

carlesfernandez commented 2 years ago

Same for NR 3.0.0 Milestone Release

stefets commented 2 years ago

Same for me on my raspberry PI and there is a solution in the issue #14

In satellites.js change .com for .org domain

parseTLEFile('http://www.celestrak.org/NORAD/elements/' + type + '.txt')

dceejay commented 2 years ago

fix applied in v0.7.5

carlesfernandez commented 2 years ago

Still getting the same error in NR 3.0.1 (using v0.7.5):

24 Jul 11:40:36 - [info] Node-RED version: v3.0.1
24 Jul 11:40:36 - [info] Node.js  version: v16.16.0
24 Jul 11:40:36 - [info] Linux 4.4.180+ x64 LE
24 Jul 11:40:39 - [info] Loading palette nodes
24 Jul 11:40:45 - [info] Worldmap version 2.28.3
24 Jul 11:40:45 - [info] Dashboard version 3.1.7 started at /ui
24 Jul 11:40:45 - [info] Settings file  : /data/settings.js
24 Jul 11:40:45 - [info] Context store  : 'default' [module=memory]
24 Jul 11:40:45 - [info] User directory : /data
24 Jul 11:40:45 - [warn] Projects disabled : editorTheme.projects.enabled=false
24 Jul 11:40:45 - [info] Flows file     : /data/flows.json
24 Jul 11:40:45 - [info] Server now running at http://127.0.0.1:1880/
24 Jul 11:40:45 - [warn] 

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

24 Jul 11:40:45 - [info] Starting flows
24 Jul 11:40:45 - [info] [worldmap:GNSS Constellations] started at /gnss-satellites
SockJS v0.3.24 bound to "/earth/socket"
24 Jul 11:40:45 - [info] [worldmap:ISS] started at /iss
24 Jul 11:40:45 - [info] Started flows
24 Jul 11:40:46 - [red] Uncaught Exception:
24 Jul 11:40:46 - [error] TypeError: Cannot read properties of undefined (reading 'jdsatepoch')
    at Object.propagate (/data/node_modules/satellite.js/dist/satellite.js:1889:29)
    at createSatObject (/data/node_modules/node-red-contrib-satellites/satellites.js:38:32)
    at /data/node_modules/node-red-contrib-satellites/satellites.js:180:45
    at Array.forEach (<anonymous>)
    at /data/node_modules/node-red-contrib-satellites/satellites.js:179:37
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
24 Jul 11:40:51 - [info]