microsoft-graph-toolkit
microsoft-graph-toolkit copied to clipboard
[BUG] [MGT-CHAT] Chat does not wake-up from an extended sleep
Describe the bug This is not 100% reproducible because machines with 16 GB of RAM or less tend to reload the page on return. But, for those systems with more RAM if you are expecting Chat to resume getting notifications after the computer has been asleep for 15+ minutes, it won't be able to renew subscriptions.
To Reproduce Steps to reproduce the behavior:
- Open a chat.
- Put your computer to sleep.
- Wake it up 15 minutes later.
- Send a message from Teams.
- Notice that it is never delivered into the chat window.
You can also generally reproduce this with a simple network outage:
- Open a chat.
- Send a message from Teams: "before disconnect".
- See that it is received.
- Unplug your network for 1 minute.
- Send a message from Teams: "during disconnect".
- Plug back in the network.
- Wait 30 seconds or so.
- Send a message from Teams: "after disconnect".
- Generally you will not receive either message.
Expected behavior I would expect messages to be delivered after returning from sleep or at least an error message that they won't be.
Screenshots
Notice that the ChatList has a newer message than is in the chat...
Environment (please complete the following information):
- OS: macOS Monterey 12.7.3
- Browser: Edge
- Framework: React
- Context: Web
- Version: MGT 4
- Provider: Msal2Provider
Additional context This is probably a good case to use the renewal loop for ChatList which ensures that a connected/disconnected state is determined over the course of the loop rather than relying separately on the websocket connection and subscription renewal processes separately.
I am a MSFT FTE that can be reached on Teams at pelasne.