Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help diagnosing issue with WebView2 on Server2012R2 #2122

Open
VeeFu opened this issue Jan 31, 2022 · 9 comments
Open

Help diagnosing issue with WebView2 on Server2012R2 #2122

VeeFu opened this issue Jan 31, 2022 · 9 comments
Assignees
Labels
bug Something isn't working priority-low We have considered this issue and decided that we will not be able to address it in the near future. tracked We are tracking this work internally.

Comments

@VeeFu
Copy link

VeeFu commented Jan 31, 2022

Hello Experts,

My company has recently released our native C++ application with WebView2. It replaces the old IWebBrowser2 control. One of our users report that our application shows blank windows where the WebView2 controls should appear. I need a bit of guidance diagnosing the issue.

Here's what I know so far:
The user is running Server2012R2.
They claim there is no Citrix software installed
WebView2 is installed. The user is able to run the msedgewebview2 executable directly (i.e. outside of my application) and it displays a functional browser window.
My application successfully initializes WebView2 and calls Navigate to our URL. Calls to CreateCoreWebView2EnvironmentWithOptions, CreateCoreWebView2Controller, and ICoreWebView2::Navigate are all successful as far as my application can see.
Once my application appears, with blank windows where WebView2 should be, the user reports that no msedgewebview2.exe instances are running.
The user's $AppData/EBWebView folder has record of our URL appearing in browser history. A session cookie appears as well, so the browser sent and received a response.

So, apparently, the webview2 was functional long enough to make one request, but no longer exists by the time my user checks the task list. I guess it either crashed or was stopped. I could ask the customer to set up a DebugDiag rule to try to capture a crash, but I don't want to inconvenience them unless there is other evidence of a crash.

/edit The user's Crashpad\reports folder is empty, so I guess it was terminated some other way.

What logs can I look to for evidence of a crash or other termination?

Any other ideas or areas I can look into?

Thank you!

AB#38445884

@VeeFu VeeFu added the question label Jan 31, 2022
@champnic
Copy link
Member

champnic commented Feb 2, 2022

Hey @VeeFu - Sorry your customer is running into this. Most commonly this is caused by an issue with the graphics driver on the particular machine, especially given the symptoms of a working WebView2, but not displaying anything.

If possible, could you share the output of the edge://gpu page (including the Log Messages section at the bottom, which may take a few moments to load), and run dxdiag from a command line, then hit the "Save all information" button and share the saved text file?

@champnic champnic self-assigned this Feb 2, 2022
@VeeFu
Copy link
Author

VeeFu commented Feb 3, 2022

@champnic thanks for the lead.

My user reported the problem mysteriously resolved after the last round of diagnostics collection.
I asked them to re-install WebView2, making sure to install the 64-bit version and collect systeminfo.exe /nfo export. They reported that it was working fine now.

I suspect they applied some updates to their OS (virtualized Server2012R2) that may have resolved the issue. Perhaps you're right about the graphics drivers.

In the meantime, I've added an ICoreWebView2ProcessFailedEventHandler to my application so we can log some error data when the msedgewebveiw2 processes die. I'll follow up with the edgge://gpu and dxdiag info if this issue appears again.

Thanks!

@VeeFu VeeFu closed this as completed Feb 3, 2022
@champnic
Copy link
Member

champnic commented Feb 3, 2022

Glad the issue got (mysteriously) resolved!

@VeeFu
Copy link
Author

VeeFu commented Feb 28, 2022

Hi Nic,

Sorry to resurrect this issue. I've had another customer complain of a similar problem. They've sent us dxdiag and edge gpu output (attached).

DxDiag.txt
edge_gpu.txt

It seems like they have no hardware acceleration. DXDIAG shows a big warning about unsigned "unknown" drivers.

The logs in our application reported the following:

[2022-02-28 09:26:11]: ERROR [server] - WebView2 process failed : Exit Code[18] Failure Type[COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED] Failure Reason[COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED]
[2022-02-28 09:26:11]: ERROR [server] - WebView2 process failed : Exit Code[18] Failure Type[COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED] Failure Reason[COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED]
[2022-02-28 09:26:11]: ERROR [server] - WebView2 process failed : Exit Code[18] Failure Type[COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED] Failure Reason[COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED]
[2022-02-28 09:26:14]: ERROR [server] - WebView2 process failed : Exit Code[18] Failure Type[COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED] Failure Reason[COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED]
[2022-02-28 09:26:14]: ERROR [server] - WebView2 process failed : Exit Code[18] Failure Type[COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED] Failure Reason[COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED]
[2022-02-28 09:26:14]: ERROR [server] - WebView2 process failed : Exit Code[18] Failure Type[COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED] Failure Reason[COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED]
[2022-02-28 09:26:14]: ERROR [server] - WebView2 process failed : Exit Code[-2147483645] Failure Type[COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED] Failure Reason[COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED]
[2022-02-28 09:26:14]: ERROR [server] - WebView2 process failed : Exit Code[-2147483645] Failure Type[COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED] Failure Reason[COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED]

Should I ask them to update their display drivers?

Windows Server 2016 Datacenter 64-bit (10.0, Build 14393) (14393.rs1_release.220131-0721)

@VeeFu VeeFu reopened this Feb 28, 2022
@champnic
Copy link
Member

@VeeFu If they are able to upgrade, please do. Let me know if that fixes the issue.

@VeeFu
Copy link
Author

VeeFu commented Mar 1, 2022

@champnic
Thanks for having a look.

Customer came back saying they're using a virtual machine with only the Hyper-V video graphics card:

As you probably saw in the DXDIAG this is a virtual machine and it runs only the Hyper-V video graphics card. I did update to the newest driver from HPE for the host and it didn’t update anything on the virtual machine. I did go to device manager –> display adapters -> Hyper-V -> properties -> update driver -> search online however no update was available.

I know almost nothing about how a virtual Datacenter Server 2016 differs from a non-virtual one. My test environment is limited to vmware and testing there is successful.

Is an "Uknown" driver a giant red flag that the customer has something wrong with their VM configuration?
Should I be doing something special during WebView2 initialization to support this?

@VeeFu
Copy link
Author

VeeFu commented Mar 7, 2022

Most recent customer resolved the issue on their own by entirely replacing the server running my product
From:
Operating System: Windows Server 2016 Datacenter 64-bit (10.0, Build 14393) (14393.rs1_release.220131-0721)
To:
Operating System: Windows Server 2019 Standard 64-bit (10.0, Build 17763) (17763.rs5_release.180914-1434)

I'm happy they resolved the problem, but it still leaves no root cause identified.

Are "Datacenter" editions of Windows Server supported by WebView2?

@VeeFu
Copy link
Author

VeeFu commented Mar 8, 2022

Another update from my most recent customer: They were able to work-around the issue on Windows Server 2016 Datacenter by setting msedgewebview2.exe for Windows 8 compatibility, as noted in this issue: #1334

@champnic champnic added bug Something isn't working tracked We are tracking this work internally. and removed question labels Mar 8, 2022
@champnic
Copy link
Member

champnic commented Mar 8, 2022

Glad those workarounds seem to be working! I've opened a bug on our backlog to continue investigation of this issue.

@github-actions github-actions bot added the priority-low We have considered this issue and decided that we will not be able to address it in the near future. label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low We have considered this issue and decided that we will not be able to address it in the near future. tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

2 participants