Closed OneSeven closed 1 year ago
Thanks for the bug report @OneSeven - I've added it to our backlog and we're taking a look.
@OneSeven We've seen similar issues to this in the past that were caused by antivirus software. Can you try your scenario again after disabling any antivirus software on the machine to see if that might be the cause here as well?
@champnic There is only windows defender on my computer. I turned off windows defender and tested it. The result is still the crash. It is normal in windows edge, and it is normal in webview2 runtime 95 and earlier versions. I can’t understand this. Please troubleshoot the discrepancies
Thanks for verifying! Would you be able to grab a netlog of this scenario and share it? You can email the log to me at champnic@microsoft.com
if you'd like.
https://textslashplain.com/2020/01/17/capture-network-logs-from-edge-and-chrome/
@champnic I found the root cause by checking the source code of the mpegts.js library. Running the following two lines of source code will cause the webview to crash. Note that this is normal in Microsoft Edge and normal in Chrome. Please fix it. Thanks! https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL It is best to inform me that it is expected to fix the time , Please !
let mediaSourc = new window.MediaSource();
let mediaSourceObjectURL = window.URL.createObjectURL(mediaSourc);
Hey @OneSeven - I just gave this a try and didn't experience a crash. What runtime version are you seeing this on?
Are you running in a Service Worker?
Hey @OneSeven - I just gave this a try and didn't experience a crash. What runtime version are you seeing this on?
96.0.1054.34 and 96.0.1054.41
Are you running in a Service Worker?
No, it will crash if two lines of code are executed directly in the script
Hm, I tried in the debugger and it worked ok on 96.0.1054.34:
If you try that in the debugger in either a WebView2 or the Edge browser does it still crash? And when you say crash, do you mean "have an error and display the RESULT... error page"? or the WebView2 process is killed?
Hm, I tried in the debugger and it worked ok on 96.0.1054.34:
If you try that in the debugger in either a WebView2 or the Edge browser does it still crash? And when you say crash, do you mean "have an error and display the RESULT... error page"? or the WebView2 process is killed?
Execution in the console will also crash, I am building in this project https://github.com/wailsapp/wails https://github.com/wailsapp/wails/discussions/992
Hm, I tried in the debugger and it worked ok on 96.0.1054.34:
If you try that in the debugger in either a WebView2 or the Edge browser does it still crash? And when you say crash, do you mean "have an error and display the RESULT... error page"? or the WebView2 process is killed?
The edge is normal, but the webview crashes
Maybe we can perform remote debugging through Anydesk
@champnic - Hey Nic 😄. Let me know what I can do on my side (Wails uses the win32 webview2 component) to help debug this. Many thanks. EDIT: Are there permissions considerations in play here?
@leaanthony Are you able to reproduce the issue @OneSeven is mentioning above? Is Wails doing anything with permissions, such as denying any of them? Or does it set any command line args on the WebView2?
I will try and reproduce today, but I believe that by default all permissions are granted and no cli flags are set. If there are specific permissions to check for, I can do that. I'm just not familiar with this JS API.
Judging by this ticket, it has also affected the browser https://techcommunity.microsoft.com/t5/discussions/microsoft-edge-error-code-result-code-killed-bad-message/m-p/2492184. Perhaps the internal docs around the fixed release may have some clues?
@leaanthony @champnic
Let me explain the phenomenon. The program built with wails half a month ago is normal. After half a month, the program built at the beginning will also have problems. During this half month, I upgraded the win10 system, .net The framework has edge and webview runtime, I guess it may not have much to do with wails
Sounds like a runtime regression
Sounds like a runtime regression
How can I install the old version of webview runtime? I can't find the installation file for version 95 now
Agreed this sounds like a runtime regression. @OneSeven If you look in the <user data folder>\EBWebView\crashpad\reports
do you see any dumps in there? If so, would you be able to share with me at champnic@microsoft.com
(may need to upload to a cloud sharing service as they can be large)?
Agreed this sounds like a runtime regression. @OneSeven If you look in the
<user data folder>\EBWebView\crashpad\reports
do you see any dumps in there? If so, would you be able to share with me atchampnic@microsoft.com
(may need to upload to a cloud sharing service as they can be large)?
I have sent two sets of program data to you, please check
Thanks! I took a look and it seems to be failing here:
void BlobRegistryImpl::URLStoreForOrigin(
const url::Origin& origin,
mojo::PendingAssociatedReceiver<blink::mojom::BlobURLStore> receiver) {
Delegate* delegate = receivers_.current_context().get();
DCHECK(delegate);
if (!origin.opaque() && !delegate->CanCommitURL(origin.GetURL())) {
mojo::ReportBadMessage(
"Non committable origin passed to BlobRegistryImpl::URLStoreForOrigin");
Can you share what the value of mediaSourc
is in your example that's causing the failure?
let mediaSourc = new window.MediaSource();
let mediaSourceObjectURL = window.URL.createObjectURL(mediaSourc);
Thanks! I took a look and it seems to be failing here:
void BlobRegistryImpl::URLStoreForOrigin( const url::Origin& origin, mojo::PendingAssociatedReceiver<blink::mojom::BlobURLStore> receiver) { Delegate* delegate = receivers_.current_context().get(); DCHECK(delegate); if (!origin.opaque() && !delegate->CanCommitURL(origin.GetURL())) { mojo::ReportBadMessage( "Non committable origin passed to BlobRegistryImpl::URLStoreForOrigin");
Can you share what the value of
mediaSourc
is in your example that's causing the failure?let mediaSourc = new window.MediaSource(); let mediaSourceObjectURL = window.URL.createObjectURL(mediaSourc);
Just create an empty MediaSource and createObjectURL on it, it will crash Just the two lines of code above You are in an empty project, no need to write anything, just add two lines of code, it will crash
Per my comment above, I've already tried those lines and they don't crash for me: https://github.com/MicrosoftEdge/WebView2Feedback/issues/1968#issuecomment-985132395
As I'm unable to repro, I can't see what mediaSourc
value might be happening on your machine that might be causing the failure in createObjectURL
.
I build by wails @leaanthony Please help with joint debugging @champnic Please communicate with leaanthony
Per my comment above, I've already tried those lines and they don't crash for me: #1968 (comment)
As I'm unable to repro, I can't see what
mediaSourc
value might be happening on your machine that might be causing the failure increateObjectURL
.
I still want to remind that he works normally in the webview rumtime 95 version, do I need to rule out the direct difference between 96 and 95?
@OneSeven Are you able to get a WebView2 launched in your scenario (maybe to a separate page) and then try running this line manually to see what value it's giving you?
let mediaSourc = new window.MediaSource();
@OneSeven Are you able to get a WebView2 launched in your scenario (maybe to a separate page) and then try running this line manually to see what value it's giving you?
let mediaSourc = new window.MediaSource();
There is no error in performing this step, Error when running window.URL.createObjectURL(mediaSourc)
@OneSeven I noticed you are doing this from a local file. Can you try running these steps from a website?
I tried with a local file and just using NavigateToString and wasn't able to repro, so I'm not sure if it's related or not.
@jchv Please pay attention to this question, wails are based on go-webview2
I tried with a local file and just using NavigateToString and wasn't able to repro, so I'm not sure if it's related or not.
I may not be able to provide other information. After I build and suspend the webview through wails, I will report errors when running those two lines of code in the webview's console.
Description
Running the above code crashes Normal in the same version of "edge" Normal before 95 version
Version SDK: Runtime: 96.0.1054.34 Framework: OS: windows 10
Repro Steps Running the above code crashes
Screenshots Additional context
AB#37207918