unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.88k stars 719 forks source link

WebAssembly on macOS in Rider failed to install emscripten #17783

Open KSemenenko opened 2 months ago

KSemenenko commented 2 months ago

Current behavior

0>Uno.Wasm.Bootstrap.targets(213,3): Error : System.NotSupportedException: Failed to install emscripten at Uno.Wasm.Bootstrap.ShellTaskv22722a164cfb242bfbdc2b10248f624fa32b28c2.ValidateEmscripten() in //src/Uno.Wasm.Bootstrap/ShellTask.cs:line 1334 at Uno.Wasm.Bootstrap.ShellTaskv22722a164cfb242bfbdc2b10248f624fa32b28c2.RunPackager() in //src/Uno.Wasm.Bootstrap/ShellTask.cs:line 803 at Uno.Wasm.Bootstrap.ShellTaskv22722a164cfb242bfbdc2b10248f624fa32b28c2.Execute() in //src/Uno.Wasm.Bootstrap/ShellTask.cs:line 270

Expected behavior

No response

How to reproduce it (as minimally and precisely as possible)

I created new Uno app and run debug.

Workaround

I install latest uno, I install latest webassebmly workload, I install emscripten from brew

Works on UWP/WinUI

None

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia

NuGet package version(s)

No response

Affected platforms

WebAssembly

IDE

Rider macOS

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

jeromelaban commented 2 months ago

Thanks for the report. You can troubleshoot the errors using the binlog viewer, or by enabling build diagnostics in rider to see more verbose messages.

KSemenenko commented 2 months ago
dotnet build /bl
  Determining projects to restore...
  Restored /Users/user/Developer/AIBase/Client/AIBase.Client.UITests/AIBase.Client.UITests.csproj (in 277 ms).
  Restored /Users/user/Developer/AIBase/Client/AIBase.Client/AIBase.Client.csproj (in 393 ms).
  AIBase.Client.UITests -> /Users/user/Developer/AIBase/Client/AIBase.Client.UITests/bin/Debug/net8.0/AIBase.Client.UITests.dll
  Detected signing identity:

    Bundle Id: com.managed-code.app
    App Id: com.managed-code.app
  Downloading dotnet-runtime-wasm-linux-5708d38-7331dcb60e0-6866112926-Release-simd to /var/folders/s4/5h5rfhmj4h94by8jlf6t85nr0000gn/T/dotnet-runtime-wasm-linux-5708d38-7331dcb60e0-6866112926-Release-simd.zip
  AIBase.Client -> /Users/user/Developer/AIBase/Client/AIBase.Client/bin/Debug/net8.0-maccatalyst/maccatalyst-arm64/AIBase.Client.dll
  Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  Optimizing assemblies for size. This process might take a while.
ILLINK : warning MT4189: The class 'PassKit.PKDisbursementAuthorizationController' will not be registered it has been removed from the MacCatalyst SDK. [/Users/user/Developer/AIBase/Client/AIBase.Client/AIBase.Client.csproj::TargetFramework=net8.0-maccatalyst]
ILLINK : warning MT4189: The class 'PassKit.PKDisbursementAuthorizationControllerDelegate' will not be registered it has been removed from the MacCatalyst SDK. [/Users/user/Developer/AIBase/Client/AIBase.Client/AIBase.Client.csproj::TargetFramework=net8.0-maccatalyst]
ILLINK : warning MT0182: Not linking with the framework OpenGLES (referenced by a module reference in SkiaSharp.Views.Windows.dll) because it's not available on the current platform (MacCatalyst). [/Users/user/Developer/AIBase/Client/AIBase.Client/AIBase.Client.csproj::TargetFramework=net8.0-maccatalyst]
/Users/user/.nuget/packages/uno.wasm.bootstrap/8.0.13/build/Uno.Wasm.Bootstrap.targets(213,3): error : System.NotSupportedException: Failed to install emscripten [/Users/user/Developer/AIBase/Client/AIBase.Client/AIBase.Client.csproj::TargetFramework=net8.0-browserwasm]
/Users/user/.nuget/packages/uno.wasm.bootstrap/8.0.13/build/Uno.Wasm.Bootstrap.targets(213,3): error :    at Uno.Wasm.Bootstrap.ShellTask_v22722a164cfb242bfbdc2b10248f624fa32b28c2.ValidateEmscripten() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 1334 [/Users/user/Developer/AIBase/Client/AIBase.Client/AIBase.Client.csproj::TargetFramework=net8.0-browserwasm]
/Users/user/.nuget/packages/uno.wasm.bootstrap/8.0.13/build/Uno.Wasm.Bootstrap.targets(213,3): error :    at Uno.Wasm.Bootstrap.ShellTask_v22722a164cfb242bfbdc2b10248f624fa32b28c2.RunPackager() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 803 [/Users/user/Developer/AIBase/Client/AIBase.Client/AIBase.Client.csproj::TargetFramework=net8.0-browserwasm]
/Users/user/.nuget/packages/uno.wasm.bootstrap/8.0.13/build/Uno.Wasm.Bootstrap.targets(213,3): error :    at Uno.Wasm.Bootstrap.ShellTask_v22722a164cfb242bfbdc2b10248f624fa32b28c2.Execute() in /_/src/Uno.Wasm.Bootstrap/ShellTask.cs:line 270 [/Users/user/Developer/AIBase/Client/AIBase.Client/AIBase.Client.csproj::TargetFramework=net8.0-browserwasm]
KSemenenko commented 2 months ago
πŸš‘ Uno Platform Check v1.25.1.0 πŸ’‰
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
This tool will check your Uno Platform development environment.
If problems are detected, it will offer the option to try and fix them for you, or suggest a way to fix them yourself.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
⏳ Synchronizing configuration... ok
⏳ Scheduling appointments... ok

πŸ”Ž OpenJDK 11.0 Checkup...
  βœ” 11.0.16.1 (/Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home/bin/..)

πŸ”Ž Android SDK Checkup...
  βœ” emulator (34.2.13)
  βœ” build-tools;34.0.0 (34.0.0)
  βœ” platforms;android-34 (1)
  βœ” system-images;android-34;google_apis;arm64-v8a (13)
  βœ” platform-tools (33.0.3)
  βœ” cmdline-tools;5.0 (5.0)

πŸ”Ž Android Emulator Checkup...

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
πŸ’‰ Recommendation: Create an Android Emulator
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

πŸ”” Attempt to fix? [y/n] (y): n

πŸ”Ž XCode 15.0.1 Checkup...
Command line invocation:
    /Applications/Xcode-15.4.0.app/Contents/Developer/usr/bin/xcodebuild

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

2024-08-04 14:40:57.103 xcodebuild[9412:31726867] Writing error result bundle to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/ResultBundle_2024-04-08_14-40-0057.xcresult
xcodebuild: error: The directory /Users/user does not contain an Xcode project.

  βœ” Xcode.app (15.4 15F31d)

πŸ”Ž .NET SDK Checkup...
  – 7.0.309 - /usr/local/share/dotnet/sdk/7.0.309
  – 8.0.301 - /usr/local/share/dotnet/sdk/8.0.301
  – 8.0.302 - /usr/local/share/dotnet/sdk/8.0.302
  – 8.0.303 - /usr/local/share/dotnet/sdk/8.0.303

πŸ”Ž Git Checkup...
SHELL: /bin/zsh /tmp/tmpgWMKV1.tmp
git version 2.39.3 (Apple Git-146)

πŸ”Ž dotnet new Uno Project Command Line Templates Checkup...

πŸ”Ž Uno SDK Checkup...

πŸ”Ž .NET SDK - Workloads (8.0.300) Checkup...
  βœ” microsoft.net.sdk.android (34.0.113/8.0.100) installed.
  βœ” microsoft.net.sdk.ios (17.2.8078/8.0.100) installed.
  βœ” microsoft.net.sdk.maccatalyst (17.2.8078/8.0.100) installed.
  βœ” microsoft.net.sdk.macos (14.2.8078/8.0.100) installed.
  βœ” microsoft.net.sdk.maui (8.0.61/8.0.100) installed.
KSemenenko commented 2 months ago

macOS build works fine

KSemenenko commented 2 months ago

msbuild.binlog.zip build log

jeromelaban commented 1 month ago

Thanks for the report. It seems that there's a missing tool in the environment. Can you try deleting ~/.uno/emsdk and do a build again with a binlog? The log will contain more information.