wails icon indicating copy to clipboard operation
wails copied to clipboard

Blank Window with `ERR | WebVie2wProcess failed with kind 1` on Windows 10

Open ChnTamap opened this issue 3 months ago • 37 comments

Description

My Wails application displays a blank window with the error ERR | WebVie2wProcess failed with kind 1 in the terminal. This issue started suddenly after some modifications, but even after reverting to previous working code states and creating fresh demo projects, the problem persists.

To Reproduce

  1. Create a new Wails project: wails init -n demo
  2. Build the project: wails build
  3. Run in development mode: wails dev
  4. The application window opens but displays blank/white content
  5. Terminal shows repeated ERR | WebVie2wProcess failed with kind 1 errors

Expected behaviour

The application window should display the frontend content properly without errors.

Screenshots

  • Blank/white application window
  • Terminal shows ERR | WebVie2wProcess failed with kind 1 errors repeatedly
  • Frontend DevServer is accessible via browser at http://localhost:34115 with some errors but functional content
  • Both new and legacy WebView2 loaders exhibit the same issue
Image

Attempted Fixes

  1. Reverted code to previous working states - problem persists
  2. Created fresh demo projects - same issue occurs
  3. Updated WebView2 runtime - no improvement
  4. Modified registry settings based on MSDN documentation - no solution found
  5. Tried legacy WebView2 loader (-tags native_webview2loader) - same error occurs
  6. Verified WebView2 installation through wails doctor - shows installed and up-to-date
  7. Browser testing - accessing the dev server directly in Edge/Firefox shows content but with different errors:
    ERR | process message error: runtime:ready -> Unknown message from front end: runtime:ready
    ERR | Unknown message from front end: runtime:ready
    

System Details

Wails Doctor

# Wails
Version | v2.10.2

# System
┌───────────────────────────────────────────────────────────────────────────────────────┐
| OS           | Windows 10 Enterprise LTSC 2019                                        |
| Version      | 1809 (Build: 17763)                                                    |
| ID           |                                                                        |
| Branding     | Windows 10 企业版 LTSC                                                 |
| Go Version   | go1.25.0                                                               |
| Platform     | windows                                                                |
| Architecture | amd64                                                                  |
| CPU          | Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz                               |
| GPU          | Intel(R) UHD Graphics 630 (Intel Corporation) - Driver: 27.20.100.9316 |
| Memory       | 16GB                                                                   |
└───────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌───────────────────────────────────────────────────────┐
| Dependency | Package Name | Status    | Version       |
| WebView2   | N/A          | Installed | 142.0.3595.65 |
| Nodejs     | N/A          | Installed | 22.18.0       |
| npm        | N/A          | Installed | 8.0.0         |
| *upx       | N/A          | Available |               |
| *nsis      | N/A          | Available |               |
|                                                       |
└─────────────── * - Optional Dependency ───────────────┘

Additional context

  • The issue started suddenly after working fine for days
  • Both production builds (wails build) and development mode (wails dev) exhibit the same problem
  • The frontend framework being used is Svelte, but the issue also occurs with vanilla templates
  • The dev server URLs are accessible via browser, suggesting the issue might be related to WebView2 communication rather than frontend compilation
  • Error occurs with both the new Go WebView2Loader and the legacy native loader

ChnTamap avatar Nov 07 '25 03:11 ChnTamap

IT would be best to rollback the version of go-webview2 to a previous version and lmk if that works.

leaanthony avatar Nov 11 '25 11:11 leaanthony

Not seeing any errors but I'm getting a similar blank white screen. I did have some Windows 11 updates today, not sure if that broke anything. I've not been able to fix it so far, trying to see if I can bundle the WebView now. It does work for Linux which is good, makes me think it's a Windows issue (for now)

modelorona avatar Nov 12 '25 23:11 modelorona

@leaanthony Can this problem be solved? If not, I'll switch to another framework to implement my functionality. This problem has rendered all the software I previously developed using Wails unusable.

D06F6E67 avatar Nov 13 '25 11:11 D06F6E67

Update - after a lot of debugging (good thing we can enable the console in production builds), I saw that for whatever reason my React wasn't being bundled. I traced it back to Vite.

Turns out I had added some logic some time back that was meant to split bundles up into smaller sizes. I don't really know how, but that was now broken.

This wasn't an issue locally, but when I built via the Windows Github runner image, it was a problem.

I've had this Vite bundling logic for a couple months unchanged and it was fine, so signs point to something introduced to the runner image recently.

Pain in the ass to debug but for now my builds no longer have a blank screen and React is bundled fine.

modelorona avatar Nov 13 '25 14:11 modelorona

Can this problem be solved? If not, I'll switch to another framework to implement my functionality. This problem has rendered all the software I previously developed using Wails unusable.

Feel free to do what you want, but what's stopping you rolling back?

I'm unable to reproduce this as I don't have windows 10 but everything is working fine for me on v2.11.0 with go-webview2 v1.0.22. I will need someone to debug on this version of Windows and provide more information. There is go-webview v1.0.23 which addresses a bug so maybe try using that.

leaanthony avatar Nov 13 '25 21:11 leaanthony

@ChnTamap - Please try the linked PR 👍

leaanthony avatar Nov 13 '25 21:11 leaanthony

@leaanthony The problem persists even with v1.0.23.

INF | Serving assets from disk: E:\Projects\Goland\toolCollection\frontend\dist DEB | WebView2 Runtime Version '142.0.3595.76' installed. Minimum version required: 94.0.992.31. 2025/11/14 10:44:12 [WebView2] Environment created successfully ERR | WebVie2wProcess failed with kind 1 ERR | WebVie2wProcess failed with kind 1 DEB | [AssetHandler] Handling request '/' (file='.') ERR | WebVie2wProcess failed with kind 1 This is the exception log under WebView2 version 142.0.3595.76

INF | Serving assets from disk: E:\Projects\Goland\toolCollection\frontend\dist DEB | WebView2 Runtime Version '141.0.3537.99' installed. Minimum version required: 94.0.992.31. 2025/11/14 13:05:48 [WebView2] Environment created successfully ERR | WebVie2wProcess failed with kind 1 DEB | [AssetHandler] Handling request '/' (file='.') DEB | [AssetHandler] Handling request '/assets/index-BoP46oVR.js' (file='assets/index-BoP46oVR.js') DEB | [AssetHandler] Handling request '/assets/index-BEurgqio.css' (file='assets/index-BEurgqio.css') DEB | [AssetHandler] Handling request '/favicon.ico' (file='favicon.ico') This is the log from downloading WebView2 version 141.0.3537.99 from Microsoft, extracting it to my local machine, and setting the WebviewBrowserPath. It works correctly after that.

D06F6E67 avatar Nov 14 '25 05:11 D06F6E67

Image Image

After starting WAILS Dev, there is no graphical interface in the window, but accessing localhost:5173 and localhost:34115 through a browser displays a graphical interface.

D06F6E67 avatar Nov 14 '25 06:11 D06F6E67

setupChromium():chromium.WebResourceRequestedCallback = f.processRequest

When I use WebView2 version 141.0.3537.99, the processRequest method is requested multiple times, including requests for JS and CSS.

However, when I use version 142.0.3595.76, this method is only requested once.

D06F6E67 avatar Nov 14 '25 06:11 D06F6E67

I changed the version of \HKEY_CURRENT_USER\SOFTWARE\Microsoft\EdgeUpdate\ClientState{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5} in the registry to 141.0.3537.99, and the program worked perfectly.

D06F6E67 avatar Nov 14 '25 07:11 D06F6E67

Can this problem be solved? If not, I'll switch to another framework to implement my functionality. This problem has rendered all the software I previously developed using Wails unusable.

Feel free to do what you want, but what's stopping you rolling back?

I'm unable to reproduce this as I don't have windows 10 but everything is working fine for me on v2.11.0 with go-webview2 v1.0.22. I will need someone to debug on this version of Windows and provide more information. There is go-webview v1.0.23 which addresses a bug so maybe try using that.

https://developer.microsoft.com/en-us/microsoft-edge/webview2/?form=MA13LH

Downloading version 142 and specifying that you want to use webview version 142 should reproduce the problem.

D06F6E67 avatar Nov 14 '25 07:11 D06F6E67

@D06F6E67 by any chance, are you doing any sort of manual bundling on your frontend? Or splitting of bundles, or anything that isn't what your build tool would do by default?

modelorona avatar Nov 15 '25 12:11 modelorona

However, when I use version 142.0.3595.76, this method is only requested once.

Huh... Webview2 regression?

leaanthony avatar Nov 16 '25 05:11 leaanthony

@D06F6E67 by any chance, are you doing any sort of manual bundling on your frontend? Or splitting of bundles, or anything that isn't what your build tool would do by default?

I didn't change any code; I just changed the registry entry for WeView from version 142 to version 141, and it worked fine.

D06F6E67 avatar Nov 16 '25 10:11 D06F6E67

However, when I use version 142.0.3595.76, this method is only requested once.

Huh... Webview2 regression?

This is the result I obtained by comparing two versions of WebView through debugging.

The same code works correctly in WebView version 141, but only results in a blank page in version 142.

D06F6E67 avatar Nov 16 '25 10:11 D06F6E67

Just so I'm clear here: rolling back the Wails CLI and project's go.mod doesn't work but rolling back just the webview version does work?

Is this a Windows 10 only issue? Are MS trying to get forced upgrades? 😅

leaanthony avatar Nov 17 '25 18:11 leaanthony

Yes, I didn't change any code, nothing in go.mod. I only changed the WebView version in the Windows registry, and it worked fine. Microsoft seems to have forced an update that can't be rolled back, because I only recently encountered this problem, and I haven't actively upgraded any Windows software in the meantime.

D06F6E67 avatar Nov 18 '25 00:11 D06F6E67

It seems that there are some adjustments to the webview in version 142, making it incompatible with the previous versions. This caused problems when I used the previous Wails, including my previously packaged exe files. After switching back to version 141 through the registry, everything worked fine.

D06F6E67 avatar Nov 18 '25 01:11 D06F6E67

Wow that's super annoying. I wonder if anything has been reported on Webview2 feedback repo

leaanthony avatar Nov 18 '25 19:11 leaanthony

So there's a report of 142 crashing (could be unrelated) but they mention this as a way to debug:

WV2 crash dumps are located in a subfolder of the app's user data folder (UDF): <UDF>\EBWebView\Crashpad\reports. By default, the user data folder is created in the app's folder with a name like <App Exe Name>.exe.WebView2. Refer to Crash Diagnostics for more information.

Perhaps that would give us more insight?

leaanthony avatar Nov 18 '25 19:11 leaanthony

Source: https://github.com/MicrosoftEdge/WebView2Feedback/issues/5444

Copy and paste fail: https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/diagnostics%2Fcrash.md

leaanthony avatar Nov 18 '25 19:11 leaanthony

Source: MicrosoftEdge/WebView2Feedback#5444

Copy and paste fail: https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/diagnostics%2Fcrash.md

Following these steps, I still have no files, and there is no data in edge://crashes/.

D06F6E67 avatar Nov 19 '25 01:11 D06F6E67

That's so weird

leaanthony avatar Nov 19 '25 09:11 leaanthony

It's strange, but when I launch it using dev and access it via Edge, I can see the interface normally. However, the software window is blank.

D06F6E67 avatar Nov 19 '25 09:11 D06F6E67

I can only package WebView2 version 141 into my software now, which has made my software much larger, from a dozen MB to over two hundred MB.

D06F6E67 avatar Nov 19 '25 09:11 D06F6E67

No that sucks though providing a guide on how you do that would be an amazing contribution!

leaanthony avatar Nov 19 '25 09:11 leaanthony

HKEY_CURRENT_USER\SOFTWARE\Microsoft\EdgeUpdate\ClientState{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}

Image Image

Change all instances of version 141 in the registry to version 142, provided that version 142 is already present in the folder. In my case, changing it to 142.0.3595.76 caused the page to not appear, but the browser could access it directly. Changing it to 141.0.3537.99 then resolved the issue.

D06F6E67 avatar Nov 20 '25 01:11 D06F6E67

Thanks 👍

leaanthony avatar Nov 20 '25 01:11 leaanthony

This branch: fix/webview2-initialization-order With this webview2: 142.0.3595.90 On Windows 11 works....

leaanthony avatar Nov 21 '25 07:11 leaanthony

@D06F6E67 If https://github.com/wailsapp/wails/pull/4707 doesn't work on Windows 10 then we know it's something to do with Windows 10!

leaanthony avatar Nov 21 '25 07:11 leaanthony