IsmaelMartinez / teams-for-linux

Unofficial Microsoft Teams for Linux client
GNU General Public License v3.0
2.95k stars 240 forks source link

[1.10.2] Application does not terminate after closing #1406

Closed Zsar closed 2 months ago

Zsar commented 2 months ago

Describe the bug When the application is started on a command line via teams-for-linux, it starts polling in the form of
16:36:11.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'.

When the application is closed, it never stops polling, nor does it return control to the command prompt.

To Reproduce Steps to reproduce the behavior:

  1. In Debian Bookworm, install application as per the Readme
  2. open a terminal, execute $ teams-for-linux => polling starts, the GUI opens, Teams can be used normally
  3. (Did some tests: call, camera on/off, screen share to/from; same for meeting)
  4. Close application
  5. Look at terminal, wait for several minutes => polling never stops, command prompt never reappears; Ctrl+C is necessary to properly terminate the application

Expected behavior The application terminates shortly after being closed. As normal for applications.

Screenshots The second line is emitted when closing the application. It repeats at the end after terminating the application forcefully with Ctrl+C, but none of the other lines associated with termination are present before that moment.

[...]
16:31:17.492 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:31:25.209 › window close
16:31:27.496 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:31:37.500 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:31:47.507 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:31:58.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:32:09.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:32:20.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:32:31.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:32:42.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:32:53.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:33:04.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:33:15.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:33:26.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:33:37.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:33:48.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:33:59.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:34:10.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:34:21.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:34:32.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:34:43.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:34:54.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:35:05.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:35:16.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:35:27.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:35:38.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:35:49.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:36:00.325 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:36:11.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:36:22.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:36:33.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:36:44.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
16:36:55.324 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
^C16:36:59.698 › before-quit
16:36:59.699 › window close
16:36:59.820 › window closed
16:36:59.821 › will-quit
16:36:59.821 › quit

Desktop (please complete the following information):

Debug (Abbreviated step 3 to just one test call. Apparently it can be completely omitted.)

$ teams-for-linux --webDebug --logConfig='{}'
No config file found, using default values
all good with appLogLevels you aren't using them
Initialising logger with config: "{}"
Logger initialised with transports: {}
18:12:41.540 › File logging at <home>/.config/teams-for-linux/logs/main.log with level silly
18:12:41.541 › Console logging enabled with level silly
18:12:41.541 › Logger initialised
18:12:41.541 › configPath: <home>/.config/teams-for-linux
18:12:41.542 › configFile: {}
18:12:41.543 › Running under Wayland, switching to PipeWire...
18:12:41.718 › processArgs: [
'/opt/teams-for-linux/teams-for-linux',
'--webDebug',
'--logConfig={}'
]
18:12:41.719 › testing RegExp processArgs false
18:12:41.719 › testing RegExp processArgs false
18:12:41.719 › testing RegExp processArgs false
18:12:41.719 › Testing network using net.request() for https://teams.microsoft.com/
18:12:41.720 › Spellchecker is disabled!
[29585:0913/181241.896476:ERROR:browser_main_loop.cc(280)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[29585:0913/181241.896570:ERROR:browser_main_loop.cc(280)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[29585:0913/181241.896589:ERROR:browser_main_loop.cc(280)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[29585:0913/181241.896603:ERROR:browser_main_loop.cc(280)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[29585:0913/181241.897048:ERROR:browser_main_loop.cc(280)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[29585:0913/181242.023891:ERROR:nss_util.cc(357)] After loading Root Certs, loaded==false: NSS error code: -8018
18:12:42.114 › Network test successful with method https
[29585:0913/181242.574863:ERROR:CONSOLE(1)] "Request Autofill.enable failed. {"code":-32601,"message":"'Autofill.enable' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)
18:12:42.608 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
[29585:0913/181242.610020:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.ScreenSaver.GetActive: object_path= /org/freedesktop/ScreenSaver: org.freedesktop.DBus.Error.NotSupported: This method is not implemented
18:12:43.037 › did-frame-finish-load {} true
18:12:43.037 › did-finish-load
18:12:44.278 › Badge count set to '0'
18:12:44.290 › Badge count set to '0'
18:12:45.126 › Badge count set to '0'
[29585:0913/181246.602479:ERROR:CONSOLE(1)] "Request Autofill.enable failed. {"code":-32601,"message":"'Autofill.enable' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)
18:12:46.606 › did-frame-finish-load {} false
18:12:47.815 › did-frame-finish-load {} false
[29585:0913/181247.919198:ERROR:CONSOLE(1)] "Request Autofill.enable failed. {"code":-32601,"message":"'Autofill.enable' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)
18:12:48.380 › did-frame-finish-load {} false
18:12:52.641 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
[29702:0913/181257.574808:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[29702:0913/181257.575398:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
18:13:02.646 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
[29702:0913/181305.165750:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
18:13:12.678 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
18:13:22.679 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
18:13:26.215 › window close
18:13:32.683 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
18:13:42.688 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
18:13:53.326 › GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'
^C18:14:02.338 › before-quit
18:14:02.339 › window close
18:14:02.459 › window closed
18:14:02.459 › will-quit
18:14:02.460 › quit

Additional context fresh first-time installation, no restarts

IsmaelMartinez commented 2 months ago

Have you tried using the config option called sometimes like 'closeAppOnCross' (or something like that). By default it minimises the app, not terminates it, but that flag should terminate the app

joakim-tjernlund commented 2 months ago

offtopic, but those:

 GetSystemIdleState => IdleTimeout: 300s, IdleTimeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: 'active'

are clogging the log, can these be removed?

IsmaelMartinez commented 2 months ago

@joakim-tjernlund , you can change the config level to be higher than debug, as those are debug messages they should disappear in principle.

See https://github.com/IsmaelMartinez/teams-for-linux/blob/develop/app/config/README.md

Closing as closeAppOnCross should fix the original question. Please report back with more information if that is not what the question was about.

joakim-tjernlund commented 2 months ago

@joakim-tjernlund , you can change the config level to be higher than debug, as those are debug messages they should disappear in principle.

See https://github.com/IsmaelMartinez/teams-for-linux/blob/develop/app/config/README.md

I was thinking not to see these ever, they just clog up the log anyway. A compromise would be to only log those if they changed.

IsmaelMartinez commented 1 month ago

The default log level is 'silly' ...