teams-for-linux
teams-for-linux copied to clipboard
Always shown as available when locked, even if "awayOnSystemIdle=true"
Describe the bug When --awayOnSystemIdle=true, I would expect to be shown as away or idle when I lock my computer, but instead I am eternally green. The issue is that teams will not forward messages to my phone while I am green, so during lunch or after work I don't ever see messages that sometimes are important.
To Reproduce Steps to reproduce the behavior:
- Launch app with --awayOnSystemIdle=true and --appIdleTimeout=10 (for debugging)
- Go idle, see state change to idle
- Lock screen, see state changed to "lock", and have someone else check your status, you will be green
Logs 10:45:49.108 › GetSystemIdleState => IdleTimeout: 15s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 30s, IdleState: 'idle' 10:45:51.109 › GetSystemIdleState => IdleTimeout: 15s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 32s, IdleState: 'idle' 10:45:53.121 › GetSystemIdleState => IdleTimeout: 15s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active' 10:46:03.128 › GetSystemIdleState => IdleTimeout: 15s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 5s, IdleState: 'locked' 10:46:05.172 › GetSystemIdleState => IdleTimeout: 15s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 7s, IdleState: 'locked'
Expected behavior To not be green forever.
Desktop (please complete the following information):
- OS: CachyOS
- AUR
- Version: 1.11.0-1
Hi @willbennett-kaltura,
I think there has been a code refactor since I made this PR https://github.com/IsmaelMartinez/teams-for-linux/pull/1335 (see related discussions).
It did fix the logic when --awayOnSystemIdle=false and, for that case, it still works as it should (forever green/available).
Looking at the code right now, I guess either this check takes the wrong path: https://github.com/IsmaelMartinez/teams-for-linux/blob/c072ec5bf51be7a2fb2512654c90470f6a6337ed/app/browser/notifications/activityManager.js#L23
Or the bug is within this function: https://github.com/IsmaelMartinez/teams-for-linux/blob/c072ec5bf51be7a2fb2512654c90470f6a6337ed/app/browser/notifications/activityManager.js#L32
Note that I did not change the code in this last function in my PR, as it handles the case when --awayOnSystemIdle=true, and that was working fine back then.
those code changes are for version 1.11.2. The version 1.11.0 still uses the older version
https://github.com/IsmaelMartinez/teams-for-linux/blob/v1.11.0/app/browser/notifications/activityManager.js
@willbennett-kaltura , are you able to run the app with --logConfig={} ? It will give us more logs and help us understand if this is a teams v1 or v2 issue.
I didn't write that logic what makes it a bit more difficult to digest.
Also, probably don't use the --appIdleTimeout=10 as I have seen issues with those timeouts getting confused (see https://github.com/IsmaelMartinez/teams-for-linux/issues/1320)
those code changes are for version 1.11.2. The version 1.11.0 still uses the older version
https://github.com/IsmaelMartinez/teams-for-linux/blob/v1.11.0/app/browser/notifications/activityManager.js
@willbennett-kaltura , are you able to run the app with
--logConfig={}? It will give us more logs and help us understand if this is a teams v1 or v2 issue.I didn't write that logic what makes it a bit more difficult to digest.
Also, probably don't use the --appIdleTimeout=10 as I have seen issues with those timeouts getting confused (see #1320)
Same issue with --logConfig={} and without --appIdleTimeout:
13:52:10.961 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked' 13:52:12.963 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked' 13:52:14.966 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked' 13:52:16.968 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked' 13:52:18.971 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked'
Honestly, I'd really like an option for immediately going idle on lock. Often times when I locked my computer, it means I'm afk and I'd like to get the notifications on my phone if possible.
Aye, logs do seem to pick that is locked, but I am not sure what does it do. I will see when I can have a look at that code but is probably an old bug, so thanks for reporting.
On Mon, 21 Oct 2024, 19:18 Will Bennett, @.***> wrote:
those code changes are for version 1.11.2. The version 1.11.0 still uses the older version
https://github.com/IsmaelMartinez/teams-for-linux/blob/v1.11.0/app/browser/notifications/activityManager.js
@willbennett-kaltura https://github.com/willbennett-kaltura , are you able to run the app with --logConfig={} ? It will give us more logs and help us understand if this is a teams v1 or v2 issue.
I didn't write that logic what makes it a bit more difficult to digest.
Also, probably don't use the --appIdleTimeout=10 as I have seen issues with those timeouts getting confused (see #1320 https://github.com/IsmaelMartinez/teams-for-linux/issues/1320)
Same issue with --logConfig={} and without --appIdleTimeout:
13:52:10.961 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked' 13:52:12.963 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked' 13:52:14.966 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked' 13:52:16.968 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked' 13:52:18.971 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'locked'
Honestly, I'd really like an option for immediately going idle on lock. Often times when I locked my computer, it means I'm afk and I'd like to get the notifications on my phone if possible.
— Reply to this email directly, view it on GitHub https://github.com/IsmaelMartinez/teams-for-linux/issues/1453#issuecomment-2427409624, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJHEEVRQNUEJDF56XTYL3Z4VAONAVCNFSM6AAAAABQBVU22OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRXGQYDSNRSGQ . You are receiving this because you commented.Message ID: @.***>
Hi @willbennett-kaltura , sorry for taking my time. I have been trying to digest some of the activityManager area and the system idle, but lets say it needs a lot of TLC.
Are you able to put all the logs, not only some lines? There is a screenlock inhibitor that might not getting disabled in some cases. That was added a while back ( https://github.com/IsmaelMartinez/teams-for-linux/issues/613 ) and might be taking part on this issue.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.