You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WebView2 fails to initialize in WinUI 3 unpackaged app on ARM64 #9
\
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at WinRT.ActivationFactory.Get(String typeName, Guid iid)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.get__objRef_global__Microsoft_Web_WebView2_Core_ICoreWebView2EnvironmentStatics()
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateWithOptionsAsync(...)
at OpenClawTray.Windows.WebChatWindow.InitializeWebViewAsync()
\\
What we tried
Copying WebView2Loader.dll to output root - The ARM64 loader exists in
untimes/win-arm64/native/\ but wasn't being found. Copying to output root didn't help.
Using CreateWithOptionsAsync - Same error
Using simple EnsureCoreWebView2Async() - Same error
Setting WEBVIEW2_USER_DATA_FOLDER environment variable - No effect
Key observations
The WinForms version of the same app uses \Microsoft.Web.WebView2\ NuGet package directly and works fine
The WinUI version relies on WebView2 bundled with Windows App SDK
Error is in \WinRT.ActivationFactory.Get\ - suggesting COM activation issue
The WebView2 runtime IS installed (verified via registry and Edge presence)
Possible causes
ARM64 unpackaged WinUI apps may have issues finding WebView2 COM activation
Windows App SDK WebView2 integration may differ from standalone package
Missing app manifest entries for WebView2?
Workaround
Currently falling back to opening chat in browser when WebView2 fails.
Related
WinForms WebChatForm.cs works with \Microsoft.Web.WebView2\ 1.0.3124.44
This used to work (allegedly) - need to investigate when it broke
Tried switching \WindowsPackageType\ from \None\ to \MSIX\ but it requires a \Package.appxmanifest\ file which doesn't exist.
Creating an MSIX package would require:
Creating Package.appxmanifest with app identity, capabilities, etc.
Setting up proper signing
More complex deployment story
This is a bigger change than a quick test. For now, keeping the browser fallback.
Hypothesis remains: The WinRT activation factory issue may be related to unpackaged app identity. Packaged apps have their COM classes registered properly during installation.
Fixed! The issue was unpackaged WinUI apps need \WindowsAppSDKSelfContained=true\ and a runtime identifier (-r win-arm64\ or -r win-x64) for WebView2 COM activation to work.
Root cause: WebView2 uses WinRT/COM activation which requires either MSIX packaging or the 'Undocked RegFree WinRT' bundled by self-contained mode.
Activity
shanselman commentedon Feb 1, 2026
Testing packaged (MSIX) build
Tried switching \WindowsPackageType\ from \None\ to \MSIX\ but it requires a \Package.appxmanifest\ file which doesn't exist.
Creating an MSIX package would require:
This is a bigger change than a quick test. For now, keeping the browser fallback.
Hypothesis remains: The WinRT activation factory issue may be related to unpackaged app identity. Packaged apps have their COM classes registered properly during installation.
shanselman commentedon Feb 1, 2026
Fixed! The issue was unpackaged WinUI apps need \WindowsAppSDKSelfContained=true\ and a runtime identifier (-r win-arm64\ or -r win-x64) for WebView2 COM activation to work.
Root cause: WebView2 uses WinRT/COM activation which requires either MSIX packaging or the 'Undocked RegFree WinRT' bundled by self-contained mode.
Fix in commit bb06fb1.
audio: address rubber-duck review (Highs openclaw#2-openclaw#5, Mediums
audio: Whisper STT + Piper TTS as MCP-callable node capabilities (#288)
Hanselman Round 1 fixes (13/14, skipping openclaw#12)