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

client.js return res.data.payload.remoteStatus === 0 causing a TypeError #9

Open
asabatino88 opened this issue Mar 4, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@asabatino88
Copy link

Describe The Bug:
Homebridge is giving a SIGTERM error as follows when executing a command.

�[31m at KiaConnect.getTransactionStatus (/usr/local/lib/node_modules/homebridge-kia-connect/src/kiaconnect/client.ts:55:29)�[39m
�[31m at processTicksAndRejections (node:internal/process/task_queues:95:5)�[39m
�[37m[3/3/2024, 6:14:25 PM] �[39mGot SIGTERM, shutting down Homebridge...
�[37m[3/3/2024, 6:14:27 PM] �[39m�[31mTypeError: Cannot read properties of null (reading 'remoteStatus')�[39m
�[31m at KiaConnect.getTransactionStatus (/usr/local/lib/node_modules/homebridge-kia-connect/src/kiaconnect/client.ts:55:29)�[39m
�[31m at processTicksAndRejections (node:internal/process/task_queues:95:5)�[39m

I was able to stop this from happening by commenting out the following code from the client.js. Not sure exactly what this code is trying to do, but appears it's pulling in a null value for some reason (KIA Access was down the past few days, perhaps they changed something on their end).

// If the transaction is no longer being remotely executed...
return res.data.payload.remoteStatus === 0;

Again, commenting out return res.data.payload.remoteStatus === 0; seems to fix the problem. Not sure what other problems it will introduce, but time will tell.

@asabatino88 asabatino88 added the bug Something isn't working label Mar 4, 2024
@johnsills1
Copy link

There was an outage on Kia Connect’s side. I bet if you retry your connection, it’s probably back up now.

@huttotw
Copy link
Owner

huttotw commented Mar 13, 2024

@asabatino88 this does seem like an intermitent issue like @johnsills1 mentioned. Have you experienced this recently? If not, will close to clean up some of these issues.

@asabatino88
Copy link
Author

asabatino88 commented Mar 14, 2024

I completely commented out the line of code that was erroring out in my prior post. I've not noticed any issues with doing so. What is it actually doing?

I will note, my investigation around all of this was due to Kia's servers experiencing an outage a few weekends ago. This outage was making your plugin error out, and then Homebridge got a SIGTERM command and was loop rebooting Homebridge. So all of my Homebridge devices were going offline and back online in a perpetual cycle.

If there is a way to introduce some logic into the plugin where the API call doesn't kill home bridge, that would be a major win in your next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants