When trying to load a web page using TTMSFNCWebBrowser, I get the following error:
"Could not initialize edge chromium please check if webview2loader _x64.dll is correctly distributed and accessible."
The WebView2Loader_x86.dll and WebView2Loader_x64.dll are in their respective folders, namely System32 and SysWOW64, which makes no difference for the error. Any advice?
Finally, can you please explain how this control can be used on cross platforms, but it states that the DLL files WebView2Loader_x86.dll and WebView2Loader_x64.dll need to be distributed with your application? This is obviously impractical when deploying to Android and iOS platforms. You do however outline an alternative which is " Edge WebView 2". Should this be used then for cross-platform applications when the application is not specifically targeting Windows?
the DLLs are only necessary on a Windows platform. For the other platforms, no additional files are required. Can you please try installing the WebView2 runtime from this link:
I installed " Evergreen Bootstrapper", but the same error message is presented? The DLL's are also in the correct locations, but the same error persists using Windows 10 64-bit.
Any other advice?
Did you install the 64 bit version of the runtime? Alternatively, you can also point to the DLLs by setting the global EdgeDLLPath variable in the initialization section of the form of your application.
Should Evergreen Bootstrapper be installed onto Windows at all? When is this needed?
Yes, I installed the Evergreen Standalone Installer for x64 as well as the Evergreen Bootstrapper. The same error persists when launching the application.
Please read the following 2 links:
The Evergreen Runtime is required when distributing apps targeting Edge Chromium. Microsoft plans on providing the runtime through Windows updates in the future, but for now, an additional installation is required. By default the stable version that already comes with Windows updates is copied by our source implementation, but unfortunately there seems to be issues using this method, therefore the alternative (and what Microsoft recommends) is to install the evergreen runtime. This should be sufficient to allow the TTMSFNCWebBrowser load and initialize edge chromium. Can you also specify which version of Edge Chromium you are using? Do you see an initialization message inside the browser component at designtime?
- I'm using Edge Chromium version 89.0.774.45.
- Yes, I see the successful initialization message within the TTMSFNCWebBrowser. It says "EDGE CHROMIUM 89.0.774.45 IS SUCCESSFULLY INITIALIZED!". As soon as I launch the app, I get the reported error message.
Just to confirm, it has nothing to do with the default browser settings being something else other than Edge?
What else am I missing?
Yes, I downloaded and installed the file "MicrosoftEdgeWebView2RuntimeInstallerX64.exe".
Which target did you set in your project inside the RAD Studio IDE? 32 bit or 64 bit?
We have tested this here but are not able to reproduce this here.
Please note that System32 is the 64 bit folder on 64 bit operating systems and SysWow64 is the 32 bit folder on 64 bit systems. It doesn't make sense what Microsoft has done here, but you can find more info here:
So we recommend to copy both DLLs in both folders
Yes, it is very confusing for Microsoft to work with said folders this way.
I can confirm that it is working now after copying both files "WebView2Loader_x86.dll" & "WebView2Loader_x64.dll" into the System32 and SysWOW64 folders.
Alternatively, you can also specify your own path to the DLLs by using the EdgeDLLPath global variable in the initialization section of the form.
Do you perhaps have an example of this?
Just specify the path to the DLLs:
EdgeDLLPath := 'C:\MyPath';