Skip to content

[v3] Web Server tag fails on Windows #5893

Description

@Bare7a

Wails version family

v3

Exact Wails version

v3.0.0-beta.3

Operating System

Windows

Description

Starting a Wails v3 web project on Windows fails during compilation with multiple webview_window_windows_nonclient.go:38:10: undefined: windowsWebviewWindow logs

The same project builds successfully on macOS and Linux using identical dependencies.

To Reproduce

wails3 init -n app
cd ./app
wails3 build
go run -tags server main.go

Expected behaviour

The project should compile successfully on Windows the same way it does on macOS and Linux.

Screenshots

No response

Attempted Fixes

I was able to fix the problem locally by modifying the v3/pkg/application/webview_window_windows_nonclient.go file from

//go:build windows

to

//go:build windows && !server

System Details

Wails v3.0.0-beta.3 › Wails Doctor
                                                                                                                                                                                                  
# System
        
┌─────────────────────────────────────────────────────────────────────┐
| Name              | Windows 10 Pro                                  |
| Version           | 2009 (Build: 26200)                             |
| ID                | 25H2                                            |
| Branding          | Windows 11 Pro                                  |
| Platform          | windows                                         |
| Architecture      | amd64                                           |
| Go WebView2Loader | true                                            |
| WebView2 Version  | 150.0.4078.105                                  |
| CPU               | AMD Ryzen 7 5800H with Radeon Graphics          |
| GPU               | NVIDIA GeForce RTX 3060 Laptop GPU (NVIDIA)     |
| Memory            | 32GB                                            |
└─────────────────────────────────────────────────────────────────────┘
                   
# Build Environment
                   
┌──────────────────────────────────────────────────────────────────────┐
| Wails CLI      | v3.0.0-beta.3                                       |
| Go Version     | go1.26.5                                            |
| -buildmode     | exe                                                 |
| -compiler      | gc                                                  |
| CGO_CFLAGS     |                                                     |
| CGO_CPPFLAGS   |                                                     |
| CGO_CXXFLAGS   |                                                     |
| CGO_ENABLED    | 1                                                   |
| CGO_LDFLAGS    |                                                     |
| DefaultGODEBUG | cryptocustomrand=1,tlssecpmlkem=0,urlstrictcolons=0 |
| GOAMD64        | v1                                                  |
| GOARCH         | amd64                                               |
| GOOS           | windows                                             |
└──────────────────────────────────────────────────────────────────────┘
              
# Dependencies
              
┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| *Android NDK               | Not found. Install with: sdkmanager 'ndk;26.3.11579264'                   |
| *Android SDK               | C:\Users\bare7\AppData\Local\Android\Sdk                                  |
| *Android platform-tools    | Not found. Install with: sdkmanager 'platform-tools'                      |
| *Java (Android)            | Not found. Install a JDK (e.g. brew install openjdk@21) or set JAVA_HOME. |
| MSIX Packaging Tool        | Not Installed                                                             |
| MakeAppx.exe (Windows SDK) | Not Installed                                                             |
| NSIS                       | v3.12                                                                     |
| SignTool.exe (Windows SDK) | Not Installed                                                             |
| npm                        | 11.13.0                                                                   |
| docker                     | *Docker version 29.6.2, build dfc4efb (cross-compilation ready)           |
|                                                                                                        |
└─────────────────────────────────────── * - Optional Dependency ────────────────────────────────────────┘
         
# Signing
         
┌────────────────────────────────────────┐
| macOS Signing   | Not configured       |
| Windows Signing | Not configured       |
| Linux Signing   | Not configured (GPG) |
└────────────────────────────────────────┘
                     
# Checking for issues
                     
 SUCCESS  No issues found
           
# Diagnosis
           
 SUCCESS  Your system is ready for Wails development!

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions