is the new Chromium based Edge html2 backend already available?
I tried using it, but the isBackendAvailable function just returned false, which implies that it is not available.
The new chromium basd edge browser is definitely installed on my system.
Do I have to manually activate the backend?
@cutright Thanks for the answer, did you get it to work?
I have wxpython 4.1.1 installed, which should be new enough?
Also edge is version 87 on my computer.
Unfortunately, I don’t know much more than what is in the above two threads. Although, I just tested the code I posted in those threads, and Edge works for me in 4.1.1. Although, I still have the Notebook issue.
Are you running his demo application? Or trying to run a specific example by itself? I had no luck with the latter.
is printing False, so either .../site-packages/wx/WebView2Loader.dll is failing to be loaded dynamically by wxWidgets, or that DLL is failing to load the Chromium Edge components. So that is the thing to focus on for the moment. Unfortunately I currently don’t know a whole lot about the implementation details there, so I can just poke it with a stick and make educated guesses…
You may be able to get some clues by running the sample in the depends.exe tool and see if it’s able to find and load WebView2Loader.dll. If it can then check what DLLs it is trying to load and failing to. You can also check if there is another WebView2Loader.dll on your system installed as part of MS Office or something, and copy it into the wx package folder and see if it works or not.
Finally, what version of Windows are you running? 32-bit or 64-bit? Is it fully updated? Is Python 32-bit or 64-bit? What’s the exact version of Edge you have installed? Is it from the main channel or the beta channel?
@Robin I was able to resolve the issue with the edge backend.
The documentation from microsoft says that the WebView2 Runtime has to be manually installed.
I installed from this source https://developer.microsoft.com/en-us/microsoft-edge/webview2/ (evergreen bootstrapper) and afterwards the html2 example in the demo.py works just fine with the edge backend.
Maybe this information should be added to the documentation?
Or didn’t you have to install the runtime manually @cutright?
Interesting. I was told that the only requirement is that Edge is installed (and building with the API, and distributing the WebView2Loader.dll)
Maybe the runtime is not installed with Edge on Windows Home? Anyway, you’re right, the docs should include at least something about trying the runtime installer if things don’t work.
I’m using Windows 10 Professional 64 bit.
The default Edge, which is Chromium, did not work with WebViewBackendEdge.
So I installed the Beta yesterday and it worked.
Standard: Version 87.0.664.57 (Offizielles Build) (64-Bit)
Beta: Version 88.0.705.18 (Offizielles Build) beta (64-Bit)
I believe so, yes. My application uses wxpython 4.1.1 and my users need to separately install MS Edge Beta (or default to IE backend). I’ve not come across a way to embed MS Edge with a wxPython app.
You’ll want to double-check to be sure, but I believe it is allowed to include installing the WebView2 runtime as part of your installation process, and I think that is enough to allow the edge backend for wx.html2 to function. I’ve only tested it on a system that had Edge installed and then uninstalled, so there may have been something left-over on the system that didn’t get uninstalled.
That’s a good thought. I only include WebView2Loader.dll, are you suggesting there’s something else I could include? That alone seems to only work if Edge Beta was installed (tested on Windows 7 & 10).
I guess I forgot the link. This is the installer for the WebView2 runtime. The WebView2Loader.dll included with wxPython is what is used to connect to the runtime. Based on some comments by others I think that the runtime is included when the Edge beta is installed, but it may not be included with a non-beta version.