Skip to content

PANIC on run command "wails build": unsupported version: 2 #4831

@cmq2080

Description

@cmq2080

Description

Golang Version: go1.25.5 windows/amd64

When I run command "wail doctor",it'show:

DEB | Using go webview2loader
Wails CLI v2.5.0

 SUCCESS  Done.

# System

OS           | Windows 10 Enterprise LTSC 2021
Version      | 2009 (Build: 19044)
ID           | 21H2
Go Version   | go1.25.5
Platform     | windows
Architecture | amd64

# Wails

Version | v2.5.0

# Dependencies

Dependency | Package Name | Status    | Version
WebView2   | N/A          | Installed | 143.0.3650.96
Nodejs     | N/A          | Installed | 22.13.0
npm        | N/A          | Installed | 11.7.0
*upx       | N/A          | Available |
*nsis      | N/A          | Available |
* - Optional Dependency

# Diagnosis

Your system is ready for Wails development!
Optional package(s) installation details:
  - upx : Available at https://upx.github.io/
  - nsis : More info at https://wails.io/docs/guides/windows-installer/

 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

The versions of golang and node are both ok.But I have a panic when I build the example project(initilized with "wails.exe init -n wails001 -t vue-ts") with command "wails build"...

DEB | Using go webview2loader
Wails CLI v2.5.0


# Build Options

Platform(s)        | windows/amd64
Compiler           | D:\Environments\Go\go1.25.5.windows-amd64\bin\go.exe
Skip Bindings      | false
Build Mode         | production
Frontend Directory | D:\projects\go\src\_\wails001\frontend
Obfuscated         | false
Skip Frontend      | false
Compress           | false
Package            | true
Clean Bin Dir      | false
LDFlags            |
Tags               | []
Race Detector      | false

# Building target: windows/amd64

panic: unsupported version: 2

goroutine 130 [running]:
golang.org/x/tools/go/internal/pkgbits.NewPkgDecoder({0xc000237690?, 0xc000bae000?}, {0xc00001e800, 0x40b3})
        D:/projects/go/pkg/mod/golang.org/x/[email protected]/go/internal/pkgbits/decoder.go:83 +0x42e
golang.org/x/tools/go/internal/gcimporter.UImportData(0xc0003589f0, 0xc0002d2ab0, {0xc000baa001?, 0xc000000000?, 0x0?}, {0xc000237690, 0x7})
        D:/projects/go/pkg/mod/golang.org/x/[email protected]/go/internal/gcimporter/ureader_yes.go:61 +0xa9
golang.org/x/tools/go/gcexportdata.Read({0x7ff6d02fbe60?, 0xc0001da570?}, 0xc0003589f0, 0xc0002d2ab0, {0xc000237690, 0x7})
        D:/projects/go/pkg/mod/golang.org/x/[email protected]/go/gcexportdata/gcexportdata.go:130 +0x269
golang.org/x/tools/go/packages.(*loader).loadFromExportData(0xc000000000, 0xc0001e2940)
        D:/projects/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:1242 +0x405
golang.org/x/tools/go/packages.(*loader).loadPackage(0xc000000000, 0xc0001e2940)
        D:/projects/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:873 +0x392
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
        D:/projects/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:838 +0x1a9
sync.(*Once).doSlow(0x0?, 0x0?)
        D:/Environments/Go/go1.25.5.windows-amd64/src/sync/once.go:78 +0xac
sync.(*Once).Do(...)
        D:/Environments/Go/go1.25.5.windows-amd64/src/sync/once.go:69
golang.org/x/tools/go/packages.(*loader).loadRecursive(0x0?, 0x0?)
        D:/projects/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:826 +0x3b
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1(0x0?)
        D:/projects/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:833 +0x26
created by golang.org/x/tools/go/packages.(*loader).loadRecursive.func1 in goroutine 66
        D:/projects/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:832 +0x94

To Reproduce

wail init -n wails001 -t vue-ts

cd wails001/frontend & npm update

cd .. && wails build

Expected behaviour

panic: unsupported version: 2

Screenshots

Image

Attempted Fixes

No response

System Details

DEB | Using go webview2loader
Wails CLI v2.5.0

 SUCCESS  Done.

# System

OS           | Windows 10 Enterprise LTSC 2021
Version      | 2009 (Build: 19044)
ID           | 21H2
Go Version   | go1.25.5
Platform     | windows
Architecture | amd64

# Wails

Version | v2.5.0

# Dependencies

Dependency | Package Name | Status    | Version
WebView2   | N/A          | Installed | 143.0.3650.96
Nodejs     | N/A          | Installed | 22.13.0
npm        | N/A          | Installed | 11.7.0
*upx       | N/A          | Available |
*nsis      | N/A          | Available |
* - Optional Dependency

# Diagnosis

Your system is ready for Wails development!
Optional package(s) installation details:
  - upx : Available at https://upx.github.io/
  - nsis : More info at https://wails.io/docs/guides/windows-installer/

 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingawaiting feedbackMore information is required from the requestor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions