Open cuijixiong1 opened 1 month ago
It seems that the issue is in go-webview2
. Try this if you have the same problem.
go get github.com/wailsapp/go-webview2@v1.0.10
It works well for me after downgrade. My env is:
What's the smallest program to recreate the issue?
What's the smallest program to recreate the issue?
Just build default template on Windows Server 2016
Have you stepped through with a debugger to see where this is happening?
Have you stepped through with a debugger to see where this is happening?
This happens immediately after the application starts. You can read more about this https://github.com/wailsapp/wails/issues/3759
Description
[33m2024-10-17T16:33:16+08:00 extractWebView2ToTempDir dir: [36m[C:\Users\ADMINI~1\AppData\Local\Temp\2\webview2] main.go:241 [0m 4:33PM INF Build Info: Wails=v3.0.0-alpha.7 Compiler=go1.23.2 -tags=dev,debug CGO_LDFLAGS="" GOAMD64=v1 GOOS=windows -compiler=gc CGO_CFLAGS="" CGO_CPPFLAGS="" GOARCH=amd64 -buildmode=exe CGO_ENABLED=1 vcs=git CGO_CXXFLAGS="" vcs.revision=9765671055c99625d1a549584bd3a9e2d9eaca36 vcs.time=2024-05-12T08:20:25Z vcs.modified=true 4:33PM INF Platform Info: Go-WebView2Loader=true WebView2=126.0.2592.113 ID="" Name="Windows Server 2016 Datacenter" Version="1607 (Build: 14393)" Branding="Windows Server 2016 Datacenter" 4:33PM INF AssetServer Info: middleware=true handler=true 2024/10/17 16:33:17 goroutine 1 [running, locked to thread]: runtime/debug.Stack() C:/Users/cuiji/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.2.windows-amd64/src/runtime/debug/stack.go:26 +0x5e github.com/wailsapp/go-webview2/pkg/edge.(Chromium).errorCallback(0xc0000d0ea0, {0x23c70cc0, 0x1b69c18}) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/go-webview2@v1.0.16/pkg/edge/chromium.go:115 +0x26 github.com/wailsapp/go-webview2/pkg/edge.(Chromium).EnvironmentCompleted(0xc0000d0ea0, 0xc000045de8?, 0x7b08002d0010) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/go-webview2@v1.0.16/pkg/edge/chromium.go:300 +0x20a github.com/wailsapp/go-webview2/pkg/edge.(environmentCreatedHandler).EnvironmentCompleted(0x7fff930fcbf0?, 0x45dc8?, 0x16f952b?) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/go-webview2@v1.0.16/pkg/edge/create_env_go.go:27 +0x22 github.com/wailsapp/go-webview2/webviewloader.(environmentCreatedHandler).EnvironmentCompleted(0xc000043b70?, 0x0?, 0x7b08002d0010) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/go-webview2@v1.0.16/webviewloader/env_create.go:156 +0x9f github.com/wailsapp/go-webview2/webviewloader._iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerInvoke(0xc000045e20?, 0x0, 0x7b08002d0010) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/go-webview2@v1.0.16/webviewloader/env_create_completed.go:40 +0x3e syscall.SyscallN(0x1cd46e5?, {0xc000046450?, 0xc0000464c8?, 0x16f9e7c?}) C:/Users/cuiji/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.2.windows-amd64/src/runtime/syscall_windows.go:519 +0x46 syscall.Syscall6(0xc00003fba0?, 0xc000046530?, 0x100002c9520?, 0x2873217a748?, 0x30?, 0x1cf3660?, 0x28732170108?, 0x30?) C:/Users/cuiji/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.2.windows-amd64/src/runtime/syscall_windows.go:465 +0x5c golang.org/x/sys/windows.(Proc).Call(0xc000043bc0?, {0xc00002f320?, 0xc000043b70?, 0x23c72480?}) C:/Users/cuiji/go/pkg/mod/golang.org/x/sys@v0.26.0/windows/dll_windows.go:178 +0x205 github.com/wailsapp/go-webview2/webviewloader.createWebViewEnvironmentWithClientDll({0xc00006f100, 0x63}, 0x1, {0xc01d2e6de0, 0x3c}, 0xc00010ecc0, {0x23c72760, 0xc000066658}) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/go-webview2@v1.0.16/webviewloader/env_create.go:112 +0x4d5 github.com/wailsapp/go-webview2/webviewloader.CreateCoreWebView2EnvironmentWithOptions({0x23c72760, 0xc000066658}, {0xc0000467d8, 0x3, 0x60?}) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/go-webview2@v1.0.16/webviewloader/env_create.go:61 +0xd3 github.com/wailsapp/go-webview2/pkg/edge.createCoreWebView2EnvironmentWithOptions({0xc000030900, 0x3b}, {0xc01d2e6de0, 0x3c}, 0xc0000094b8, {0xc01d2e6e40, 0x5c}) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/go-webview2@v1.0.16/pkg/edge/create_env_go.go:13 +0x136 github.com/wailsapp/go-webview2/pkg/edge.(Chromium).Embed(0xc0000d0ea0, 0x14?) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/go-webview2@v1.0.16/pkg/edge/chromium.go:150 +0x25c github.com/wailsapp/wails/v3/pkg/application.(windowsWebviewWindow).setupChromium(0xc0000b2dc0) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/webview_window_windows.go:1432 +0x7e5 github.com/wailsapp/wails/v3/pkg/application.(windowsWebviewWindow).run(0xc0000b2dc0) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/webview_window_windows.go:297 +0x452 github.com/wailsapp/wails/v3/pkg/application.InvokeSync.func1() C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/mainthread.go:28 +0x42 github.com/wailsapp/wails/v3/pkg/application.(windowsApp).invokeCallback(0xc0000f8540, 0xc000202400?, 0x4?) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/mainthread_windows.go:125 +0x2d1 github.com/wailsapp/wails/v3/pkg/application.(windowsApp).wndProc(0x0?, 0xc000047288?, 0x47228?, 0x0?, 0xc0000474b8?) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/application_windows.go:227 +0x72a syscall.SyscallN(0x129124a?, {0xc0001d78b8?, 0x0?, 0xc0001d78b0?}) C:/Users/cuiji/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.2.windows-amd64/src/runtime/syscall_windows.go:519 +0x46 syscall.(Proc).Call(0x12119c5?, {0xc0001d78b8?, 0x1cbaea0?, 0xe01?}) C:/Users/cuiji/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.2.windows-amd64/src/syscall/dll_windows.go:166 +0x1c syscall.(LazyProc).Call(0x1c1dd40, {0xc0001d78b8, 0x1, 0x1}) C:/Users/cuiji/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.2.windows-amd64/src/syscall/dll_windows.go:286 +0x4a github.com/wailsapp/wails/v3/pkg/w32.DispatchMessage(...) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/w32/user32.go:441 github.com/wailsapp/wails/v3/pkg/application.(windowsApp).runMainLoop(0xc0000f8540) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/mainthread_windows.go:64 +0x129 github.com/wailsapp/wails/v3/pkg/application.(windowsApp).run(0xc0000f8540) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/application_windows.go:185 +0xd2 github.com/wailsapp/wails/v3/pkg/application.(*App).Run(0xc000122a88) C:/Users/cuiji/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/application.go:618 +0x434 main.main() D:/user/Desktop/wails/main.go:275 +0x41a
Error detected in Webview2: The parameter is incorrect. [1017/163317.200:ERROR:window_impl.cc(121)] Failed to unregister class Chrome_WidgetWin_0. Error = 1412
C:\Users\Administrator\Desktop>
To Reproduce
Windows Server 2016 Datacenter I have tried installing a lower version of webview2 and installing the latest webview2
Expected behaviour
working
Screenshots
No response
Attempted Fixes
No response
System Details
Additional context
No response