From Day 1 after upgrading to Windows 10, exactly 1 year before, there was an annoying bug which stabs me randomly when I try to use my Windows 10 PC.
Below were various symptoms:
- Start menu not launching
- Cortana UI not launching
- Notification area not launching
- Start menu and Notification area launches, but Cortana UI not launching
In symptom #4, if you try to perform a search after launching Start menu, nothing will happen since Cortana UI can’t be launched.
Searching through Microsoft Answers forums showed that this bug is dated back before the RTM release of Windows 10 which means they exists during Preview build days but neither of the solution worked perfectly. It’s still an open bug as far as I am concerned. Most of the solution suggested are:
- Run a lengthy PowerShell script
- Create new local account and copy settings
- Series of registry edits
- Scan for file system errors
- Restore your PC to previous state
- Fresh install Windows 10
All the above solution mentioned, involves manual edits, running scripts, changing states, etc. which is a No-No. Because you are spending your times to fix a problem which again takes time to bring your machine back to it’s current state. That’s not an ideal solution at all since this issue can comes back again anytime and you are gonna spend more time on it.
Luckily, after many frustrated days and trial-and-error, I somehow devised solution to fix the above issue.
This is one of the event message that’s logged in Event Viewer;
“Activation of app Microsoft.Windows.Cortana_cw5n1h2txyewy!CortanaUI failed with error: The app didn't start in the required time. See the Microsoft-Windows-TWinUI/Operational log for additional information.”
One main reason for this was, Windows Updates was downloading in background. If that’s the case, let the download complete and reboot your system and see whether it’s fixed. If that solved you problem, cool.
If that didn’t helped, keep reading.
- Open This PC (Ctrl+E), select Settings.
- Select Upgrade and Recovery.
- Select Recovery –> Advanced Settings –> Restart now.
- After reboot, you’ll be taken to Choose an option screen, select Troubleshoot.
- Select Advanced options.
- Select System Restore.
- System will prepare for restoring. Enter you account password when prompted.
- You’ll get System Restore prompt, choose Next.
- Once your restore points are listed, stop right there. Now, CLOSE the System Restore prompt.
- Turn OFF your PC.
Now, turn ON your PC, wait for system tray items to load.
Check you Start menu, Cortana and Notification area. Everything works fine and your system is back to normal.
Hope this helps.
WebAuthenticationBroker is one of the handy API that I use to implement login in app using common login services like Microsoft, Google and Yahoo. This ensures that you don’t need to worry about implementing your own login functionalities. So how do you logout from these services when the user logout from your app? It’s quite simple, you only needs to send logout request to respective services.
Here are the logout urls for Microsoft/Yahoo/Google.
and in your code:
WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions.SilentMode, new Uri(logout-url-here));
Hope this helps.
Undoubtedly, WebAuthenticationBroker is one of the best API in WinRT/UWP API stack. It helps you to do OAuth and OpenID authentication without any extra work. We no longer need to use WebView and track the URL redirection to capture the tokens. Instead you can invoke the code from ViewModel also.
Since, we don't have much control on what happens and we rely on the status and result returned by the broker. Sometimes, things get more annoying when you get an error screen as below; but don't have any idea about what caused the issue for real.
Of course, traditional way is to use Fiddler which needs some setup for sure. Thankfully, there is another option too to tract the cause for error. All those error messages will be logged in your Windows Event Viewer. Below is the steps to do that:
- Open Event Viewer (eventvwr.exe).
- Navigate to Application and Services\Microsoft\Windows\WebAuth.
- Rt-click Operational log, and select Enable Log.
There you go!
Now, run the broker again. You can see all the logs.
Hope this will save your day.