InitializationError
There was an error creating the controller. (2)
Error code : 0x8007139F
Another browser is using the same user data folder.
What caused this error?
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Initialization Error
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Initialization Error
Hi,
This might be caused by two instances of the same application trying to use the same user data folder.
Read these pages for all the information :
https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2environment?view=webview2-1.0.1462.37#createcorewebview2controller
https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/user-data-folder?tabs=win32
This might be caused by two instances of the same application trying to use the same user data folder.
Read these pages for all the information :
https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2environment?view=webview2-1.0.1462.37#createcorewebview2controller
https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/user-data-folder?tabs=win32
Re: Initialization Error
i have set ExclusiveUserDataFolderAccess=false
Why still prompt this error?
Why still prompt this error?
Re: Initialization Error
i have set ExclusiveUserDataFolderAccess=falsesalvadordf wrote: Mon Dec 12, 2022 9:49 am Hi,
This might be caused by two instances of the same application trying to use the same user data folder.
Read these pages for all the information :
https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2environment?view=webview2-1.0.1462.37#createcorewebview2controller
https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/user-data-folder?tabs=win32
Why still prompt this error?
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Initialization Error
This is what the documentation says about that property :
https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions2?view=webview2-1.0.1462.37
https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions2?view=webview2-1.0.1462.37
The ExclusiveUserDataFolderAccess property specifies that the WebView environment obtains exclusive access to the user data folder. If the user data folder is already being used by another WebView environment with a different value for ExclusiveUserDataFolderAccess property, the creation of a WebView2Controller using the environment object will fail with HRESULT_FROM_WIN32(ERROR_INVALID_STATE). When set as TRUE, no other WebView can be created from other processes using WebView2Environment objects with the same UserDataFolder. This prevents other processes from creating WebViews which share the same browser process instance, since sharing is performed among WebViews that have the same UserDataFolder. When another process tries to create a WebView2Controller from an WebView2Environment object created with the same user data folder, it will fail with HRESULT_FROM_WIN32(ERROR_INVALID_STATE).
Re: Initialization Error
https://github.com/MicrosoftEdge/WebView2Feedback/issues/3029