Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uno-check should report an accurate error when running under macOS Rosetta #229

Open
randomroxks opened this issue Jan 31, 2024 · 13 comments

Comments

@randomroxks
Copy link

Title says it all:

⚠ Installation failed for .NET SDK 8.0.101.
Fix failed - '/usr/bin/sudo' with arguments '/usr/sbin/installer -verbose
-dumplog -pkg
"/var/folders/tg/72zl10b10ks2z1gw2c3vmnqm0000gn/T/j2l0vqyc.v01.pkg" -target /'
exited with code 1

🔎 GTK3+ Checkup...

🔎 dotnet new Uno Project Templates Checkup...

❌ Skipped: .NET SDK - Workloads (8.0.101)
────────────────────────────────────────────────────────────────────────────────

🔔 There were one or more problems detected.
Please review the errors and correct them and run uno-check again.

@jeromelaban
Copy link
Member

Thanks for the report. We're not able to reproduce this on an arm64 device.

Could you attach the full log of the tool running with --verbose? Thanks!

@randomroxks
Copy link
Author

randomroxks commented Feb 16, 2024

Here it is:
_ _ _ __ ___ ___ | |__ ___ ___ | | __
| | | | | '_ \ / _ \ _____ / | | ' \ / _ \ / | | |/ /
| || | | | | | | () | |
| | ( | | | | | / | ( | <
_,| || || _/ _| || || _| _| |_|_\

🚑 Uno Platform Check v1.20.0.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...Loading Manifest from: https://raw.githubusercontent.com/unoplatform/uno.check/cb74c45d871e416469bac56f228f0d514e0db3c3/manifests/uno.ui.manifest.json
Required Version: 1.14.0
Current Version: 1.20.0.0
ok
⏳ Scheduling appointments...SetEnvironmentVariable: DOTNET_ROOT=/usr/local/share/dotnet
SetEnvironmentVariable: DOTNET_ROOT=/usr/local/share/dotnet
ok

🔎 OpenJDK 11.0 Checkup...
ValidateAndroidSdkLocation: , result=False ValidateAndroidSdkLocation: `/Users/{home}/Library/Android/sdk`, result=True ValidateAndroidSdkLocation: `/Users/{home}/Library/Android/sdk`, result=True ValidateJavaSdkLocation: , result=False
ValidateJavaSdkLocation: /Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home, result=True
ValidateJavaSdkLocation: /Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home, result=True
ValidateAndroidNdkLocation: ``, result=False
Best NDK selected: v22.1.7171670 in /Users/{home}/Library/Android/sdk/ndk-bundle
ValidateAndroidNdkLocation: /Users/{home}/Library/Android/sdk/ndk-bundle, result=True
SHELL: /bin/zsh /tmp/tmpGDMtmF.tmp
javac 11.0.16.1
SHELL: /bin/zsh /tmp/tmp9Z3iyx.tmp
javac 11.0.16.1
✔ 11.0.16.1 (/Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home/bin/..)
SetEnvironmentVariable: JAVA_HOME=/Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home

🔎 Android SDK Checkup...
ValidateAndroidSdkLocation: , result=False ValidateAndroidSdkLocation: `/Users/{home}/Library/Android/sdk`, result=True ValidateAndroidSdkLocation: `/Users/{home}/Library/Android/sdk`, result=True ValidateJavaSdkLocation: `/Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home`, result=True ValidateAndroidNdkLocation: , result=False
Best NDK selected: v22.1.7171670 in /Users/{home}/Library/Android/sdk/ndk-bundle
ValidateAndroidNdkLocation: /Users/{home}/Library/Android/sdk/ndk-bundle, result=True
SetEnvironmentVariable: ANDROID_SDK_ROOT=/Users/{home}/Library/Android/sdk
SetEnvironmentVariable: ANDROID_HOME=/Users/{home}/Library/Android/sdk
✔ emulator (34.2.5)
✔ build-tools;34.0.0 (34.0.0)
✔ platforms;android-34 (2)
✔ system-images;android-34;google_apis;arm64-v8a (12)
✔ platform-tools (34.0.5)
✔ cmdline-tools;5.0 (5.0)

🔎 Android Emulator Checkup...
✔ Emulator: Pixel_6_Pro_API_33 found.

🔎 XCode 15.0.1 Checkup...
SHELL: /bin/zsh /tmp/tmpBI6dHe.tmp
/Applications/Xcode.app/Contents/Developer
SHELL: /bin/zsh /tmp/tmpKBFExl.tmp
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES

2024-02-16 08:04:12.822 xcodebuild[21393:3221260] Writing error result bundle to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/ResultBundle_2024-16-02_08-04-0012.xcresult
xcodebuild: error: The directory /Users/{home}/Projects/Private does not contain an Xcode project.

✔ Xcode.app (15.2 15C500b)

🔎 .NET SDK Checkup...
SetEnvironmentVariable: DOTNET_ROOT=/usr/local/share/dotnet
SHELL: /bin/zsh /tmp/tmpK2QjPc.tmp
6.0.414 [/usr/local/share/dotnet/sdk]
6.0.417 [/usr/local/share/dotnet/sdk]
6.0.418 [/usr/local/share/dotnet/sdk]
7.0.308 [/usr/local/share/dotnet/sdk]
7.0.401 [/usr/local/share/dotnet/sdk]
7.0.402 [/usr/local/share/dotnet/sdk]
8.0.100 [/usr/local/share/dotnet/sdk]
8.0.101 [/usr/local/share/dotnet/sdk]
– 6.0.414 - /usr/local/share/dotnet/sdk/6.0.414
– 6.0.417 - /usr/local/share/dotnet/sdk/6.0.417
– 6.0.418 - /usr/local/share/dotnet/sdk/6.0.418
– 7.0.308 - /usr/local/share/dotnet/sdk/7.0.308
– 7.0.401 - /usr/local/share/dotnet/sdk/7.0.401
– 7.0.402 - /usr/local/share/dotnet/sdk/7.0.402
– 8.0.100 - /usr/local/share/dotnet/sdk/8.0.100
– 8.0.101 - /usr/local/share/dotnet/sdk/8.0.101
SetEnvironmentVariable: DOTNET_SDK=/usr/local/share/dotnet/sdk/8.0.101
SetEnvironmentVariable: DOTNET_SDK_VERSION=8.0.101

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
💉 Recommendation: Download .NET SDK (8.0.200)
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

🔔 Attempt to fix? [y/n] (y): y
⏳ Attempting to fix: .NET SDK
Installing .NET SDK 8.0.200...
System.Exception: '/usr/bin/sudo' with arguments '/usr/sbin/installer -verbose -dumplog -pkg "/tmp/hfpdqjy5.voy.pkg" -target /' exited with code 1
at void Boots.Core.AsyncProcess.ThrowForExitCode(int exitCode)
at async Task Boots.Core.AsyncProcess.RunAsync(CancellationToken token, bool throwOnError)
at async Task Boots.Core.PkgInstaller.Install(string file, CancellationToken token)
at async Task Boots.Core.Bootstrapper.Install(CancellationToken token)
at async Task DotNetCheck.Solutions.BootsSolution.Implement(SharedState sharedState, CancellationToken cancellationToken) in //UnoCheck/Solutions/BootsSolution.cs:32
⚠ Installation failed for .NET SDK 8.0.200.
System.Exception: '/usr/bin/sudo' with arguments '/usr/sbin/installer -verbose -dumplog -pkg "/tmp/hfpdqjy5.voy.pkg" -target /' exited with code 1
at void Boots.Core.AsyncProcess.ThrowForExitCode(int exitCode)
at async Task Boots.Core.AsyncProcess.RunAsync(CancellationToken token, bool throwOnError)
at async Task Boots.Core.PkgInstaller.Install(string file, CancellationToken token)
at async Task Boots.Core.Bootstrapper.Install(CancellationToken token)
at async Task DotNetCheck.Solutions.BootsSolution.Implement(SharedState sharedState, CancellationToken cancellationToken) in /
/UnoCheck/Solutions/BootsSolution.cs:32
at async Task DotNetCheck.Cli.CheckCommand.ExecuteAsync(CommandContext context, CheckSettings settings) in /_/UnoCheck/CheckCommand.cs:236
Fix failed - '/usr/bin/sudo' with arguments '/usr/sbin/installer -verbose -dumplog -pkg "/tmp/hfpdqjy5.voy.pkg" -target /' exited with code 1

🔎 GTK3+ Checkup...

🔎 dotnet new Uno Project Templates Checkup...

❌ Skipped: .NET SDK - Workloads (8.0.200)
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Checkup had Error status: dotnet

dotnet: .NET SDK (8.0.200) not installed.
🔔 There were one or more problems detected.
Please review the errors and correct them and run uno-check again.

Press Enter to finish...

@randomroxks
Copy link
Author

Here is another log:

Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
6.0.414 [/usr/local/share/dotnet/sdk]
6.0.417 [/usr/local/share/dotnet/sdk]
6.0.418 [/usr/local/share/dotnet/sdk]
7.0.308 [/usr/local/share/dotnet/sdk]
7.0.401 [/usr/local/share/dotnet/sdk]
7.0.402 [/usr/local/share/dotnet/sdk]
8.0.100 [/usr/local/share/dotnet/sdk]
8.0.101 [/usr/local/share/dotnet/sdk]
8.0.201 [/usr/local/share/dotnet/sdk]
System.Exception: Workload command failed: dotnet workload update --print-rollback
at async (ValueTuple<string, string, string>[[]] id) DotNetCheck.DotNet.DotNetWorkloadManager.GetInstalledWorkloads() in //UnoCheck/DotNet/DotNetWorkloadManager.cs:102
at async Task DotNetCheck.Checkups.DotNetWorkloadsCheckup.Examine(SharedState history) in /
/UnoCheck/Checkups/DotNetWorkloadsCheckup.cs:72
at async Task DotNetCheck.Cli.CheckCommand.ExecuteAsync(CommandContext context, CheckSettings settings) in /_/UnoCheck/CheckCommand.cs:175
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Checkup had Error status: dotnetworkloads-8.0.200

dotnetworkloads-8.0.200: Workload command failed: dotnet workload update --print-rollback
🔔 There were one or more problems detected.
Please review the errors and correct them and run uno-check again.

@jeromelaban
Copy link
Member

Thanks. There is unfortunately not enough information to troubleshoot this issue with this log.

Let's try something else. Can you run this:

wget https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.200/dotnet-sdk-8.0.200-osx-arm64.pkg
sudo /usr/sbin/installer -verbose -dumplog -pkg "dotnet-sdk-8.0.200-osx-arm64.pkg" -target /

and paste the logs here?

@randomroxks
Copy link
Author

Thanks. There is unfortunately not enough information to troubleshoot this issue with this log.

Let's try something else. Can you run this:

wget https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.200/dotnet-sdk-8.0.200-osx-arm64.pkg
sudo /usr/sbin/installer -verbose -dumplog -pkg "dotnet-sdk-8.0.200-osx-arm64.pkg" -target /

and paste the logs here?

% wget https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.200/dotnet-sdk-8.0.200-osx-arm64.pkg
sudo /usr/sbin/installer -verbose -dumplog -pkg "dotnet-sdk-8.0.200-osx-arm64.pkg" -target /
--2024-02-16 08:13:12-- https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.200/dotnet-sdk-8.0.200-osx-arm64.pkg
Resolving dotnetcli.azureedge.net (dotnetcli.azureedge.net)... 72.21.81.200
Connecting to dotnetcli.azureedge.net (dotnetcli.azureedge.net)|72.21.81.200|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 218511165 (208M) [application/octet-stream]
Saving to: ‘dotnet-sdk-8.0.200-osx-arm64.pkg’

dotnet-sdk-8.0.200-osx-arm64.pkg 100%[======================================================================================================================================================================>] 208.39M 14.1MB/s in 21s

2024-02-16 08:13:34 (9.89 MB/s) - ‘dotnet-sdk-8.0.200-osx-arm64.pkg’ saved [218511165/218511165]

installer: Error - Microsoft .NET SDK 8.0.200 (arm64) can’t be installed on this computer.
Private %

@jeromelaban
Copy link
Member

This is a curious error:

installer: Error - Microsoft .NET SDK 8.0.200 (arm64) can’t be installed on this computer.

Which would indicate a specific configuration for your machine.

Could you run this:

/usr/bin/arch
/usr/sbin/sysctl -n machdep.cpu.brand_string

and post the results

@randomroxks
Copy link
Author

/usr/bin/arch
/usr/sbin/sysctl -n machdep.cpu.brand_string

% /usr/bin/arch
/usr/sbin/sysctl -n machdep.cpu.brand_string
i386
Apple M1 Max

@jeromelaban
Copy link
Member

Thanks, this explains a lot about the behavior. Would you have configured your shell to execute under rosetta?

@spouliot is it something that rings a bell?

@randomroxks
Copy link
Author

Thats weird, I downloaded another terminal warp, and ran the same command and got this:
/usr/bin/arch
/usr/sbin/sysctl -n machdep.cpu.brand_string
arm64
Apple M1 Max

@randomroxks
Copy link
Author

Thanks, this explains a lot about the behavior. Would you have configured your shell to execute under rosetta?

@spouliot is it something that rings a bell?

SHEEAT. You are right. I'm so sorry, dang it.

@randomroxks
Copy link
Author

User error.

@jeromelaban
Copy link
Member

Thanks, let me keep this one opened so uno-check can provide more accurate errors when this scenario happens.

@jeromelaban jeromelaban reopened this Feb 16, 2024
@jeromelaban jeromelaban changed the title Uno-check fails to install .net workload 801 on mac silicon Uno-check should report an accurate error when running under macOS Rosetta Feb 16, 2024
@spouliot
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants