desktop: [Bug]: Mattermost desktop app doesn't refresh UI when opened from notification

Checks before filing an issue

Mattermost Desktop Version

5.9.0

Operating System

Windows 10 x64 22H2

Mattermost Server Version

9.11

Steps to reproduce

  1. Ensure Mattermost desktop app is closed or minimized.
  2. Receive a new message, which triggers a Windows notification.
  3. Click on the notification.
  4. Observe that the app opens but remains in its previous state.
  5. Notice that the new message and chat are not visible on the screen.
  6. Click anywhere within the app window.
  7. Observe that the page refreshes and navigates to the correct chat with the new message.

Expected behavior

When opening the app from a notification, the UI should immediately navigate to the chat with the new message and display it without requiring an additional click.

Observed behavior

The app opens but remains in its previous state, and the new message and chat are not visible until the user clicks somewhere in the app window.

Log Output

[2024-08-22 13:25:28.696] [debug] [App.Initialize] UserActivityMonitor.on(status) { userIsActive: true, idleTime: 0, isSystemEvent: false }
[2024-08-22 13:25:30.761] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] computer woke up - reconnecting (7204.2ea8231c62adcdb2e04d.js:1)
[2024-08-22 13:25:30.771] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] Reconnecting WebSocket (5064.e03346219565f51b94bf.js:1)
[2024-08-22 13:25:30.785] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: websocket reconnect handler (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:25:30.785] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: resetting state (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:26:29.247] [debug] [App.Initialize] UserActivityMonitor.on(status) { userIsActive: true, idleTime: 19, isSystemEvent: false }
[2024-08-22 13:27:15.646] [debug] [App.Initialize] UserActivityMonitor.on(status) { userIsActive: true, idleTime: 0, isSystemEvent: false }
[2024-08-22 13:27:30.753] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] [renderer] computer woke up - reconnecting (7204.2ea8231c62adcdb2e04d.js:1)
[2024-08-22 13:27:30.754] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] computer woke up - reconnecting (7204.2ea8231c62adcdb2e04d.js:1)
[2024-08-22 13:27:30.765] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] [renderer] Reconnecting WebSocket (5064.e03346219565f51b94bf.js:1)
[2024-08-22 13:27:30.767] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] Reconnecting WebSocket (5064.e03346219565f51b94bf.js:1)
[2024-08-22 13:27:30.786] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: websocket reconnect handler (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:27:30.787] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: resetting state (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:27:30.794] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] [renderer] com.mattermost.calls: websocket reconnect handler (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:27:30.794] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] [renderer] com.mattermost.calls: resetting state (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:28:19.305] [debug] [App.Initialize] UserActivityMonitor.on(status) { userIsActive: true, idleTime: 0, isSystemEvent: false }
[2024-08-22 13:28:30.757] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] computer woke up - reconnecting (7204.2ea8231c62adcdb2e04d.js:1)
[2024-08-22 13:28:30.758] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] [renderer] computer woke up - reconnecting (7204.2ea8231c62adcdb2e04d.js:1)
[2024-08-22 13:28:30.768] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] [renderer] Reconnecting WebSocket (5064.e03346219565f51b94bf.js:1)
[2024-08-22 13:28:30.769] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] Reconnecting WebSocket (5064.e03346219565f51b94bf.js:1)
[2024-08-22 13:28:30.787] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: websocket reconnect handler (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:28:30.787] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: resetting state (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:28:30.804] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] [renderer] com.mattermost.calls: websocket reconnect handler (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:28:30.804] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] [renderer] com.mattermost.calls: resetting state (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:29:19.843] [debug] [App.Initialize] UserActivityMonitor.on(status) { userIsActive: true, idleTime: 22, isSystemEvent: false }
[2024-08-22 13:30:30.763] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] computer woke up - reconnecting (7204.2ea8231c62adcdb2e04d.js:1)
[2024-08-22 13:30:30.773] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] Reconnecting WebSocket (5064.e03346219565f51b94bf.js:1)
[2024-08-22 13:30:30.788] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: websocket reconnect handler (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:30:30.788] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: resetting state (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:30:52.674] [debug] [App.Initialize] UserActivityMonitor.on(status) { userIsActive: true, idleTime: 0, isSystemEvent: false }
[2024-08-22 13:31:53.289] [debug] [App.Initialize] UserActivityMonitor.on(status) { userIsActive: true, idleTime: 9, isSystemEvent: false }
[2024-08-22 13:32:53.829] [debug] [App.Initialize] UserActivityMonitor.on(status) { userIsActive: true, idleTime: 1, isSystemEvent: false }
[2024-08-22 13:33:30.755] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] computer woke up - reconnecting (7204.2ea8231c62adcdb2e04d.js:1)
[2024-08-22 13:33:30.765] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] Reconnecting WebSocket (5064.e03346219565f51b94bf.js:1)
[2024-08-22 13:33:30.781] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: websocket reconnect handler (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:33:30.781] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: resetting state (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:33:54.383] [debug] [App.Initialize] UserActivityMonitor.on(status) { userIsActive: true, idleTime: 48, isSystemEvent: false }
[2024-08-22 13:34:30.762] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] [renderer] computer woke up - reconnecting (7204.2ea8231c62adcdb2e04d.js:1)
[2024-08-22 13:34:30.762] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] computer woke up - reconnecting (7204.2ea8231c62adcdb2e04d.js:1)
[2024-08-22 13:34:30.772] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] [renderer] Reconnecting WebSocket (5064.e03346219565f51b94bf.js:1)
[2024-08-22 13:34:30.772] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] Reconnecting WebSocket (5064.e03346219565f51b94bf.js:1)
[2024-08-22 13:34:30.786] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: websocket reconnect handler (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:34:30.787] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: resetting state (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:34:30.801] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] [renderer] com.mattermost.calls: websocket reconnect handler (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:34:30.801] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] [renderer] com.mattermost.calls: resetting state (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:36:16.298] [debug] [App.Intercom] handleMentionNotification {
  channelId: '6qd51xzhhpgsbk8rp4sf81eooy',
  teamId: '',
  url: '/TEST/channels/4tt3fy81b3fjjdpgh5s3fz68py__8ok6g7ymoprxuf8fqtk83s6riw',
  silent: false,
  soundName: 'Bing'
}
[2024-08-22 13:36:16.299] [debug] [Notifications] displayMention {
  channelId: '6qd51xzhhpgsbk8rp4sf81eooy',
  teamId: '',
  url: '/TEST/channels/4tt3fy81b3fjjdpgh5s3fz68py__8ok6g7ymoprxuf8fqtk83s6riw',
  silent: false,
  soundName: 'Bing'
}
[2024-08-22 13:36:16.299] [debug] [Notifications] should not notify for this view 4
[2024-08-22 13:36:16.385] [debug] [App.Intercom] handleMentionNotification {
  channelId: '6qd51xzhhpgsbk8rp4sf81eooy',
  teamId: '',
  url: '/TEST/channels/4tt3fy81b3fjjdpgh5s3fz68py__8ok6g7ymoprxuf8fqtk83s6riw',
  silent: false,
  soundName: 'Bing'
}
[2024-08-22 13:36:16.386] [debug] [Notifications] displayMention {
  channelId: '6qd51xzhhpgsbk8rp4sf81eooy',
  teamId: '',
  url: '/TEST/channels/4tt3fy81b3fjjdpgh5s3fz68py__8ok6g7ymoprxuf8fqtk83s6riw',
  silent: false,
  soundName: 'Bing'
}
[2024-08-22 13:36:16.386] [debug] [PermissionsManager] doPermissionRequest notifications { requestingUrl: 'https://mm.example.com/', isMainFrame: false }
[2024-08-22 13:36:16.406] [debug] [Notifications] displayMention.show TEST 9054186c-9fb7-417e-b6db-4e72f6f18333
[2024-08-22 13:36:21.899] [debug] [App.Initialize] UserActivityMonitor.on(status) { userIsActive: true, idleTime: 0, isSystemEvent: false }
[2024-08-22 13:36:22.050] [debug] [Notifications] notification click TEST 9054186c-9fb7-417e-b6db-4e72f6f18333
[2024-08-22 13:36:22.055] [debug] [ViewManager] handleBrowserHistoryPush 3 /TEST/channels/4tt3fy81b3fjjdpgh5s3fz68py__8ok6g7ymoprxuf8fqtk83s6riw
[2024-08-22 13:36:22.056] [debug] [ServerManager] [0fd5a740-a2f3-48b...] getOrderedTabsForServer
[2024-08-22 13:36:22.223] [debug] [ViewManager] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] showById 8f510ce4-77c6-4fee-90b2-fbfddcd71298
[2024-08-22 13:36:22.241] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] did-start-navigation https://mm.example.com/TEST/channels/4tt3fy81b3fjjdpgh5s3fz68py__8ok6g7ymoprxuf8fqtk83s6riw
[2024-08-22 13:36:22.249] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [TEST] [TAB_MESSAGING] did-start-navigation https://mm.example.com/TEST/messages/@a.bcdefgh
[2024-08-22 13:36:22.263] [debug] [ViewManager] handleSetCurrentViewBounds { x: 0, y: 0, width: 2560, height: 1400 }
[2024-08-22 13:36:22.264] [debug] [ModalManager] handleResizeModal {
  bounds: { x: 0, y: 0, width: 2560, height: 1400 },
  modalQueueLength: 0
}
[2024-08-22 13:36:22.265] [debug] [ViewManager] focusCurrentView
[2024-08-22 13:36:30.772] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] computer woke up - reconnecting (7204.2ea8231c62adcdb2e04d.js:1)
[2024-08-22 13:36:30.782] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] Reconnecting WebSocket (5064.e03346219565f51b94bf.js:1)
[2024-08-22 13:36:30.799] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: websocket reconnect handler (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:36:30.800] [debug] [WebContentsEventM...] [5b0e1688-03cd-434...] [TEST SRV] [TAB_MESSAGING] [renderer] com.mattermost.calls: resetting state (com.mattermost.calls_f3ed54dc95aad70d_bundle.js:2)
[2024-08-22 13:36:33.238] [debug] [ViewManager] handleSetCurrentViewBounds { x: 0, y: 0, width: 2560, height: 1400 }
[2024-08-22 13:36:33.238] [debug] [ModalManager] handleResizeModal {
  bounds: { x: 0, y: 0, width: 2560, height: 1400 },
  modalQueueLength: 0
}
[2024-08-22 13:36:33.239] [debug] [MainWindow] saving window state {
  x: -8,
  y: -8,
  width: 2576,
  height: 1416,
  maximized: true,
  fullscreen: false
}

Additional Information

It’s important to note that this issue is intermittent and difficult to reproduce consistently. I haven’t been able to identify a specific pattern or set of conditions that consistently lead to this behavior.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Hi!

We’re experiencing the same issue. This is how I reproduce it

  1. Open Mattermost Desktop
  2. Make sure there are no unread messages
  3. Switch to another window (don’t close the Mattermost Desktop windows)
  4. Receive a message. A badge is shown in the tray
  5. Click on the Mattermost icon in the tray
    1. Mattermost Desktop is opened - no unread messages are displayed
  6. Move the window, i.e by dragging the window by the title bar
  7. Now the unread messages are displayed and the channels in the menu indicate there are unread messages

Windows 11 23h2 Mattermost Desktop 5.10.2 2-monitor-setup (laptop and an external monitor)

@devinbinnie I would also like to add that we are using HAProxy as a reverse proxy for Mattermost, which might be important. Today, we slightly adjusted the HAProxy configuration based on this article, and we will see if it has any effect. In any case, thank you for your help.

Thanks @ZarenOFF. I’ll have to investigate and get back to you.

https://github.com/user-attachments/assets/425ce364-e4b8-4afe-af56-35f13d51e508

Here is the video with the error. It was very difficult to reproduce. Sorry for the blur, I cannot disclose confidential data.

We are facing the same issue, and we haven’t identified a consistent pattern to reproduce it.

[2024-08-22 14:54:08.443] [debug] [App.Initialize] UserActivityMonitor.on(status) { userIsActive: true, idleTime: 37, isSystemEvent: false }
[2024-08-22 14:54:32.850] [debug] [ViewManager] handleSetCurrentViewBounds { x: 2560, y: 0, width: 1920, height: 1040 }
[2024-08-22 14:54:32.851] [debug] [ModalManager] handleResizeModal {
  bounds: { x: 2560, y: 0, width: 1920, height: 1040 },
  modalQueueLength: 0
}
[2024-08-22 14:54:32.867] [debug] [MainWindow] saving window state {
  x: 2552,
  y: -8,
  width: 1936,
  height: 1056,
  maximized: true,
  fullscreen: false
}
[2024-08-22 14:55:08.928] [debug] [App.Initialize] UserActivityMonitor.on(status) { userIsActive: true, idleTime: 0, isSystemEvent: false }
[2024-08-22 14:55:10.466] [debug] [App.Intercom] handleMentionNotification {
  channelId: 'usgrqphcbjyojfxh1uank974xh',
  teamId: '',
  url: '/main/channels/3x56k5pkitr5ze99ay5njdtp8c__4tt3fy81b3fjjdpgh5s3fz68py',
  silent: false,
  soundName: 'Bing'
}
[2024-08-22 14:55:10.466] [debug] [Notifications] displayMention {
  channelId: 'usgrqphcbjyojfxh1uank974xh',
  teamId: '',
  url: '/main/channels/3x56k5pkitr5ze99ay5njdtp8c__4tt3fy81b3fjjdpgh5s3fz68py',
  silent: false,
  soundName: 'Bing'
}
[2024-08-22 14:55:10.467] [debug] [Notifications] should not notify for this view 4
[2024-08-22 14:55:10.572] [debug] [App.Intercom] handleMentionNotification {
  channelId: 'usgrqphcbjyojfxh1uank974xh',
  teamId: '',
  url: '/main/channels/3x56k5pkitr5ze99ay5njdtp8c__4tt3fy81b3fjjdpgh5s3fz68py',
  silent: false,
  soundName: 'Bing'
}
[2024-08-22 14:55:10.573] [debug] [Notifications] displayMention {
  channelId: 'usgrqphcbjyojfxh1uank974xh',
  teamId: '',
  url: '/main/channels/3x56k5pkitr5ze99ay5njdtp8c__4tt3fy81b3fjjdpgh5s3fz68py',
  silent: false,
  soundName: 'Bing'
}
[2024-08-22 14:55:10.574] [debug] [PermissionsManager] doPermissionRequest notifications { requestingUrl: 'https://mattermost.tps.net/', isMainFrame: false }
[2024-08-22 14:55:10.591] [debug] [Notifications] displayMention.show MAIN b85b16e2-aa6a-4394-871b-04b9ca6e4766
[2024-08-22 14:55:10.591] [debug] [Notifications] close :usgrqphcbjyojfxh1uank974xh
[2024-08-22 14:55:12.499] [debug] [Notifications] notification click MAIN b85b16e2-aa6a-4394-871b-04b9ca6e4766
[2024-08-22 14:55:12.501] [debug] [ViewManager] handleBrowserHistoryPush 3 /main/channels/3x56k5pkitr5ze99ay5njdtp8c__4tt3fy81b3fjjdpgh5s3fz68py
[2024-08-22 14:55:12.501] [debug] [ServerManager] [0fd5a740-a2f3-48b...] getOrderedTabsForServer
[2024-08-22 14:55:12.684] [debug] [ViewManager] [8f510ce4-77c6-4fe...] [MAIN] [TAB_MESSAGING] showById 8f510ce4-77c6-4fee-90b2-fbfddcd71298
[2024-08-22 14:55:12.694] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [MAIN] [TAB_MESSAGING] did-start-navigation https://mattermost.tps.net/main/channels/3x56k5pkitr5ze99ay5njdtp8c__4tt3fy81b3fjjdpgh5s3fz68py
[2024-08-22 14:55:12.706] [debug] [WebContentsEventM...] [8f510ce4-77c6-4fe...] [MAIN] [TAB_MESSAGING] did-start-navigation https://mattermost.tps.net/main/messages/@testas
[2024-08-22 14:55:12.713] [debug] [ViewManager] handleSetCurrentViewBounds { x: 2560, y: 0, width: 1920, height: 1040 }
[2024-08-22 14:55:12.714] [debug] [ModalManager] handleResizeModal {
  bounds: { x: 2560, y: 0, width: 1920, height: 1040 },
  modalQueueLength: 0
}
[2024-08-22 14:55:12.715] [debug] [ViewManager] focusCurrentView
[2024-08-22 14:55:17.207] [debug] [ViewManager] handleSetCurrentViewBounds { x: 2560, y: 0, width: 1920, height: 1040 }
[2024-08-22 14:55:17.208] [debug] [ModalManager] handleResizeModal {
  bounds: { x: 2560, y: 0, width: 1920, height: 1040 },
  modalQueueLength: 0
}
[2024-08-22 14:55:17.211] [debug] [MainWindow] saving window state {
  x: 2552,
  y: -8,
  width: 1936,
  height: 1056,
  maximized: true,
  fullscreen: false
}

image