MicrosoftEdge / MicrosoftEdge/WebView2Feedback

WebView not loading content when running trough a screensaver

Open
#945 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority-low tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description
The webview is not loading correctly when running trough a screensaver.
The exact same executable works when right clicking and choosing "Test".

Version
SDK: 1.0.705.50
Runtime: Stable 88.0.705.68
Framework: WinForms
OS: Windows 10 20H2

Repro Steps
See attached project. WebView2Screensaver.zip

  1. Build attached project
  2. Rename output .exe to .scr
  3. Right .scr and click "Install"
  4. Set to 1 minute and click OK
  5. Wait 1 minute for the screensaver to start (Exit the screensaver using Alt-F4)

The WebView never loads the requested URL.
It stays stuck on NavigationStarting:

2021-02-16 16:49:45.980 -05:00 [INF] Starting
2021-02-16 16:49:45.990 -05:00 [INF] /s
2021-02-16 16:49:46.036 -05:00 [INF] https://docs.microsoft.com/en-us/microsoft-edge/webview2/
2021-02-16 16:49:46.287 -05:00 [INF] NavigationStarting

screensaver

Expected result can be seen by instead right clicking the .scr file and choosing "Test" instead of "install". Or simply by debugging trough Visual Studio.
Logs when running trough "Test":

2021-02-16 16:48:27.021 -05:00 [INF] Starting
2021-02-16 16:48:27.030 -05:00 [INF] /s
2021-02-16 16:48:27.069 -05:00 [INF] https://docs.microsoft.com/en-us/microsoft-edge/webview2/
2021-02-16 16:48:27.350 -05:00 [INF] NavigationStarting
2021-02-16 16:48:27.883 -05:00 [INF] SourceChanged
2021-02-16 16:48:27.884 -05:00 [INF] ContentLoading
2021-02-16 16:48:28.529 -05:00 [INF] NavigationCompleted

Additional context
Trying to change the source a second time for a different URL using a Timer sometime works and display the second URL correctly. I can try to provide a project file if relevant but the results are intermittent.

AB#35914530

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached WebView2Screensaver.zip project, build it, and reproduce the difference between the installed .scr screensaver and the right-click Test path on the listed Windows and WebView2 versions. Compare the logged lifecycle and navigation events, especially the point after NavigationStarting. Done means the requested URL loads reliably when launched as an installed screensaver, while the existing Test behavior remains working.

Written by the indexing model from the issue text.

Assessment

Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.