Tuesday, April 27, 2021

Microsoft Teams loads but renders a blank (white) window

Today I've spent like an hour trying to fix a sudden issue - Teams loads, the loading window shows correctly but then, instead of a normal main window, all I got was a blank white window.
It never happened before and of course I've tried to search for similar problems people had and possibly found solutions. I've tried all of this:
  • closing/reopening Teams
  • shutting down the machine
  • reinstalling Teams
  • removing both ..\App Data\Local\Microsoft\Teams and ..\App Data\Roaming\Microsoft\Teams
  • creating a custom link that points to Teams.exe instead of Update.exe --processStart "Teams.exe" where the default link points to
  • forcing a custom power scheme for the application so that for my dual GPU machine, the correct GPU is used
None of these worked.
What I suspected is that the Teams problem is somehow related to account switching. The default Windows client doesn't support multiple accounts, having two of them (for my two organizations) means I have to sign out and relogin to the other account every time I want to use it (alternatively I could switch to another user profile). This always worked. But today - the white window was clearly related to signing out of a working session and trying to sign into the other account.
What people recommend is to remove all Windows 10 linked accounts (work/school accounts in the Windows Credentials Manager) and this didn't help either. Somehow I noticed, however, that even removing a user profile (..\App Data\Roaming\Microsoft\Teams) caused my Teams to show the login prompt but skipping the password prompt. This leads to an interesting question: where does Teams cache user credentials? Interestingly enough, people also noticed this (Google "Teams Not Asking for Password").
The end of this story is: while I was not able to find a way to clear the cache locally, I just changed my domain's account password in the remote organization's registry and then cleared the Teams profile. This once again triggered the login prompt but this time it also asked for a password. And Teams loaded correctly.
Hope this helps someone in trouble.

Thursday, April 15, 2021

C# Puzzle No.24 (intermediate)

Given a generic interface definition
public interface IDoSomething : IDisposable { }
please explain why this is possible
class DoesSomething<String> : IDoSomething<String>
    public void Dispose()
and this is not possible (doesn't compile)
class DoesSomething<string> : IDoSomething<string>
    public void Dispose()
An explanation can be found here.