Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Error instanting WebView: The system cannot find the file specified. #133

Open
donhuvy opened this issue Jan 4, 2021 · 20 comments
Open

Comments

@donhuvy
Copy link

donhuvy commented Jan 4, 2021

image

image

This is my full source code: BlazorDesktopApp.zip

@donhuvy
Copy link
Author

donhuvy commented Jan 4, 2021

BlazorDesktopApp.zip

@donhuvy donhuvy changed the title Error instaning WebView Error instanting WebView: The system cannot find the file specified. Jan 4, 2021
@donhuvy
Copy link
Author

donhuvy commented Jan 4, 2021

System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

@joshdavidson613
Copy link

donhuvy - I am having the EXACT same problem.

@donhuvy
Copy link
Author

donhuvy commented Jan 5, 2021

@joshdavidson613 , I think about convert ASP.NET Core Blazor WebAssembly (all of Client project, Server project, Shared project) to Desktop app. I think a better WebView, we can run dotnet run in Server project source code, then run it. No need WebView for Desktop, use web browser, still no need Server PC.

@havenindustries
Copy link

I am having the same problem as well, did any of you find a solution?

@joshdavidson613
Copy link

No, not fixed. It has to do with something in the CEF libraries, so it is pretty deep in there.

@TheCakeMonster
Copy link

I've managed to get past this problem by installing the latest version of Edge from the Dev channel - version 89.0.767.0. However, it only raises a separate problem - the error message "The specified procedure could not be found".

If I open the WebWindow.Native solution it won't build with an error on line 34 of WebWindow.Windows.cpp; this seems to suggest that one of the method signatures has changed.

I notice that the WebView2 runtime is now officially released - for Windows at the very least - so I'm wondering if it's now possible to update WebWindow.Native to make use of that somehow for a more stable solution.

@ericnyc646
Copy link

I have the same issue as everyone else.

@TheCakeMonster
Copy link

I think Mobile Blazor Bindings is the logical successor to this experiment, and if I understand it correctly it will become part of .NET MAUI in .NET 6. I'm trying out MBB in .NET Core 3.1 and it's going really well. There are a couple of missing bits of functionality, but very few, and I've encountered very little by way of issues.

It might be worth you having a look at that.

https://github.com/dotnet/MobileBlazorBindings

Have a go with the hybrid app template, which creates a working solution that shows that whilst you can use XAML, you can also/instead use standard web razor syntax - so you have the choice of whichever best suits you.

@TheCakeMonster
Copy link

TheCakeMonster commented Feb 26, 2021

********** CORRECTION! THIS IS NOT TRUE! The released WebView2 does work for MBB; install that for any environment for which it is available, and then you don't need the canary/dev version of Microsoft Edge ************

It's all covered in the comprehensive documentation, but it's worth calling out that if you use the HTML UI in Mobile Blazor Bindings then you need to have a dev version of Microsoft Edge installed for it to show up - I think that's true even now in Feb 2021, long after the official release of the installable WebView package.

@dcuccia
Copy link

dcuccia commented Feb 26, 2021

It's all covered in the comprehensive documentation, but it's worth calling out that if you use the HTML UI in Mobile Blazor Bindings then you need to have a dev version of Microsoft Edge installed for it to show up - I think that's true even now in Feb 2021, long after the official release of the installable WebView package.

@TheCakeMonster there's also an "evergreen" standalone installer:

https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section

More info here: https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution

@TheCakeMonster
Copy link

@dcuccia OK, thanks, I'll check that out again then. I thought I'd already got that installed and yet still found that I needed a canary version of Edge to have anything show up in the app, but maybe I'm wrong.

@dcuccia
Copy link

dcuccia commented Feb 26, 2021

Think it worked for me, but lmk how it works out.

@TheCakeMonster
Copy link

@dcuccia Yep, you're absolutely right. I think I must have uninstalled the WebView2 runtime after this sample app didn't work with it. Now that I've reinstalled it and uninstalled the dev version of Microsoft Edge, my Mobile Blazor Bindings application still works correctly - on Windows x64 anyway.

Thanks!

I've added a correction notice to my previous comment in an attempt to minimise confusion for those who come after us :-)

@fingers10
Copy link

any updates on this? I'm also facing this error not able to run blazor desktop sample. Please assist.

@BennyBread
Copy link

I'm also having the same problem.. Has anybody managed to run the WebWindow?

@julienGrd
Copy link

I'm also having the same problem.. Has anybody managed to run the WebWindow?

This project dont make sense now with .net Maui. It should bé closed. Take a look at .net Maui it should fit your needs

@mhrastegari
Copy link

mhrastegari commented Apr 27, 2023

I'm also having the same problem.. Has anybody managed to run the WebWindow?

This project dont make sense now with .net Maui. It should bé closed. Take a look at .net Maui it should fit your needs

Nonsense :)
Imagine you're creating an app for ecommerce. You don't care about using native UI.
It's enough to have just Blazor for doing all UI and make it run on all 3 Desktop Platforms.

Plus who said MAUI supports WPF, mac cocoa and GTK?!

@derekantrican
Copy link

derekantrican commented May 12, 2023

I also got this with the sample HelloWorldApp as it is currently. Just cloned the repo, opened WebWindow.Samples.sln, started it up and hit this error. Definitely needs to be fixed. I definitely have chromium-based Edge installed, so not sure what else is failing (or if it would be simple to fallback to something else like old Edge).

@julienGrd
Copy link

I'm also having the same problem.. Has anybody managed to run the WebWindow?

This project dont make sense now with .net Maui. It should bé closed. Take a look at .net Maui it should fit your needs

Nonsense :) Imagine you're creating an app for ecommerce. You don't care about using native UI. It's enough to have just Blazor for doing all UI and make it run on all 3 Desktop Platforms.

Plus who said MAUI supports WPF, mac cocoa and GTK?!

I dont know why you speak about all of that, anyway this project is not suppose to bé used now since there is other alternative. Its not my point of view, its litteraly what Steve Sanderson Say on the main page of this project.
By the way have a cross platform app which just run a blazor app inside without Care about thé UI is just what i made for a client in maui and it work perfectly (for my needs, i cant speak for all type of project)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests