teams-for-linux icon indicating copy to clipboard operation
teams-for-linux copied to clipboard

Meeting notifications not working with "new teams"

Open cim-- opened this issue 1 year ago • 35 comments

Describe the bug Notifications sent to notification-daemon no longer happen with the "new teams". This does work - if somewhat erratically - with the "classic teams". I have tried both "web" and "electron" notification methods with the same results. UseMutationTitleLogic does work for systray icon changes for "permanent" notifications, it's just the transient ones which are missing.

To Reproduce

  1. Start Teams
  2. Have someone else start a meeting you are present at / send a chat message
  3. Nothing happens
  4. Use notify-send to test notification daemon
  5. Receive notification as normal (There is presumably more to it than this as other people have mentioned in other issues that it works for them, but I can't tell what, unfortunately)

Expected behavior Notifications of new meetings, chat messages, etc. sent to notification daemon as with classic teams

Desktop (please complete the following information):

  • Debian stable, Windowmaker desktop with notification-daemon to handle notifications
  • deb package install
  • 1.4.27

Debug The main obvious error seems to be

Failed to start Activity Hub by assigning Event Handlers error @ v2/:3 (anonymous) @ /opt/teams-for-linux/resources/app.asar/app/browser/tools/activityHub.js:44

Full log: teams.log

(Sorry, this doesn't feel like a lot of help - happy to answer more detailed questions about my system config and try other config settings, etc.)

cim-- avatar Apr 29 '24 14:04 cim--

Can you try with 1.4.30 or higher? I suspect you are using the newer version of MS teams (v2).

IsmaelMartinez avatar Apr 30 '24 08:04 IsmaelMartinez

Yes, this is teams v2 (it did work at least most of the time with teams v1) Tried again with 1.4.31 and the same problem (and same Activity Hub error in the log file) I'll give 1.4.33 a go once the debian package is available. Thanks

cim-- avatar May 01 '24 11:05 cim--

https://github.com/IsmaelMartinez/teams-for-linux/releases/tag/v1.4.34 is available and it should work again. Can you try it? Thanks

IsmaelMartinez avatar May 02 '24 03:05 IsmaelMartinez

I was experiencing the same issue after switching from the older teams to the newer teams, I just installed v1.4.34, I'll let you know if it resolves the issue.

  • OS: Ubuntu 23.10 x86_64
  • Kernel: 6.6.14-060614-generic
  • Using the (standard) gnome installation with wayland
  • AMD GPU

Azeirah avatar May 02 '24 07:05 Azeirah

Still no in 1.4.34, unfortunately - or at least, mostly not: occasionally a notification does come through, which is strange. Maybe you can see some pattern in this that I'm missing? NotificationMethod is currently set to "electron" - happy to retry with "web" instead if you think that would be useful.

  • {No} last night on 1.4.31, person A, window open in different workspace
  • {Yes} last night on 1.4.31, person A, window closed (but app still running)
  • [restart of computer]
  • {No} chat message, person A, window open in different workspace
  • {Yes} chat message, bot B, window closed
  • {No} chat message, person C, window closed
  • {No} chat message, groupchat D, window open in different workspace
  • {No} meeting start notification, person E, window open in different workspace

For the chat messages - though of course not the meeting notifications where this wouldn't apply - the systray icon did correctly update the unread count every time.

cim-- avatar May 02 '24 10:05 cim--

Can you try https://github.com/IsmaelMartinez/teams-for-linux/releases/tag/v1.4.35 ? Playing catch-up with MS with the idleTimeout that "might" have been putting you into idle (so you don't get notifications.

IsmaelMartinez avatar May 03 '24 05:05 IsmaelMartinez

Sorry, no, that also hasn't worked. Thanks for trying.

(Idle is of course the time I most want to get notifications - not sure what MS were thinking there)

cim-- avatar May 03 '24 10:05 cim--

I'm on GNOME I get notifications. Earlier with angular we need to implement something ourselves to show the notification. But with react version, it's shown similar to regular chat notifications.

jijojosephk avatar May 03 '24 10:05 jijojosephk

Just as another data point, I've gone back to "classic"/"v1" teams for now, and that is sending chat and meeting start notifications through to notification-daemon absolutely fine (including sending notifications for meetings which have already started when I open the client), so most of the process seems solid, just something about the new/v2 teams not generating them properly. (I'll probably be sticking around on "classic" for as long as I can, but please let me know if there's anything else I can test)

cim-- avatar May 13 '24 09:05 cim--

Same here. I do notice the notifications from time to time, but they're seemingly displayed within the window (i.e. as part of the webpage, in lower right corner), not as desktop notifications (as a separate floating window, in my setup in upper left corner), so I only see them when I switch to the Teams window which is not at all how it's meant to work :) Sticking to v1 too for the time being (which the yellow bar never stops telling me will stop working in a month or so).

mikedld avatar Jun 03 '24 10:06 mikedld

I get the same as mikedld - are some people finding that on their desktop environment the little blue notifications can escape from the Teams window and be shown elsewhere on the desktop/in other workspaces? If so that's not how it works on mine, unfortunately.

cim-- avatar Jun 07 '24 10:06 cim--

Hi @mikedld and @cim-- , did you try with the 'electron' notification option? It is called notificationMethod in the config options https://github.com/IsmaelMartinez/teams-for-linux/tree/develop/app/config I suspect the web option (default) is just showing in within the browser, while electron will trigger outside the browser, but electron is a bit silly understanding if it should show the notifications as in this comment. https://github.com/IsmaelMartinez/teams-for-linux/issues/1234#issuecomment-2090102185

IsmaelMartinez avatar Jun 07 '24 10:06 IsmaelMartinez

Hello - yes, I've been using notificationMethod: electron. Since that comment it has generally become more consistent and not sent any notifications through to notification-daemon, though. Thanks

cim-- avatar Jun 07 '24 16:06 cim--

I assume we can close this issue then as using electron you get notifications. Do report back if needs re-open (Maybe I misunderstood)

IsmaelMartinez avatar Jun 11 '24 05:06 IsmaelMartinez

Hello - no, please keep open. Using electron (mostly) doesn't help, it's still an issue with Teamsv2.

I get the in-app-window notifications correctly (but not very usefully)

I only get the notifications via notification-daemon in Teamsv2 extremely rarely (possibly only when the app window is actually closed, but not all of those either) - whereas they also worked consistently in Teamsv1.

Thanks

cim-- avatar Jun 11 '24 08:06 cim--

Fyi, using the official MacOS app, I don't get notifications since moved to teams-v2. So this might just be a MS problem after all.

Some of my colleagues did manage to get their notifications back, again, in the official MacOS app, by going to settings, notifications and disabling and re-enabling them.

Also notice that the electron notifications implementation has always been sub optimal, as it can't detect things like the app being in another workspace or minimised. I think it only notifies if the app is out of focus, but I don't fully remember.

But we will keep trying to find a way

IsmaelMartinez avatar Jun 22 '24 07:06 IsmaelMartinez

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.

github-actions[bot] avatar Oct 16 '24 08:10 github-actions[bot]

Still an issue, just commenting to remove the "stale" label.

cim-- avatar Oct 16 '24 09:10 cim--

I think this is the old issue with electron thinking is still in focus, so not sending the notifications.

Can you run the latest version with the following command and put the logs in here?

teams-for-linux --webDebug --logConfig='{}'

We might be able to re-implement what we had in the past to bypass the focus issue. I am not sure why we did remove the web logic a while back, but I do remember having that problem when I had multiple desktops.

IsmaelMartinez avatar Nov 03 '24 09:11 IsmaelMartinez

[2024-11-11 12:19:33.393] [debug] File logging at /home/wfh/.config/teams-for-linux/logs/main.log with level silly
[2024-11-11 12:19:33.438] [debug] Console logging enabled with level silly
[2024-11-11 12:19:33.439] [debug] Logger initialised
[2024-11-11 12:19:33.439] [info]  configPath: /home/wfh/.config/teams-for-linux
[2024-11-11 12:19:33.440] [debug] configFile: {
  optInTeamsV2: true,
  useMutationTitleLogic: true,
  notificationMethod: 'electron',
  electronCLIFlags: [ [ 'ozone-platform', 'x11' ] ]
}
[2024-11-11 12:19:33.454] [debug] Adding electron CLI flag 'ozone-platform' with value 'x11'
[2024-11-11 12:19:34.582] [debug] processArgs: [
  '/opt/teams-for-linux/teams-for-linux',
  '--webDebug',
  '--logConfig={}'
]
[2024-11-11 12:19:34.583] [debug] testing RegExp processArgs false
[2024-11-11 12:19:34.583] [debug] testing RegExp processArgs false
[2024-11-11 12:19:34.583] [debug] testing RegExp processArgs false
[2024-11-11 12:19:34.583] [debug] Waiting for network...
[2024-11-11 12:19:34.584] [debug] Testing network using net.request() for https:  electronCLIFlags: [ [ 'ozone-platform', 'x11' ] ]
}
[2024-11-11 12:19:33.454] [debug] Adding electron CLI flag 'ozone-platform' with
 value 'x11'
[2024-11-11 12:19:34.582] [debug] processArgs: [
  '/opt/teams-for-linux/teams-for-linux',
  '--webDebug',
  '--logConfig={}'
]
[2024-11-11 12:19:34.583] [debug] testing RegExp processArgs false
[2024-11-11 12:19:34.583] [debug] testing RegExp processArgs false
[2024-11-11 12:19:34.583] [debug] testing RegExp processArgs false
[2024-11-11 12:19:34.583] [debug] Waiting for network...
[2024-11-11 12:19:34.584] [debug] Testing network using net.request() for https:
//teams.microsoft.com
[2024-11-11 12:19:34.585] [debug] Spellchecker is disabled!
[2024-11-11 12:19:37.021] [debug] Network test successful with method https
[2024-11-11 12:19:37.886] [debug] GetSystemIdleState => IdleTimeout: 300s, IdleT
imeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 2s, IdleState: '
active'
[2024-11-11 12:19:40.210] [debug] did-frame-finish-load {} true
[2024-11-11 12:19:40.210] [debug] did-finish-load
[2024-11-11 12:19:42.327] [debug] cookie changed cause: overwrite 
 removed?: true 

[2024-11-11 12:19:42.327] [debug] cookie: authtoken 
 expirationDate: 1731397387.837956 
 domain: teams.microsoft.com
[2024-11-11 12:19:42.327] [debug] cookie changed cause: explicit 
 removed?: false 

[2024-11-11 12:19:42.327] [debug] cookie: authtoken 
 expirationDate: 1731397387.326987 
 domain: teams.microsoft.com
[2024-11-11 12:19:42.493] [debug] Badge count set to '0'
[2024-11-11 12:19:43.872] [debug] Badge count set to '0'
[2024-11-11 12:19:46.793] [debug] Badge count set to '0'
[2024-11-11 12:19:47.811] [debug] Badge count set to '1'
[2024-11-11 12:19:48.549] [debug] did-frame-finish-load {} false
[2024-11-11 12:19:49.392] [debug] GetSystemIdleState => IdleTimeout: 300s, IdleT
imeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: '
active'
[2024-11-11 12:19:50.002] [debug] Badge count set to '1'
[2024-11-11 12:19:52.973] [debug] Badge count set to '1'
[2024-11-11 12:19:53.963] [debug] Badge count set to '0'
[2024-11-11 12:19:59.670] [debug] GetSystemIdleState => IdleTimeout: 300s, IdleT
imeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: '
active'
[2024-11-11 12:20:09.672] [debug] GetSystemIdleState => IdleTimeout: 300s, IdleT
imeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: '
active'
[2024-11-11 12:20:19.676] [debug] GetSystemIdleState => IdleTimeout: 300s, IdleT
imeoutPollInterval: 10s, ActiveCheckPollInterval: 2s, IdleTime: 0s, IdleState: '
active'

(and then that last message repeats a lot)

cim-- avatar Nov 11 '24 12:11 cim--

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.

github-actions[bot] avatar Dec 12 '24 09:12 github-actions[bot]

Commenting again to remove stale.

(I think you're right about the cause, since I do get chat notifications through properly if the Teams window is closed rather than simply minimised)

cim-- avatar Dec 12 '24 09:12 cim--

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.

github-actions[bot] avatar Jan 13 '25 09:01 github-actions[bot]

Commenting again to remove stale.

cim-- avatar Jan 13 '25 17:01 cim--

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.

github-actions[bot] avatar Feb 13 '25 09:02 github-actions[bot]

Still an issue

cim-- avatar Feb 13 '25 11:02 cim--

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.

github-actions[bot] avatar Mar 17 '25 09:03 github-actions[bot]

Still an issue

cim-- avatar Mar 18 '25 13:03 cim--

Hi @cim-- , trying to have another look at this.

Are you using the "web" or the "electron" option for the notifications?

Can you try changing the notification urgency to critical? (I believe the config option is defaultNotificationUrgency (and only works when using the electron notificationMethod

Apologies is taking that long, but it is a strange one, and might be extremely difficult to fix.

IsmaelMartinez avatar Apr 03 '25 00:04 IsmaelMartinez

Thanks.

Notification method before was "electron". I've set my config.json to now read

{
    "optInTeamsV2": true,
    "useMutationTitleLogic": true,
    "notificationMethod": "electron",
    "defaultNotificationUrgency": "critical",
    "electronCLIFlags": [
	["ozone-platform","x11"]
    ]
}

and updated teams-for-linux to 1.14.1 from the debian package. I'll give it a test today and see how it goes.

cim-- avatar Apr 03 '25 08:04 cim--