-
Notifications
You must be signed in to change notification settings - Fork 23
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
Invalid account credentials crashes homebridge #116
Comments
Hi Tim, Agreed, but what do you think the plugin should do when we encounter fatal errors? Do you think a red line warning in the log is enough? Also, I'm guessing the error here is that login failed due to missing MFA but could you please confirm? |
Yeah. It could fail gracefully -- handle the error, report on it and not crash homebridge :) Then retry. Other plugins do this. It just needs better error handling here. Looks like a server side error, not related to config. The API seems to fail sometimes, crash homebridge, then they recover and everything continues on. |
I'm not sure if this is applicable, something new the myQ plugin is doing to add even more failure handling... [9/20/2023, 12:03:58 PM] [myQ] myQ API: Switched to myQ cloud region: west. They have multiple API endpoints, east and west. The plugin sees a failure and switches the API endpoint used, continues on. In this case it has helped a lot, but it's also how myQ has built their infra. Bit of extra effort to keep the plugin rolling. Maybe alarm.com has different options. |
Just pushed up some code to the beta branch which will stop homebridge crashing the getAccountSettings() method fails. |
Cool, I’ve updated!
… On Oct 19, 2023, at 4:43 PM, Chase Lau ***@***.***> wrote:
Just pushed up some code to the beta branch which will stop homebridge crashing the getAccountSettings() method fails.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Fixed in b7736ea |
Describe the bug
Alarm.com threw an error and the plugin crashed Homebridge entirely. Requires better error handling.
To Reproduce
[9/18/2023, 9:18:48 AM] Error: GET https://www.alarm.com/web/api/identities failed: GET https://www.alarm.com/web/api/identities failed: [object Object]
at /usr/local/lib/node_modules/homebridge-node-alarm-dot-com/node_modules/node-alarm-dot-com/dist/index.js:150:15
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at getIdentitiesState (/usr/local/lib/node_modules/homebridge-node-alarm-dot-com/node_modules/node-alarm-dot-com/dist/index.js:134:12)
at ADCPlatform.getAccountSettings (/usr/local/lib/node_modules/homebridge-node-alarm-dot-com/src/index.ts:378:24)
at ADCPlatform.refreshDevices (/usr/local/lib/node_modules/homebridge-node-alarm-dot-com/src/index.ts:392:5)
[9/18/2023, 9:18:48 AM] Got SIGTERM, shutting down Homebridge...
The text was updated successfully, but these errors were encountered: