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

[Problem/Bug]: WebView2 show blank , error: COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED #3862

Closed
wuyouqiang opened this issue Oct 10, 2023 · 20 comments
Assignees
Labels
bug Something isn't working

Comments

@wuyouqiang
Copy link

What happened?

open any online url, it shows blank.
see below log:

  1. add_ProcessFailed
    hr = browser.webview_->add_ProcessFailed(Callback([this, &browser](ICoreWebView2* sender, ICoreWebView2ProcessFailedEventArgs* args_raw) -> HRESULT {

     wil::com_ptr<ICoreWebView2ProcessFailedEventArgs> args = args_raw;
    
     COREWEBVIEW2_PROCESS_FAILED_KIND kind;
     HRESULT hr = args->get_ProcessFailedKind(&kind);   // it returns COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED
    
     if (!SUCCEEDED(hr))
         return hr;
    

auto args2 = args.try_query();

    if (args2) {
        COREWEBVIEW2_PROCESS_FAILED_REASON reason;

        hr = args2->get_Reason(&reason); // it returns COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED;
        
        if (!SUCCEEDED(hr))
            return hr;
  1. add_NavigationCompleted
    // Navigation completed
    hr = browser.webview_->add_NavigationCompleted(Callback([this, &browser](ICoreWebView2* sender, ICoreWebView2NavigationCompletedEventArgs* args) -> HRESULT {
    std::wstring url;
    BOOL status = FALSE;
    DWORD http_code = 0;
    HRESULT hr = args->get_IsSuccess(&status);
    wil::unique_cotaskmem_string source_url;
    hr = sender->get_Source(&source_url); // source_url: it returns about:blank
    if (!SUCCEEDED(hr)) {

         return hr;
     }
    
    
     return S_OK;
    

    }).Get(), &browser.tokens_.navigation_completed_token_);

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

117.0.2045.60

SDK Version

1.0.1264.42

Framework

Win32

Operating System

Windows 10

OS Version

22H2(19405.3448)

Repro steps

open any url,
it shows blank.

Regression

No, this never worked

Last working version (if regression)

No response

@wuyouqiang wuyouqiang added the bug Something isn't working label Oct 10, 2023
@monica-ch
Copy link
Contributor

@wuyouqiang I am unable to repro the issue in our sample app, tried navigating to https://www.bing.com and https://www.microsoft.com.
Can you check if you are seeing the issue from our sample app.

@wuyouqiang
Copy link
Author

Can we analyze the possible causes from the error message?

@monica-ch
Copy link
Contributor

monica-ch commented Oct 23, 2023

@wuyouqiang Do you think the RenderProcessExited documentation here is helpful?

@wuyouqiang
Copy link
Author

sorry for delay, it cannot be reproduced in my pc ;
but it still exist in client pc.
or how to further troubleshoot this problem?

@Kang-Yang
Copy link

Environment: win10, but there is redirection on the computer, redirect the user directory of C drive to D drive
Symptom: When using webview2Sample demo to open the corresponding exe on the device, the display is blank without any prompts.
@monica-ch Could you please help me see if there are any other troubleshooting ideas?

@wuyouqiang
Copy link
Author

@wuyouqiang I am unable to repro the issue in our sample app, tried navigating to https://www.bing.com and https://www.microsoft.com. Can you check if you are seeing the issue from our sample app.

@wuyouqiang
Copy link
Author

@wuyouqiang I am unable to repro the issue in our sample app, tried navigating to https://www.bing.com and https://www.microsoft.com. Can you check if you are seeing the issue from our sample app.

hi ,use the sample , it still show blank, (for any url);

@monica-ch
Copy link
Contributor

monica-ch commented Nov 30, 2023

@wuyouqiang Can you check whether there are any dump files generated. Instructions here to collect the info https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/diagnostics/crash.md

Also can you share the ExitCode from the ProcessFailed event.

@wuyouqiang
Copy link
Author

wuyouqiang commented Dec 1, 2023

@wuyouqiang Can you check whether there are any dump files generated. Instructions here to collect the info https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/diagnostics/crash.md

Also can you share the ExitCode from the ProcessFailed event.

thanks, we check the user1 folder: \EBWebView\Crashpad\reports
it is empty, no dmp file
we check the user4 folder, see the attachment
Uploading EBWebView-user4.zip…
.

you can check the errorcode (COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED) 。

@monica-ch
Copy link
Contributor

@wuyouqiang Clicking on the attachment link takes me to this gitHub issue page.

@monica-ch monica-ch reopened this Dec 1, 2023
@wuyouqiang
Copy link
Author

wuyouqiang commented Dec 2, 2023

@wuyouqiang Clicking on the attachment link takes me to this gitHub issue page.

sorry, i reattach the file.
EBWebView-user4.zip

@monica-ch
Copy link
Contributor

@wuyouqiang I am looking for ExitCode from the ProcessFailedEventArgs.

Can we also get a ETW trace https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/diagnostics/etw.md

@wuyouqiang
Copy link
Author

@wuyouqiang I am looking for ExitCode from the ProcessFailedEventArgs.

Can we also get a ETW trace https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/diagnostics/etw.md

@wuyouqiang
Copy link
Author

@wuyouqiang I am looking for ExitCode from the ProcessFailedEventArgs.
Can we also get a ETW trace https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/diagnostics/etw.md

yes, we can , see the below link:
https://drive.google.com/file/d/1Bc9aoA8J5syZSwY_XC3AzXy4T6v-PnCf/view?usp=sharing

@monica-ch
Copy link
Contributor

@wuyouqiang From ETW trace, renderer process is exited with -1073740760. This means that some third-party software is injecting dlls into renderer process can cause code integrity check failure.

More info is found in these threads.

#2761 (comment)

#443 (comment)

Check if you can exclude the Edge renderer process from the third-party software or disable this feature using --disable features=RenderCodeIntegrity which doesn't work in WV2 119 and above.

@wuyouqiang
Copy link
Author

wuyouqiang commented Dec 19, 2023

@wuyouqiang From ETW trace, renderer process is exited with -1073740760. This means that some third-party software is injecting dlls into renderer process can cause code integrity check failure.

More info is found in these threads.

#2761 (comment)

#443 (comment)

Check if you can exclude the Edge renderer process from the third-party software or disable this feature using --disable features=RenderCodeIntegrity which doesn't work in WV2 119 and above.

Hi,monica-ch. Thank you for your answer.

  1. --disable features=RenderCodeIntegrity , it did not fix the issue. (set environment variables or
    options->put_AdditionalBrowserArguments(L"--disable-features=RendererCodeIntegrity");)

image

2.1 Why does WebView2 load this dll?
2.2 How to fix the issue? or how to avoid verifying the code integrity of this dll?

  1. Why can running an app in compatibility mode bypass security checks? but it appears other issue (gpu issue.)

image

  1. It was found that another user's display was also blank, but it was not due to codeintegrity.
    see the below error: COREWEBVIEW2_PROCESS_FAILED_REASON_CRASHED;
    crash see the link: https://drive.google.com/file/d/1Bh7cKhZ8QkxJt2N6slfzo0CrpWTRA-nw/view?usp=sharing
    and we can not get etw trace.

@wuyouqiang wuyouqiang reopened this Dec 21, 2023
@monica-ch
Copy link
Contributor

@wuyouqiang Sorry RenderCodeIntegrity feature is deprecated in 119.

Ocular Agent is attempting to inject it's code into WebView2. You should check to see if you have anything called Ocular Agent or programs by TEC Solutions installed and try uninstalling it. Thanks!

Can you open another bug with us to look into process failed crash?

@wuyouqiang
Copy link
Author

wuyouqiang commented Dec 21, 2023

@wuyouqiang Sorry RenderCodeIntegrity feature is deprecated in 119.

Ocular Agent is attempting to inject it's code into WebView2. You should check to see if you have anything called Ocular Agent or programs by TEC Solutions installed and try uninstalling it. Thanks!

Can you open another bug with us to look into process failed crash?

ok, i have reported another bug with failed crash (#4253).
but why edge is normal?
and the user does not want to uninstall this software."

@monica-ch
Copy link
Contributor

@wuyouqiang Could you try updating IP-guard as WINHAFNt64.dll software is part of it and see if it fixes the issue or follow up with the software owner for support:
http://www.tecsols.com/231016-2/

I believe Edge processes were excluded in the software so the user is not seeing code integrity checks failures in the browser

@wuyouqiang
Copy link
Author

@wuyouqiang Could you try updating IP-guard as WINHAFNt64.dll software is part of it and see if it fixes the issue or follow up with the software owner for support: http://www.tecsols.com/231016-2/

I believe Edge processes were excluded in the software so the user is not seeing code integrity checks failures in the browser

ok got it .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants