Open NearEternal opened 9 months ago
I get this error also.
For me it worked yesterday. But, I finally decided to let Windows update to 22H2 (from 21H1) just now. And now my apps are broken. That's what I get for allowing updates I guess... 🙄
The only option for Microsoft Edge WebView2 Runtime (in Control Panel appwiz.cpl) is "Repair". The only option for it in Apps & features (Settings dialog) is "Modify", which only allows "Modify". I did that and it still doesn't work. I've tried many other suggestions from numerous sources without success.
I would love some additional suggestions! Preferably ones that don't involve me re-installing back to a clean Windows 10 and disabling updates. Again. 😉
I should note that this error may go away for me. Apparently, there are more updates still needed. 🙄
Reboot number 4 coming up. Maybe its reboot 5, I lost track... 😉
I will update here if the error gets resolved by an update.
There doesn't seem to be any more updates. No change. I still get the error... 😟
Here is another thread about 0x8007139F
error. The most probable root cause of the issue is that there is already another browser process running in the same user data folder with incompatible configuration, i.e. different browser arguments(AdditionalBrowserArguments
). You should be able to check it in Process Explorer or some other app. Also can try to start in new clean user data folder to confirm that it is the issue.
Thank you for the suggestion! 🙂 I'll keep an eye on that thread as well!
I ran into that situation earlier in development (already another browser process running in the same user data folder) and solved it by using a custom/unique user data directory that is specific to my app.
For good measure, I closed all instances of (any) browsers and most apps, just in case. I then also tried explicitly setting the profile and user-data-dir command-line arguments. Same error.
@vbryh-msft, I tried two of the samples you recommended in the other thread, with the same results. Lunch is over, I'll check back in tonight and try some more..
@kodybrown from your traces the webview2 runtime can not be started because of incompatible DPI awareness. The expectation in traces is that it should be 2
but the ask is to have DPI awareness as 1
. Could you check what is the value of __COMPAT_LAYER
env var when host app is started and what is DPI awareness of host app?
Is there a solution? I am having the same error with the sample apps. System.Runtime.InteropServices.COMException: 'The group or resource is not in the state required to perform the requested operation. (0x8007139F)'
Hi @carrie-battaglia - you would need to understand why it happens in order to fix it. Have you read the threads how to troubleshoot?
I have tried many changes – is there some info you want me to collect that will help? Thank you
From: vbryh-msft @.> Sent: Wednesday, February 7, 2024 4:15 PM To: MicrosoftEdge/WebView2Feedback @.> Cc: Carrie Battaglia @.>; Mention @.> Subject: [External] : Re: [MicrosoftEdge/WebView2Feedback] [Problem/Bug]: Microsoft.Web.WebView2 throws an System.Runtime.InteropServices.COMException (0x8007139F) randomly (Issue #4218)
Hi @carrie-battagliahttps://urldefense.com/v3/__https:/github.com/carrie-battaglia__;!!ACWV5N9M2RV99hQ!O9U0kLv0-uxEPfokfPB5Iclqa80ZqAgY_tsKfxOp0qI3GulzpbFr8hZ0f7WN_VqJktvhAcZm6vlk82NChV-rY4GWyKgjYw$ - you would need to understand why it happens in order to fix it. Have you read the threads how to troubleshoot?
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/MicrosoftEdge/WebView2Feedback/issues/4218*issuecomment-1932927167__;Iw!!ACWV5N9M2RV99hQ!O9U0kLv0-uxEPfokfPB5Iclqa80ZqAgY_tsKfxOp0qI3GulzpbFr8hZ0f7WN_VqJktvhAcZm6vlk82NChV-rY4GJYcjMlg$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/BD5YGTMPUCQBOZUZU5ZYZNLYSPVFZAVCNFSM6AAAAABAJIFUJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZSHEZDOMJWG4__;!!ACWV5N9M2RV99hQ!O9U0kLv0-uxEPfokfPB5Iclqa80ZqAgY_tsKfxOp0qI3GulzpbFr8hZ0f7WN_VqJktvhAcZm6vlk82NChV-rY4ENd7kE5g$. You are receiving this because you were mentioned.Message ID: @.***>
@carrie-battaglia - can you collect traces when you repro it?
I have seen this error; as I found that a second attempt to create the environment after closing my application always worked; I implemented a try catch with a 5 second delay and then retried to create the environment.
The retry has worked...
I followed the directions for the trace and found that I have Microsoft Teams running in the background (which has multiple msedgewebview2.exe's in task manager). I don't use that app - maybe it started from some update. Once I quit that app, the sample ran without the exception.
So the issue now is, how will my webview2 component work if a user has anything else running that uses webview2? I'm assuming this might have to do with setting a unique environment but I have not gotten that to work correctly.
I submitted this issue a few months ago: https://github.com/MicrosoftEdge/WebView2Feedback/issues/4163 but have not gotten any feedback (during a build, my VS project launches msedgewebview2.exe and does not clean them up. When I run the project, I get the exception 'The group or resource is not in the state required to perform the requested operation. (0x8007139F)').
@carrie-battaglia sounds like you have user data folder override somewhere in you system (WEBVIEW2_USER_DATA_FOLDER env var or reg key) and each app tries to attach to browser started from that UDF. UDF overrides are intended to be used for debugging purpose only. Here is some reading about process model. Hope it helps.
What happened?
This is crazy! I got a System.Runtime.InteropServices.COMException: 'The group or resource is not in the state required to perform the requested operation. (0x8007139F)' at very simple sample Application. I simplify made basic Microsoft Visual Studio 2022 Windows c# Forms Application and add latest stable version of that Microsoft.Web.WebView2 nuget package, some Designer changes and that code below:
Everything, other code and settings etc. are exactly at default values.
And one very strange thing is that at first this code worked perfectly fine, but then once I ran again my project I got this error.
I tred to found something from the internet, but everything info about these I found not worked for me or was too hard to understand... :(
Can someone please help me!
Things I have tried:
Changing the code
Reinstalling the nuget package
Using different (older) versions of the nuget package
Creating new clear project
Disabling firewall
Fixing Microsoft Edge WebView2 Runtime from Control Panel
Changing network
Importance
Blocking. My app's basic functions are not working due to this issue.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
1.0.2151.40
SDK Version
1.0.2151.40
Framework
Winforms
Operating System
Windows 10
OS Version
19045.3693
Repro steps
It seems that if I change the solution this error appears and this might be some kind of cache error. So if I took Microosft's Webview2 Sample Repo, it worked for a while, but when I removed one other project from this solution, it also stops working.
Repros in Edge Browser
Not Applicable
Regression
Don't know
Last working version (if regression)
No response