Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Jul 5, 2022 · 4 comments

Comments

@juggledad
Copy link
Contributor

juggledad commented Jul 5, 2022

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.

@juggledad juggledad changed the title NR 3.0.0.-beta-4 - keeps getting UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'jdsatepoch' of undefined NR 2.2.2 thru NR 3.0.0.-beta-4 - keeps getting UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'jdsatepoch' of undefined Jul 5, 2022
@carlesfernandez
Copy link

Same for NR 3.0.0 Milestone Release

@stefets
Copy link

stefets commented Jul 23, 2022

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
Copy link
Collaborator

dceejay commented Jul 24, 2022

fix applied in v0.7.5

@carlesfernandez
Copy link

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] 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants