wails
wails copied to clipboard
[v2] UI not visible when launching application built with GitHub Actions but works fine with local build
Description
When building our Wails application (Venezuela Launcher) via GitHub Actions, the resulting installer works and the application launches, but the UI is completely invisible. The process runs (visible in task manager), and the icon appears in the taskbar, but no window content is displayed.
However, when building the exact same code locally on my development machine using the same Wails version (2.10.1) and identical build flags, the installer works perfectly with all UI elements displaying correctly.
To Reproduce
- Build application with wails build -o "yOUR APP" -nsis -webview2 embed locally on Windows development machine - works correctly
- Build identical code with the same command via GitHub Actions - installer works but when launched, no UI is visible
My pipeline which you can reconfigure:
name: Build and Deploy Venezuela Launcher
on:
push:
branches: [main]
permissions:
contents: write
packages: read
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.24"
cache: true
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: "frontend/package.json"
- name: Install Wails and dependencies
run: |
go install github.com/wailsapp/wails/v2/cmd/[email protected]
go install mvdan.cc/garble@latest
wails version
$gopath = go env GOPATH
echo "$gopath\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
shell: pwsh
- name: Calculate version
id: version
run: |
$commitCount = git rev-list --count HEAD
$newVersion = "1.0.$commitCount"
Write-Host "Set version: $newVersion"
"VERSION=$newVersion" | Out-File -FilePath $env:GITHUB_ENV -Append
"version=$newVersion" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
if (!(Test-Path -Path "version/version.go")) {
New-Item -Path "version" -ItemType Directory -Force
@"
package version
var Version string = "$newVersion"
"@ | Out-File -FilePath "version/version.go" -Encoding utf8
} else {
(Get-Content -Path "version/version.go") -replace 'var Version string = ".*"', "var Version string = `"$newVersion`"" | Set-Content -Path "version/version.go"
}
shell: pwsh
- name: Update Changelog
if: hashFiles('scripts/update-changelog.ps1') != ''
run: |
if (Test-Path "scripts/update-changelog.ps1") {
.\scripts\update-changelog.ps1
} else {
Write-Host "Changelog script not found, skipping this step."
}
shell: pwsh
- name: Setup environment for build
run: |
try {
$tempDir = "$env:TEMP\bun-installation"
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
Invoke-WebRequest -Uri "https://github.com/oven-sh/bun/releases/latest/download/bun-windows-x64.zip" -OutFile "$tempDir\bun.zip"
Expand-Archive -Path "$tempDir\bun.zip" -DestinationPath $tempDir -Force
$bunExeFiles = Get-ChildItem -Path $tempDir -Filter "bun.exe" -Recurse
if ($bunExeFiles.Count -gt 0) {
$bunPath = "C:\bun"
New-Item -ItemType Directory -Path $bunPath -Force | Out-Null
$bunExePath = $bunExeFiles[0].FullName
Copy-Item -Path "$($bunExeFiles[0].DirectoryName)\*" -Destination $bunPath -Force -Recurse
$env:PATH += ";$bunPath"
echo "$bunPath" | Out-File -FilePath $env:GITHUB_PATH -Append
}
} catch {
Write-Host "Bun installation failed, proceeding with npm only: $_"
}
if (Test-Path "wails.json") {
$wailsJson = Get-Content "wails.json" -Raw | ConvertFrom-Json
if (Get-Member -InputObject $wailsJson -Name "frontend" -MemberType Properties) {
if (-not (Get-Member -InputObject $wailsJson.frontend -Name "packageManager" -MemberType Properties)) {
Add-Member -InputObject $wailsJson.frontend -MemberType NoteProperty -Name "packageManager" -Value "npm"
} else {
$wailsJson.frontend.packageManager = "npm"
}
} else {
$frontend = New-Object -TypeName PSObject
Add-Member -InputObject $frontend -MemberType NoteProperty -Name "packageManager" -Value "npm"
Add-Member -InputObject $wailsJson -MemberType NoteProperty -Name "frontend" -Value $frontend
}
$wailsJson | ConvertTo-Json -Depth 10 | Set-Content "wails.json"
}
shell: pwsh
- name: Install frontend dependencies
run: |
cd frontend
npm install --legacy-peer-deps
shell: pwsh
- name: Build the application
run: |
if (Test-Path "C:\bun") {
$env:PATH += ";C:\bun"
}
$gopath = go env GOPATH
$env:PATH += ";$gopath\bin"
Write-Host "PATH: $env:PATH"
Write-Host "Looking for garble in: $gopath\bin"
if (Test-Path "$gopath\bin\garble.exe") {
Write-Host "Garble found at $gopath\bin\garble.exe"
} else {
Write-Host "Garble not found, reinstalling"
go install mvdan.cc/garble@latest
}
Write-Host "Starting Wails build..."
wails build -o "Venezuela Launcher" -nsis -webview2 embed -windowsconsole -debug -devtools
env:
CGO_ENABLED: 1
shell: pwsh
- name: Handle build artifacts
run: |
$installerPath = "build/bin/Venezuela Launcher-amd64-installer.exe"
if (Test-Path -Path "$installerPath") {
$newName = "Venezuela-Launcher-$env:VERSION-installer.exe"
$newPath = "build/bin/$newName"
Move-Item -Path "$installerPath" -Destination $newPath -Force
"INSTALLER_PATH=$newPath" | Out-File -FilePath $env:GITHUB_ENV -Append
Write-Host "Installer created at: $newPath"
} else {
Write-Error "Installer not found at expected path: $installerPath"
Get-ChildItem -Path "build/bin" -Recurse | Select-Object FullName
exit 1
}
shell: pwsh
- name: Generate version info
run: |
$s3Endpoint = "https://S3_URL"
$bucket = "venezuela-launcher"
$latestFileName = "Venezuela-Launcher-latest.exe"
$versionFileName = "Venezuela-Launcher-$env:VERSION-installer.exe"
$versionInfo = @{
version = "$env:VERSION"
download_url = "$s3Endpoint/$bucket/downloads/$latestFileName"
version_specific_url = "$s3Endpoint/$bucket/downloads/$versionFileName"
release_date = (Get-Date -Format "yyyy-MM-dd HH:mm:ss")
} | ConvertTo-Json -Depth 3
$versionInfo | Out-File -FilePath "version_info.json" -Encoding utf8
Write-Host "Generated version info:"
Get-Content "version_info.json"
shell: pwsh
Expected behaviour
The application built via GitHub Actions should display its UI properly, identical to the locally built version.
Screenshots
With debug window console enabled - you can see webview is loaded and app is launched (the last icon) in the taskbar but there is no content in it.
If I use my local built installer then it's working, this is expected behaviour
Attempted Fixes
- Tried obfuscated and non-obfuscated builds
- We've tried using -windowsconsole -debug flags but no helpful errors are shown
- We've also tried various WebView2 settings, including -webview2 embed and -tags native_webview2loader without success
- We've tried using Wails 2.9.0 but it still does not work
System Details
My local output of wails doctor:
# Wails
Version | v2.10
# System
┌───────────────────────────────────────────────────────────────────────────┐
| OS | Windows 10 Pro |
| Version | 2009 (Build: 19045) |
| ID | 22H2 |
| Go Version | go1.24.0 |
| Platform | windows |
| Architecture | amd64 |
| CPU | Intel(R) Core(TM) i3-10100F CPU @ 3.60GHz |
| GPU | NVIDIA GeForce GTX 1080 Ti (NVIDIA) - Driver: 32.0.15.7242 |
| Memory | 16GB |
└───────────────────────────────────────────────────────────────────────────┘
# Dependencies
┌───────────────────────────────────────────────────────┐
| Dependency | Package Name | Status | Version |
| WebView2 | N/A | Installed | 133.0.3065.82 |
| Nodejs | N/A | Installed | 22.2.0 |
| npm | N/A | Installed | 10.8.2 |
| *upx | N/A | Available | |
| *nsis | N/A | Installed | v3.10 |
| |
└─────────────── * - Optional Dependency ───────────────┘
GitHub actions:
Windows Server environment on GitHub Actions
Wails 2.10.1
Go 1.24
Additional context
- The GitHub Actions runner uses a Windows Server environment
- The WebView2 component appears to initialize successfully (logs show "Environment created successfully")
- No error messages are displayed
- We've tried using -windowsconsole -debug flags but no helpful errors are shown
- We've also tried various WebView2 settings, including -webview2 embed and -tags native_webview2loader without success