EvenAR / node-simconnect

A cross platform SimConnect client library for Node.JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing HKCU registry value

RobsonMi opened this issue · comments

When starting 3.0.1-3.0.4 version I am getting this error:
Zrzut ekranu 2022-09-28 233517

It still connects to sim (MSFS Steam in this case) but why would it need to check SimConnect port in registry?

why would it need to check SimConnect port in registry?

In case it's not on the default port. So it's trying to determine automatically the port.

Any way I can catch the error thrown in Utils.ts at line 21?
throw Error(`Failed to read registry value ${FS_KEY} (${err})`);

In lieu of a "module fix to make it graceful catch"

process.on('uncaughtException', err => {
    console.error('uncaughtException', err);
});

might catch it, if the log is saying it's a uncaught exception

That's not graceful at all. No idea what's the best solution here but surely not that error message ;) Maybe simple console.error with info that default will be used?

This should have been fixed now in v3.0.5 (thanks for the PR @RobsonMi)