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

ENV not found on window create #20

Open
pierrejoye opened this issue Nov 29, 2021 · 0 comments
Open

ENV not found on window create #20

pierrejoye opened this issue Nov 29, 2021 · 0 comments

Comments

@pierrejoye
Copy link

pierrejoye commented Nov 29, 2021

Good morning,

Thanks for this awesome project :)

Before digging, I wonder which environment var I am missing.

While running the simple example,

https://github.com/Inkeliz/gowebview/blob/7afc3ccbda69d02d47905baa94d53100be397b52/gowebview_windows.go#L82

windows config path is set, "C:\Users\***\AppData\Local\Temp\Hello World"

However, the call ends with ERROR_ENVVAR_NOT_FOUND (203) = 0x0

The window is created but then it fails (chan) with this error and bail out with the panic.

I have been using webview/webview directly and I did not need to define envs afaict. Not sure what else it could be :)

Update: It fails to find a registry entry, inside CreateCoreWebView2Environment. Webview alone works tho' (using it directly myself). It could be related to the remarks section here:

To create WebView2 controls that use the installed version of the WebView2 Runtime that exists on user machines, pass a null or empty string to browserExecutableFolder. In this scenario, the API tries to find a compatible version of the WebView2 Runtime that is installed on the user machine (first at the machine level, and then per user) using the selected channel preference.

The current code unsets this variable. That may not behave the same than a NULL||empty string.

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

1 participant