unoplatform / Uno.Wasm.Bootstrap

A simple nuget package to run C# code in a WASM-compatible browser
Other
372 stars 57 forks source link

Build error WASM Release (regression) #717

Closed igiona closed 1 year ago

igiona commented 1 year ago

After updating the Uno libs as per the following patch:

--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -7,41 +7,41 @@
     <!-- Uno -->
     <PackageVersion Include="UnitsNet" Version="5.13.0" />
     <PackageVersion Include="Uno.Dsp.Tasks" Version="1.1.0-dev.8" />
-    <PackageVersion Include="Uno.Resizetizer" Version="1.1.0-dev.15" />
-    <PackageVersion Include="Uno.Toolkit.WinUI.Material" Version="2.6.0-dev.15" />
-    <PackageVersion Include="Uno.Material.WinUI" Version="2.6.0-dev.14" />
-    <PackageVersion Include="Uno.Toolkit.WinUI" Version="2.6.0-dev.15" />
+    <PackageVersion Include="Uno.Resizetizer" Version="1.1.0-dev.40" />
+    <PackageVersion Include="Uno.Toolkit.WinUI.Material" Version="2.6.0-dev.50" />
+    <PackageVersion Include="Uno.Material.WinUI" Version="2.6.0-dev.17" />
+    <PackageVersion Include="Uno.Toolkit.WinUI" Version="2.6.0-dev.50" />
     <PackageVersion Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />
-    <PackageVersion Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.9.0-dev.357" />
+    <PackageVersion Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.9.0-dev.998" />
     <!-- Uno WinUI -->
-    <PackageVersion Include="Uno.WinUI" Version="4.9.0-dev.332" />
-    <PackageVersion Include="Uno.WinUI.WebAssembly" Version="4.9.0-dev.332" />
-    <PackageVersion Include="Uno.WinUI.RemoteControl" Version="4.9.0-dev.332" Condition="'$(Configuration)'=='Debug'" />
-    <PackageVersion Include="Uno.WinUI.Lottie" Version="4.9.0-dev.332" />
-    <PackageVersion Include="Uno.WinUI.Skia.Gtk" Version="4.9.0-dev.332" />
+    <PackageVersion Include="Uno.WinUI" Version="4.9.0-dev.998" />
+    <PackageVersion Include="Uno.WinUI.WebAssembly" Version="4.9.0-dev.998" />
+    <PackageVersion Include="Uno.WinUI.RemoteControl" Version="4.9.0-dev.998" Condition="'$(Configuration)'=='Debug'" />
+    <PackageVersion Include="Uno.WinUI.Lottie" Version="4.9.0-dev.998" />
+    <PackageVersion Include="Uno.WinUI.Skia.Gtk" Version="4.9.0-dev.998" />
     <!-- Uno Extension -->
-    <PackageVersion Include="Uno.Extensions.Authentication.WinUI" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Configuration" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Core" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Hosting" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Hosting.WinUI" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Http" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Http.Refit" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Localization.WinUI" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Logging.Serilog" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Logging.WinUI" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Navigation.WinUI" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Navigation" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Serialization" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Serialization.Http" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Serialization.Refit" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Reactive" Version="2.4.0-dev.149" />
-    <PackageVersion Include="Uno.Extensions.Reactive.WinUI" Version="2.4.0-dev.149" />
+    <PackageVersion Include="Uno.Extensions.Authentication.WinUI" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Configuration" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Core" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Hosting" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Hosting.WinUI" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Http" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Http.Refit" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Localization.WinUI" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Logging.Serilog" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Logging.WinUI" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Navigation.WinUI" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Navigation" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Serialization" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Serialization.Http" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Serialization.Refit" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Reactive" Version="2.4.0-dev.290" />
+    <PackageVersion Include="Uno.Extensions.Reactive.WinUI" Version="2.4.0-dev.290" />
     <!-- Uno WASM -->
-    <PackageVersion Include="Uno.Wasm.Bootstrap" Version="8.0.0-dev.122" />
-    <PackageVersion Include="Uno.Wasm.Bootstrap.DevServer" Version="8.0.0-dev.122" />
-    <PackageVersion Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.5.0-dev.1" />
+    <PackageVersion Include="Uno.Wasm.Bootstrap" Version="8.0.0-dev.138" />
+    <PackageVersion Include="Uno.Wasm.Bootstrap.DevServer" Version="8.0.0-dev.138" />
+    <PackageVersion Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.6.0-dev.2" />
     <!-- Linux -->
     <PackageVersion Include="SkiaSharp.Skottie" Version="2.88.3" />
     <!-- Uno.WinUi specific packages -->
@@ -59,8 +59,8 @@
     <PackageVersion Include="NUnit" Version="3.13.3" />
     <PackageVersion Include="NUnit3TestAdapter" Version="4.4.2" />
     <PackageVersion Include="coverlet.collector" Version="3.2.0" />
-    <PackageVersion Include="Uno.UITest.Helpers" Version="1.1.0-dev.55" />
-    <PackageVersion Include="Xamarin.UITest" Version="4.1.2" />
+    <PackageVersion Include="Uno.UITest.Helpers" Version="1.1.0-dev.59" />
+    <PackageVersion Include="Xamarin.UITest" Version="4.1.3" />
     <PackageVersion Include="Microsoft.Extensions.Logging" Version="7.0.0" />
     <PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
     <PackageVersion Include="Microsoft.Windows.Compatibility" Version="7.0.1" />

running the following command: dotnet build /bl -c Release from a WSL Ubuntu 22.04 installation results in the following error:

$HOME/.nuget/packages/uno.wasm.bootstrap/8.0.0-dev.138/build/Uno.Wasm.Bootstrap.targets(207,3): error : System.Exception: Failed to run emscripten. More details are available in diagnostics logging mode or using the MSBuild /bl switch, see https://aka.platform.uno/msbuild-troubleshoot. [MyWasm.csproj]
$HOME/.nuget/packages/uno.wasm.bootstrap/8.0.0-dev.138/build/Uno.Wasm.Bootstrap.targets(207,3): error :    at Uno.Wasm.Bootstrap.ShellTask_v393732b53af67b2927d668a22f06d981446753f6.RunPackager() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 926 [MyWasm.csproj]
$HOME/.nuget/packages/uno.wasm.bootstrap/8.0.0-dev.138/build/Uno.Wasm.Bootstrap.targets(207,3): error :    at Uno.Wasm.Bootstrap.ShellTask_v393732b53af67b2927d668a22f06d981446753f6.Execute() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 262 [MyWasm.csproj] 

See also the provided bin logs.

igiona commented 1 year ago

Additional information:

On a new machine, on which I never built the code from WSL, I'm getting the same error also without the above mentioned patch applied.


$HOME/.nuget/packages/uno.wasm.bootstrap/8.0.0-dev.122/build/Uno.Wasm.Bootstrap.targets(207,3): error : System.NotSupportedException: Failed to install emscripten [My.Wasm/My.Wasm.csproj]
$HOME/.nuget/packages/uno.wasm.bootstrap/8.0.0-dev.122/build/Uno.Wasm.Bootstrap.targets(207,3): error :    at Uno.Wasm.Bootstrap.ShellTask_v7dc900fc9c79e69d42d0fa4ec95841e1c93379ae.ValidateEmscripten() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 1279 [My.Wasm/My.Wasm.csproj]
$HOME/.nuget/packages/uno.wasm.bootstrap/8.0.0-dev.122/build/Uno.Wasm.Bootstrap.targets(207,3): error :    at Uno.Wasm.Bootstrap.ShellTask_v7dc900fc9c79e69d42d0fa4ec95841e1c93379ae.RunPackager() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 780 [My.Wasm/My.Wasm.csproj]
$HOME/.nuget/packages/uno.wasm.bootstrap/8.0.0-dev.122/build/Uno.Wasm.Bootstrap.targets(207,3): error :    at Uno.Wasm.Bootstrap.ShellTask_v7dc900fc9c79e69d42d0fa4ec95841e1c93379ae.Execute() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 262 [My.Wasm/My.Wasm.csproj]

Build FAILED.

$HOME/.nuget/packages/uno.wasm.bootstrap/8.0.0-dev.122/build/Uno.Wasm.Bootstrap.targets(207,3): error : System.NotSupportedException: Failed to install emscripten [My.Wasm/My.Wasm.csproj]
$HOME/.nuget/packages/uno.wasm.bootstrap/8.0.0-dev.122/build/Uno.Wasm.Bootstrap.targets(207,3): error :    at Uno.Wasm.Bootstrap.ShellTask_v7dc900fc9c79e69d42d0fa4ec95841e1c93379ae.ValidateEmscripten() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 1279 [My.Wasm/My.Wasm.csproj]
$HOME/.nuget/packages/uno.wasm.bootstrap/8.0.0-dev.122/build/Uno.Wasm.Bootstrap.targets(207,3): error :    at Uno.Wasm.Bootstrap.ShellTask_v7dc900fc9c79e69d42d0fa4ec95841e1c93379ae.RunPackager() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 780 [My.Wasm/My.Wasm.csproj]
$HOME/.nuget/packages/uno.wasm.bootstrap/8.0.0-dev.122/build/Uno.Wasm.Bootstrap.targets(207,3): error :    at Uno.Wasm.Bootstrap.ShellTask_v7dc900fc9c79e69d42d0fa4ec95841e1c93379ae.Execute() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 262 [My.Wasm/My.Wasm.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:07:23.30
jeromelaban commented 1 year ago

Latest updates have fixes for the windows non-wsl build. Can you validate if you still need to build using WSL?

igiona commented 1 year ago

Thanks @jeromelaban , I tried from VS on my laptop and it worked!

On the freshly installed desktop I'm still having the issue:

$HOME\.nuget\packages\uno.wasm.bootstrap\8.0.0-dev.152\build\Uno.Wasm.Bootstrap.targets(207,3): error : System.Exception: Failed to run emscripten. More details are a
vailable in diagnostics logging mode or using the MSBuild /bl switch, see https://aka.platform.uno/msbuild-troubleshoot. [My.Wasm\My.Wasm.csproj]
$HOME\.nuget\packages\uno.wasm.bootstrap\8.0.0-dev.152\build\Uno.Wasm.Bootstrap.targets(207,3): error :    at Uno.Wasm.Bootstrap.ShellTask_vfbdb5fa3bdab291edd06d9421219
424ddc7093fe.RunPackager() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 740 [My.Wasm\My.Wasm.csproj]
$HOME\.nuget\packages\uno.wasm.bootstrap\8.0.0-dev.152\build\Uno.Wasm.Bootstrap.targets(207,3): error :    at Uno.Wasm.Bootstrap.ShellTask_vfbdb5fa3bdab291edd06d9421219
424ddc7093fe.Execute() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 263 [My.Wasm\My.Wasm.csproj]

Bin log provided.

Not sure if it's relevant, but on windows: on the freshly installed machine I've python 3.11.3 installed on the working laptop is on 3.10.8.

igiona commented 1 year ago

@jeromelaban thank you for the support.

Removing all dotnet-runtime-wasm_* folders from the %temp% folder fixed this issue!