AntoineGS / teams-status-rs

47 stars 0 forks source link

App is gone after standy or hibernation #19

Closed mattg2 closed 3 months ago

mattg2 commented 3 months ago

Have version 0.3.0 running and it is great.

But since the 1st version, team_status closing and gone after every standby or hibernation cycle of the laptop. Nothing to see in the log: 2024-03-11T17:13:09.216801700+01:00 ERROR teams_status::teams::api - Failed to send mqtt requests to eventloop 2024-03-11T17:13:09.216851100+01:00 ERROR teams_status::teams::api - Failed to send mqtt requests to eventloop 2024-03-12T09:06:58.358949500+01:00 INFO teams_status - -------------------- 2024-03-12T09:06:58.360173+01:00 INFO teams_status - Application starting 2024-03-12T09:06:58.478637100+01:00 INFO teams_status::teams::api - {"requestId":0,"response":"Success"}

Nothing to see in the systemlog also.

I am running only MQTT and no HA.

AntoineGS commented 3 months ago

Hmm this should not happen, but I have only tested this using the HA integration so I will run some tests using MQTT to see if it behaves differently!

AntoineGS commented 3 months ago

I tested with the MQTT integration to hibernate and put my computer to sleep and it recovered fine afterwards. I created a version with additional logging when the application panics (crashes), it might help locate the issue. You can find it here: https://github.com/AntoineGS/teams-status-rs/releases/tag/v0.4.0 After it crashed it should have new entries in the output.txt file.

mattg2 commented 3 months ago

Thank you for the new version. I think my observation was wrong. App is still there the last days, also after standby and hibernation. But the app seemed to be freezed.

With the additional logging, I can see, that the app is working, but is unable to reconnect to the mqtt broker.

2024-03-15T08:26:09.029410900+01:00  ERROR teams_status::teams::api - Failed to send mqtt requests to eventloop
2024-03-15T08:26:09.029411+01:00     ERROR teams_status::teams::api - Failed to send mqtt requests to eventloop
2024-03-15T08:26:09.029410900+01:00  ERROR teams_status::teams::api - Failed to send mqtt requests to eventloop
2024-03-15T08:26:09.354024900+01:00  INFO teams_status::teams::api - {"meetingUpdate":{"meetingState":{"isMuted":false,"isVideoOn":false,"isHandRaised":false,"isInMeeting":true,"isRecordingOn":false,"isBackgroundBlurred":false,"isSharing":false,"hasUnreadMessages":false},"meetingPermissions":{"canToggleMute":true,"canToggleVideo":true,"canToggleHand":true,"canToggleBlur":false,"canLeave":true,"canReact":true,"canToggleShareTray":true,"canToggleChat":true,"canStopSharing":false,"canPair":false}}}
.
.
.
2024-03-15T08:26:09.572141500+01:00  INFO teams_status::teams::api - {"meetingUpdate":{"meetingState":{"isMuted":false,"isVideoOn":false,"isHandRaised":false,"isInMeeting":true,"isRecordingOn":false,"isBackgroundBlurred":false,"isSharing":false,"hasUnreadMessages":false},"meetingPermissions":{"canToggleMute":true,"canToggleVideo":true,"canToggleHand":true,"canToggleBlur":false,"canLeave":true,"canReact":true,"canToggleShareTray":true,"canToggleChat":true,"canStopSharing":false,"canPair":false}}}
.
.
.
2024-03-15T08:26:11.779170400+01:00  INFO teams_status::teams::api - {"meetingUpdate":{"meetingState":{"isMuted":true,"isVideoOn":false,"isHandRaised":false,"isInMeeting":true,"isRecordingOn":false,"isBackgroundBlurred":false,"isSharing":false,"hasUnreadMessages":false},"meetingPermissions":{"canToggleMute":true,"canToggleVideo":true,"canToggleHand":true,"canToggleBlur":false,"canLeave":true,"canReact":true,"canToggleShareTray":true,"canToggleChat":true,"canStopSharing":false,"canPair":false}}}
2024-03-15T08:26:11.779181500+01:00  ERROR teams_status::teams::api - Failed to send mqtt requests to eventloop
2024-03-15T08:26:11.779344300+01:00  ERROR teams_status::teams::api - Failed to send mqtt requests to eventloop

Should we change the topic of the issue to "no mqtt reconnect after standby/hibernate"?

best regards

AntoineGS commented 3 months ago

No worries for the name, if you want to change it you can. I will try to replicate this issue by turning off and on the MQTT server, that's a scenario I do not think I am handling. So if it is losing connection to the server temporarily that might be it!

AntoineGS commented 3 months ago

Let me know if you still have issues with the new version! https://github.com/AntoineGS/teams-status-rs/releases/tag/v0.4.1