-
Notifications
You must be signed in to change notification settings - Fork 143
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
Edge: Strange error when disposing a new Browser instance immediately after creating it #1664
Comments
I'm also seeing this in my console with the installer and when launching an IDE upon termination.
|
I've seen that for a long time using Edge in our RCP app. If you do a web search on that message you'll find that it's been around for a long time. And see #1498 |
The error handling in Lines 586 to 601 in 1ced8a9
In this case I think we are seeing 'The creation will fail with Defaulting to |
cc @amartya4256 , @akoch-yatta |
FYI, this workaround works okay:
The workaround above broke other logic that relied on posting events for delays processing... |
This error shows up also in the builds in I added it to our board: vi-eclipse/Eclipse-Platform#163 |
I agree that we need to implement that case. I actually have a branch lying around to implement this but forgot to propose a PR from it so far. I will do that today. Still, that does not seem to be the issue that we face here. The error code for an aborted operation is |
There is currently only few handling for failures during initialization of an Edge browser / WebView instance. The Microsoft documentation provides further information on this, in particular: - ERROR_INVALID_STATE indicates that multiple Edge instances with the same data folder but different environment options exist - E_ABORT indicates an active abortion of the initialization process - On any other non-OK return value than the above ones, the app should retry initialization of the instance; to avoid endless waiting, the number of retries is currently limited to 5 This change adds appropriate handling for these scenarios, consisting of uniform rollback logic when the initialization fails or is aborted and retry logic to make repeated creation attempts. Contributes to eclipse-platform#1664
There is currently only few handling for failures during initialization of an Edge browser / WebView instance. The Microsoft documentation provides further information on this, in particular: - ERROR_INVALID_STATE indicates that multiple Edge instances with the same data folder but different environment options exist - E_ABORT indicates an active abortion of the initialization process - On any other non-OK return value than the above ones, the app should retry initialization of the instance; to avoid endless waiting, the number of retries is currently limited to 5 This change adds appropriate handling for these scenarios, consisting of uniform rollback logic when the initialization fails or is aborted and retry logic to make repeated creation attempts. Contributes to eclipse-platform#1664
There is currently only few handling for failures during initialization of an Edge browser / WebView instance. The Microsoft documentation provides further information on this, in particular: - ERROR_INVALID_STATE indicates that multiple Edge instances with the same data folder but different environment options exist - E_ABORT indicates an active abortion of the initialization process - On any other non-OK return value than the above ones, the app should retry initialization of the instance; to avoid endless waiting, the number of retries is currently limited to 5 This change adds appropriate handling for these scenarios, consisting of uniform rollback logic when the initialization fails or is aborted and retry logic to make repeated creation attempts. Contributes to eclipse-platform#1664
I just found that I actually already created an according PR: That one also adds specific handling for the error that we see reported here (error code 139f). I've updated the PR, so that we can further process it. |
Found this related to the error code 139f here: MicrosoftEdge/WebView2Feedback#2495 |
@merks Is there anyway I can reproduce it locally? I can't manage to reproduce the exception using the SDK product. |
There is currently only few handling for failures during initialization of an Edge browser / WebView instance. The Microsoft documentation provides further information on this, in particular: - ERROR_INVALID_STATE indicates that multiple Edge instances with the same data folder but different environment options exist - E_ABORT indicates an active abortion of the initialization process - On any other non-OK return value than the above ones, the app should retry initialization of the instance; to avoid endless waiting, the number of retries is currently limited to 5 This change adds appropriate handling for these scenarios, consisting of uniform rollback logic when the initialization fails or is aborted and retry logic to make repeated creation attempts. Contributes to eclipse-platform#1664
There is currently only few handling for failures during initialization of an Edge browser / WebView instance. The Microsoft documentation provides further information on this, in particular: - ERROR_INVALID_STATE indicates that multiple Edge instances with the same data folder but different environment options exist - E_ABORT indicates an active abortion of the initialization process - On any other non-OK return value than the above ones, the app should retry initialization of the instance; to avoid endless waiting, the number of retries is currently limited to 5 This change adds appropriate handling for these scenarios, consisting of uniform rollback logic when the initialization fails or is aborted and retry logic to make repeated creation attempts. Contributes to eclipse-platform#1664
If you provision an IDE with both Oomph and SWT: then you should be able to reproduce it there. If the targlet task fails, just perform the setup tasks again. You can go back to before this commit: But when I tried that, I can't reproduce the problem anymore now either. So I'm not sure what commits all changed the behavior or what else might have changed... In any case, the changes I made to avoid the problem are just fine, so I'm okay if this problem is simply closed because surely this must be come strange corner case. |
Thank you, Ed! I cannot reproduce the issue with just starting the installer from the workspace either. I am only able to produce the issue when I start the installer with an explicitly changed Edge browser configuration while having an installer with the original Edge browser configuration running:
That is somehow "expected" as that's exactly the case where this error should be thrown. The data folder is, by default, placed in a subfolder of your AppData folder, named according to the Eclipse application. So for the installer, it is: "C:\Users\YOUR_NAME\AppData\Local\Eclipse Installer" So assuming that there was actually another Eclipse application named "Eclipse Installer" running at the same time when you faced the issue, the question remains why that one had a different configuration of the Edge browser. I could imagine that it may be because the other application was running with a different localization. Or maybe you had some other installer based on a different build (using some other configuration) running at the same time. No matter which configuration was different, starting another Edge instance with a different configuration on the same data folder should actually be the one reason specified by Microsoft causing that error. So for me the question is whether this was really a corner case or whether it is something that may happen more often and requires some improvement. In "usual" Eclipse applications (with a workspace) this will not happen because the data directory is placed within the workspace metadata folder instead of the AppData folder. On solution to avoid that multiple applications having the same name use the same Edge data folder might be to of a different identifier used to create that folder withint the AppData folder, such as encoding the file system path to the application or the like. |
There is currently only few handling for failures during initialization of an Edge browser / WebView instance. The Microsoft documentation provides further information on this, in particular: - ERROR_INVALID_STATE indicates that multiple Edge instances with the same data folder but different environment options exist - E_ABORT indicates an active abortion of the initialization process - On any other non-OK return value than the above ones, the app should retry initialization of the instance; to avoid endless waiting, the number of retries is currently limited to 5 This change adds appropriate handling for these scenarios, consisting of uniform rollback logic when the initialization fails or is aborted and retry logic to make repeated creation attempts. Contributes to #1664
When using the latest target platform, starting the installer logs exceptions like this:
I was messing around with the code that tests whether a browser can be created:
Adding the
while (shell.getDisplay().readAndDispatch())
makes the problem go away, so I think if one creates a browser and disposes it, there are maybe still events processed later for that browser that fail in this strange way. Does anything guard that you aren't trying to process something for a disposed Edge instance?The text was updated successfully, but these errors were encountered: