Skip to content
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

CreateWebView2Environment fails with error HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) #13

Closed
raghu038 opened this issue May 14, 2019 · 11 comments

Comments

@raghu038
Copy link

I am calling function CreateWebView2Environment in win32 sample application and getting error HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND).
What could be the reason?

Installed MS Edge(Chromium) Version 76.0.152.0 (Official build) dev (64-bit).

If possible please provide a working sample win32 application.

@liminzhu
Copy link
Member

Thanks for opening the issue @raghu038 ! This probably comes from the WebView loader failing to find the relevant DLLs from the browser. The dev version you installed should be fine. May I ask how and where you installed Edge Dev channel?

@raghu038
Copy link
Author

This is my installation path
"C:\Program Files (x86)\Microsoft\Edge Dev\Application\msedge.exe"

I also used function "CreateWebView2EnvironmentWithDetails" after copying folder "C:\Program Files (x86)\Microsoft\Edge Dev\Application\76.0.152.0" to my project folder but getting same error.

@liminzhu
Copy link
Member

That looks correct. Another potential root cause is CPU arch mismatch. Can you check if you're building an x86 app on a x64 machine?

@nmoinvaz
Copy link

nmoinvaz commented May 16, 2019

I encountered the same issue when using x86 version of DLL with-in an x86 app. When I switched to use the x64 version of the DLL with-in an x64 app, I was able to get a bit farther.

@raghu038
Copy link
Author

Yes, I am building x86 app on x64. Our requirement is embedding Edge in 32 bit application.
Is there any solution for this?

@raghu038
Copy link
Author

I built my sample application as 64bit app and it works.
But it will not solve our problem as we have a 32 bit application(in which we need to embed Edge).
And it is not easy to convert our application from 32bit to 64bit due to its complex nature.
So what other options we have in this case?

@liminzhu
Copy link
Member

liminzhu commented May 16, 2019

Ah I'm glad we at least figure out what the issue is. We're aware that 32-bit WebView doesn't work on 64-bit environment (see #11). This is an issue we are actively looking into and I will share once we have update on that.

For the time being, if you can continue playing with the APIs on x64 and let us if you have any other feedback, that'd be awesome! Sorry for the trouble.

@liminzhu
Copy link
Member

Marking this as a duplicate for #11.

@raghu038
Copy link
Author

We are having 32 bit application only and hence we need to create ActiveX control of 32 bit to embed webview2 control into our application. We can't continue to test with 64 bit. So please prioritize this issue and help us in resolving this issue. Without 32 bit, we can't work. With C++ sample application we can't test all our use cases and hence we can't say which APIs are working or not working.

If you can resolve this 32 bit issue, we can continue to test and share feedback regarding APIs.

@liminzhu
Copy link
Member

Gotcha, we're looking into the issue and I will update here once we have a fix.

@liminzhu
Copy link
Member

Thanks for sharing the issue with us folks! This is fixed in the new SDK update. Make sure you update the SDK and use the Canary channel for testing since the Dev channel may not have the necessary fix yet.

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

No branches or pull requests

3 participants