-
Notifications
You must be signed in to change notification settings - Fork 54
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
Don't make Installer required #341
Comments
That just seems to be under the
Does "package" here perhaps mean some static executable/library inclusion? I remember this docs page stating exactly that with more clarity in an earlier version, but perhaps I'm remembering wrong. It makes sense to me that you cannot expect to distribute a static executable that is kept evergreen. |
@bddckr "The fixed version distribution mode allows you to select and package a specific version of the WebView2 Runtime." Do you want to package the runtime with your app? It means you need to ship the runtime with your app, and you are responsible for updating it: I quote the whole Fixed Runtime passage:
If we have to ship runtime (the whole chromium) with the application, and each webview user must update their runtime manually, it defeats the purpose of webview. One could as well use Electron then, no? We should be able to target stable Edge user already has installed. This is the way webview works in Mac too, one doesn't ship runtime per webview app, and you can write static executables for it just fine. Indeed, I don't want to have different runtimes of Edge on my machine. It wastes a lot of memory if each webview potentially uses different Edge runtime. |
So I understand now, the issue is about a change to no longer support the only runtime provider a regular user will have in the future: The Edge stable channel. 👍 I'm dumb, whoops. I definitely would like to stay evergreen as part of the user's own Edge update mechanisms and not ship huge binaries myself. Agreed on the point to just go with Electron then (which offers a more mature ecosystem in the first place).
The reason is explained in the document:
Fingers crossed the following sentence basically just needs clarification to mean "Once GA is reached the Edge Stable Channel is able to be utilized as the WebView2 Runtime", though it sounds more like
|
I hope this installer craze is just temporary until stable Edge ships with the runtime? I don't know how to interpret all this unfortunately. I just don't want to package my tiny and nice Rust apps with installer. I don't even get it why we have to drag the webview2.dll with us. Can't the DLL come with the stable Edge, and be in known location so we can LoadLibrary it? The installer part is so exciting to Microsoft that they have drawn a picture for it: https://developer.microsoft.com/en-us/microsoft-edge/webview2/ yet I don't want to have installers for my executables. |
Sorry for the late reply. W.r.t. WebView not being able to use Edge Stable, it is a deliberate choice we've made. Let me explain this a little further. Besides the reasoning stated in the doc, there are also issues on,
That said,
|
@liminzhu thank you for your reply.
I understand that this is not decided yet, if, and how, and when that is done. IMO, Webview Runtime must be pushed to stable users of Edge. Otherwise this does not work like webview implementations in other operating systems. Webview users assume it's like a part of OS (or the browser). Consider projects like this: https://github.com/webview/webview Implementation, and the upstream projects pretty much assume there is no installer involved. There is already bindings to Rust, Deno, Node etc., and having an installer for each webview application in upstream is not ideal. |
I agree with your sentiment. The hope on our part (again, please do not take this as a promise) is that,
And to be clear, even if all these happen, there is no way for us to ever guarantee that every single Windows users automatically get WebView2 (e.g. if we service WebView2 to older versions of Windows through update/patch, there are users who turn that off) and installer is useful in that case. However, you can argue that if you don't want to carry the installer, the risk is much smaller once the runtime becomes more universal. |
Whatever you decide about distributing, the official and working WebView2 control should be a priority because IE 11 control is no longer supported by a lot of third-party vendors. Therefore, the missing control is a BIG showstopper. |
Yeah - I am thinking that at https://github.com/webview/webview we need to become more vigorous about detecting the current state of the system - potentially even shipping a native window informing the user to download the official WebView2. Because right now this all seems very much like a Sisyphus task and it's not very sustainable in the short-term. |
Not blaming anybody, but I initially thought that the Webview2 already shipped with the stable Edge, using similar reasoning as @LukeOwlclaw here: MicrosoftEdge/WebView2Samples#42 (comment)
I wouldn't be surprised if others have made this same miscalculation. It was one the reasons I invested time to study this API in the first place. |
@Ciantic as a thought experiment, before we talk about long-term pushing WebView2 Runtime to end users, would an API that lets you programmatically install WebView2 Runtime be helpful (instead of having to packaging the installer with your app and invoking it in your installer)? |
@liminzhu - can't speak for OP, but this would be a fantastic solution for the webview community in my opinion. |
@liminzhu of course it would help too, it would probably make using the webview/webview easier. The plan would then roughly be to include a function in the webview2 DLL To me mentally the old plan (as I understood it) was easiest to understand: If you had stable edge, webview2 worked. When Windows 20H1 shipped with stable Edge, I thought this was the time to look at it because it was bundled with Windows. Installer is always extra step compared to that old model. I wouldn't be surprised if there needs to be multiple ways to distribute this for maximum availability:
I actually don't care too much, but packaging with an installer is a problem at least, because that's not how WebView API wrappers like webview/webview work. |
The idea is quite simple. We planned to release a bootstrapper installer for WebView Runtime (a couple MBs, pulling the RT bits from internet then installing it, in additional to the current stanbdalone all-inclusive 80MB installer). You can either package the bootstrapper with your app, or use a fwlink to download the bootstrapper from our CDN and then invoke installation, which allows you to skip packaging it. The API is basically doing this for you - downloading the installer from fwlink and then installing it, which makes the workflow easier. Obviously this only works for connected devices, offline there is no way around carrying the standalone installer with you. Having RT inbox and pushing RT to end users is sort of another effort that is being considered, and have a lot of more complexity that affects the timeline. |
I assume this is the webview2 DLL API you are talking about. Does it do that automatically or will there be a function? If it does this automatically, then this whole conversation is a bit silly. I'm by no means expert with webview/webview code to say how this affects it. I think @nothingismagick knows it well enough to judge what would be the appropriate behavior for installation, but I suspect something simple like having a function Only thing I can say out of hand is that packaging the downstream webview apps with installer is not a good solution: Let's say I build "someapp.ts" with webview/webview_deno. It's not viable to expect the someapp.ts be packaged with an installer, because it's just typescript files. What is viable though is that the webview/webview triggers the installation from webview2 DLL function if necessary, if API provides it. |
It'd be a function. Again, this is a thought experiment to gauge interest, not super fleshed out and designed yet.
This sounds interesting. Not an expert on this, do you have to install deno or something to make it work? Is it packaged with the app? |
Well the deno is just an example, you can run deno apps from URLs e.g.:
(Which is kind of cool and dangerous at the sametime to run native code from URL, but I like it a lot. I can just manage my app in the URL, there is no distribution pains at all, it's just URL.) I understand that to make it fully fleshed out app if you don't have deno, you'd probably need installer at some point, hence there would packaging. But webview apps are not many times always packaged, like if I build an app with Rust, I just get executable out, there is not installer, it just works. |
This is important to me and makes distribution so much easier nowadays. This is the same with .NET Core - especially with the self-contained deployment model of it there is no need for an installer to begin with. But the bootstrapper sounds good enough to me compared to an additional API - I have no issue with downloading and running that manually myself in my apps, and I'm sure That said, we all obviously would prefer the inbox distribution, as seen by this issue. If my users disable the inbox distribution I am happy to explain the situation to them and either leave up the manual runtime installation to them, or use the bootstrapper myself for them. Summary/random thoughts/further question:
|
No doubt this is something we're working towards! I just want to make it clear that until we get this sorted out with Windows folks etc., we shouldn't promise anything :).
The GetAvailableCoreWebView2BrowserVersionString is designed to tell you whether the web platform is there and what version is there. It will go something like this
I feel like there is a lot of confusion around Runtime, installer, and how to handle all of these. We will definitely make more efforts towards our documentation with more explanation and sample code.
For EdgeHTML WebView, it ships with Windows and gets updated along with Win10. This means no win7, and each version of OS has a different version of WebView. I think once we get WebView2 inbox, the distribution story is at least on par with EdgeHTML WebView (even better, b/c WebView2 gets updated out of band from the OS, so you don't have to deal with different win10 with different WebView2) but it will take time for users to migrate to latest version of win10 and practically unusable for a long while if this is the only thing we do, which is partly why we're doing this installer thing. |
Oh I forget to point out that we will also have a fixed version mode where you can package the runtime with the application and you don't need to run any form of installer. The downside is that you'd be responsible for the footprint since this is only for your app and not a shared component, and there is no update to fixed version mode (any component that tries to update itself have to go through an installation process). This is essentially how Electron, CEF, and .NET self-contained mode works. |
The downside is that it heavily bloats up the application size. WebView is just a control and works out of the box. WebView2, as the official replacement, comes with pre-requirements that are not part of Windows by default. This is a huge problem. While previously every developer could embedd IE or Edge, this time the end users will get: a) Large applications that may be insecure because the developer don't release an update immediatley after a security patch was applied to Chromium Edge. And last but not least, we're back with the issues of silent crashes because a pre-requirement is missing. In .NET, you cannot perform checks if its missing and prompt a messagebox. We would have to go back to native wrappers or native installers which ensure everything is installed before our application launches. Unless whatever WebView2 requires isn't shipped by default in Windows Update and pre-installed... or embedded into .NET Core runtime... I won't ever switch to it and I'm sure most others won't either. At the current state it causes more troubles than it solves. |
We are working towards having WebView2 inbox on Windows in the future. The predicament installer trying to solve is that many developers don't want their software to only work on a late version of Windows 10 and onward. For developers who only targets the latest and greatest Windows 10, this is not an issue when WebView2 is inbox.
Only the first WebView2 app on the device is installing the runtime. And over time as WebView2 becomes more universal, you will run into less and less cases where installation is needed.
We will provide a regkey to check Runtime presence and version. |
We are working on improving our runtime documentation, but I want to post relevant information here first since docs may take time. Premise for WebView Runtime
The first premise drive us to make WebView2 Runtime and installer, to allow WebView2 to run in places where Edge isn't there. The other two led us to disallow WebView2 to target Edge Stable directly, so that WebView2 can be evergreen and update separately from Edge. There is on-going effort to include WebView2 Runtime inbox in future versions of Win10, and investigation on whether we can push this to end users downlevel (do not take this as a promise). For deployment of evergreen WebView2, we are exposing the following (either already exposed or soon)
Note - we will only have per-machine install of RT in the immediate term. This requires elevation to install silently, or end user will see UAC prompt and installer UI. Per-user install of RT is something we plan to look into, assuming developer demand. The best practice is to check RT presence (using regkey or our API) and install if missing before your app creates WebViews. You can do any of these at install/update time (recommended), or app runtime
We will improve our documentation and sample code showcasing some of the workloads (probably not the make-your-own-bootstrapper one) in the coming weeks. Besides evergreen WebView2, there will also be a fixed version where developers can find WebView2 Runtime in loose binaries form and package the binaries with the app. Developer is responsible to update the binaries. This is similar to how CEF/Electron works. |
Having 90 megabytes evergreen WebView2 Runtime bits in our installer is ok for me. How does this WebView2 Runtime update itself? Will the updates be available through WSUS as the Edge itself? |
Does Edge Stable not include WebView2 Runtime? Do I have to install and patch ist seperately from Edge? |
Edge Stable Doesn't include WebView2 Runtime and WebView2 Runtime isn't patched through WSUS. Haven't heard any news about WSUS support since August 2020. See this comment #341 (comment) |
Quote from @liminzhu 16th Dec:
This is really encouraging to hear. It would be great if that could be made clearer in the documentation, e.g. here: There is no reference made to being able to rely on forward compatibility, instead the best practice suggestion to constantly test against newer versions of the Evergreen runtime suggests that Microsoft might be considering to break older APIs in newer versions. The key problem here is to update older software relying on the WebView2 runtime in environments where updates can't be rolled out easily. |
@bgxie We'll look at improving the docs. However, we still recommend testing against newer versions not for API compatibility, but for other potential issues. The Evergreen Runtime is always changing along with the web (it's built on Edge Chromium) and while we make every effort to make sure we validate that these changes don't interfere with APIs or other functionality, bugs do sometimes make it to the stable runtime. The sooner we hear about these from partners testing their apps against Canary or Dev, for example, the sooner we can fix the issue before it ships more broadly. |
@champnic Are you for real? This issue was posted nearly a year ago, and now you claim that "The sooner we hear about these from partners testing, the sooner we can fix the issue before it ships more broadly." It is obvious that it will not "ship more broadly" in the foreseeable future. You are just placating the people who have expressed their annoyance at Microsoft's inaction, which causes even more distrust for Microsoft's development team. Either give a date when WebView2 will be included with Edge Stable, or admit that this will not happen in the foreseeable future. Stop bullshitting us. |
@ftppro Sorry for any confusion I caused you - "ship more broadly" was in reference to the stable runtime getting an update. |
@champnic the level of frustration and dissatisfaction is simply because this whole thing has been handled very badly, and has dragged on for far too long. |
@liminzhu @champnic There are at least 10 posts in this thread from Microsoft Reps, who do not respond to the issue that this thread was created for. Instead, they try to convince developers to use a bloated Runtime. We do not wish to use a bloated Runtime that Microsoft can update at any time without the user's permission. We wish to know when we can use WebView2 without installing a Runtime component. Thank you for your consideration. |
Edited, revising my initially shocked reaction, trying to make a business case: There is an issue with instantiating WebView2 on .NET 4.6.2 as to the published system requirements which was first reported in Feb 17, but despite acknowledgement was not fixed in the next update and hasn't been fixed since. A simple standard test set-up should have caught that, but it was missed twice. See #946 This gives the impression that maybe not every effort is made to guarantee forwards compatibility and, given the comments, that there is an attitude that, since the internet is changing anyway, it is acceptable to occasionally break the runtime or roll out changes that require users to e.g. update their .NET framework, only catering for environments where this is no issue. But this is not always the case. Being able to build software that can be reliably rolled out in environments that strictly meet the requirements as laid out in the documentation is imperative. That issue #946 has effectively left one of our evaluation clients deployed in a respective environment broken for weeks. The comments made in that thread and this one do not give the impression that there is much urgency in fixing this. Falling back on the fixed version runtime is not a good solution. It doesn't suit many use cases and it would indeed be good if the runtime gets updated to meet changing circumstances. It would be really important to see commitment by Microsoft to guarantee real best efforts in meeting forwards compatibility. Making this a key point in the documentation and seeing bugs breaking deployed clients fixed immediately would go a long way to instill confidence. As it is we cannot rely on WebView2 to create stable software. |
Edge webview2 should be classified as a "potentially unwanted application" by anti-virus software. I had to uninstall it three times, and it keeps installing itself silently, overriding the official group policy documentation. Perhaps this issue should be mentioned in other popular tools. |
Confusing messages from Microsoft. Can someone please clarify what is the plan, if there is one? If the WebView2 will be distributed with Windows or with Edge? Mar 2, 2021 May 25, 2021 Starting on April 1, 2021, WebView2 Runtime will be installed on devices running Windows and that have Version 2101 or later of Microsoft 365 Apps installed. |
https://blogs.windows.com/windowsdeveloper/2021/06/24/what-windows-11-means-for-developers/ |
Hey @apisarev - WebView2 Runtime is decoupled from the OS in that it doesn't require a specific version of the OS (Win7+) to run. However, it will be included inbox starting with Windows 11. Office has started using the WebView2 Runtime on Versions 2101+ and so is installing it on machines that don't already have it. |
What does "it will be included inbox" mean? I don't recognise this sentence structure. Please clarify. |
This means when a user installs Windows 11 or buys a Windows 11 machine WebView2 will already be included and won't need to be distributed or installed by your app. Thanks! |
How WebView2 is updated in Windows 11? Is WSUS supported? |
Yes. WSUS is required for domain-joined (enterprise) computers. |
The inbox WebView2 will be updated the same way it is today, through the WebView2 updater. Enterprises can disable these updates using policy: https://docs.microsoft.com/en-us/deployedge/microsoft-edge-update-policies#microsoft-edge-webview I believe we're working on a WSUS solution - @liminzhu may have more details. |
Why can't the WebView control deployment be as simple as the old IE based web control. The current deployment model requires having pretty sophisticated skills with say InstallShield - verifying registry settings, verifying OS's, synchronizing the download and running of the bootstrapper. It really seems like this could be made many orders of magnitude easier. I probably will go back to using Cefsharp (embedded Google chrome) since its NUGET package handles the install process for me by placing the required DLL's into the application's install directory. |
What is odd to me is, if you download the NUGET package on the development machine, the WebView control shows up in the Visual Studio toolbox and running in debugging works just fine - so why there is a need to go through all the installer trouble??? |
Hey @ThomCBlackwellBSS -
The old model was tied to the OS. Don't have the right OS? You don't get the web control. In that way, we're similar in that we are being included by default in Windows 11. So if you want to limit your app to Windows 11, you don't need to worry about the installer.
Our Nuget doesn't do it automatically, but if you want to include the bits in your application's install directory you can do so using the Fixed Version WebView2 Runtime: https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode Similar to CEFSharp, this version will not keep itself up to date, and you'll need to update it periodically if you want to stay current.
This is because you have the WebView2 Runtime installed on your development machine. On many other machines the experience will be the same. The problem is that we can't guarantee the WebView2 Runtime is on all machines you may want to run your app on, so we recommend deploying the WV2 Runtime with the installer in those scenarios. Hope this helps! |
Thank you for the quick response! I missed the part where the WebView control will be automatically part of Windows 11 - that is very good for the future. But you are correct - I do have to support Win 10 etc. variants. I did think about the static version but I did not come across the link you sent me - that helps! I've also put in a support request into InstallShield and if they help out with an example script to use the Evergreen approach I'll be happy to share it. Again thank you for information and fast reply. |
So the earliest Windows version that ships WebView2 inbox is Windows 11? Or are there any plans to also ship it with a future version of Windows 10? In any case, it would be very helpful if this would be documented properly, so that one does not have to search forever to find an (up-to-date) answer to this simple question. Also, this has quite an impact, because I believe adoption of future Windows 10 versions will stay higher than that of Windows 11 for a good amount of time to come, and if WebView2 can only be relied upon starting in Windows 11 this means developers will need to fall back to dealing with the convoluted installation process of WebView2 for years to come. Any information on this would be highly appreciated. |
This reply answers my question; yes, WebView2 will now also be rolled out on Windows 10. |
This is mostly done. We've completed rollout to all Windows 10 machines that we can, are inbox on Windows 11, and no longer support Windows 7 and Windows 8. Going to close this issue, as I don't believe we have any more planned work here. |
I just read following phrase:
Distributing my app
Have you gauged the interest among developers for that? To me that is a big downside. Why would I want my simple static executables require an installer?
To me ideal distribution method is following: Just use the stable channel Edge user already has installed. If user does not have Edge installed, then the app won't work.
Static self contained executables is the whole reason I want to use webview2 instead of Electron. I package the OS specific logic in the exe and let the webview render the UI. If I need to ask users of the small executable to install something it's not exactly the experience I want.
In many ways the current requirement to drag the DLL with me is also a pain, since I want static executable.
AB#29028418
The text was updated successfully, but these errors were encountered: