-
Notifications
You must be signed in to change notification settings - Fork 55
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
When the UDF folder is occupied and 0x8007139F appears, it is recommended to automatically create a new folder for internal processing #3668
Comments
@sln162 That's an interesting idea and I've added it to our backlog to investigate. We need to be careful when dealing with user data folder as the developer may not intend to automatically create a new one. Do you have some examples where you don't care having multiple user data folders? Would you need to combine the newly created UDF with existing one later, like in downloading you can download multiple copies but only 1 will be actually used? |
@novac42 UDF folders are better to have only one, but when this problem occurs, you have to switch to a new folder. So creating a new folder is necessary, and every time we encounter it, we also worry that there will be too many folders, so we control the number, such as up to 5 can be created, when the UDF at index 0 is not available, it will try 1-5, many times when it tries to index 1 it is already possible, and sometimes it may take two or three more times (we think the reason may be the multiple opening of the program), but it will not try the number of times we set. And the next time you initialize, you still start with index 0 first, which maximizes the reuse of folders and prevents infinite expansion. |
We also tried to delete the previous UDF and other solutions, but the execution would fail because of the occupation and could not be deleted. We had to delay the deletion and check whether the webview2 process was exited. It was very troublesome. We also tried to delete the previous folder every time we reopened the software, but we didn't understand the deeper mechanism of Webveiw2, so we chose the compromise solution in the previous message. You can take a simple reference. |
@sln162 the UDF is pretty important to the state of WebView2. An application changing UDFs between runs will lose cookies, storage contents, caches, etc. so I'm not sure it'd be broadly valuable to try to support this pattern.
Where did you see this suggestion? If you hit |
@aluhrs13 I disagree with your view. I understand what you mean, and when encountering this problem, you should study more deeply why it is triggered, but the user's environment is varied and the reasons are different, such as the different DPIs that cause it, why does the same program have different results? For example, there are other antivirus software occupying and scanning folders that cause the occupation (just an example), can we prompt the user to uninstall and exit your antivirus software? No, so we prompt what caused what, can they understand? It's better to directly create a new UDF to help them solve the problem, I think this is what the user wants. |
We also encounter very often 0x8007139F during initialization of a WebView2 on productive systems. To be more specific, on Windows Server 2016 Standard, because our applications are widely used on WTS. |
@fdzatdtv We will send the relevant information of various initialization failure events to our server, including 0x8007139F. When we encounter 0x8007139F, we directly replace the UDF folder and try again. If the initialization still fails, the software will report the initialization failure error information for the second time. For example, if we try up to 4 times, and the user's software sends 4 error requests in a short time, it means that the internal policy of the software has failed. If the user does not reach the maximum number of attempts, such as only sending once, it generally means that the internal policy of the software has worked. Of course, we also need to analyze other requests comprehensively, but this telemetry data is usually enough. |
This is not something we'd build into WebView2 itself, given that the work-around to do this in your application, we're going to close this as not planned. |
I believe many developers have encountered the issue of 0x8007139F, one of which is that the UDF folder is occupied, not in shared mode, or the DPI does not match, and so on.
The prompt message is: The group or resource is not in the correct state to perform the requested operation (Exception from HRESULT: 0x8007139F)
This can cause headaches for many developers who have to study and search around to find out the reason. The official suggestion is to specify a new UDF location, which is to set a new folder as the UDF folder.
I suggest that when encountering this situation, especially when the folder is occupied, it is possible to automatically create the folder directly. The location should still be in the UDF location specified by the user, and add names such as (1) and (2). Similar to when downloading from a browser, will it still prompt the user for duplicate files? No, it's automatic renaming and downloading.
Of course, in order to prevent users from not needing this feature, an option can be provided for users to choose from.
AB#45730263
The text was updated successfully, but these errors were encountered: