Open stevenlafl opened 2 years ago
Thanks for the report. Are you using Ubuntu? It looks like you installed .NET using apt install dotnet6
, is that the case?
Yes, 22.04. Using apt install dotnet-sdk-6.0
. I had originally installed it with microsoft's repository, however there was an advisory. I performed the steps under "Mixed state scenario 1" as instructed here https://github.com/dotnet/core/issues/7699 . According to that, I shouldn't have the dotnet6 package unless it were a dependency of one of these:
$ sudo apt list | grep dotnet
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
dotnet-apphost-pack-6.0/jammy-updates,now 6.0.108-0ubuntu1~22.04.1 amd64 [installed,automatic]
dotnet-host/jammy-updates,now 6.0.108-0ubuntu1~22.04.1 amd64 [installed,automatic]
dotnet-hostfxr-6.0/jammy-updates,now 6.0.108-0ubuntu1~22.04.1 amd64 [installed,automatic]
dotnet-runtime-6.0/jammy-updates,now 6.0.108-0ubuntu1~22.04.1 amd64 [installed,automatic]
dotnet-sdk-6.0-source-built-artifacts/jammy-updates 6.0.108-0ubuntu1~22.04.1 amd64
dotnet-sdk-6.0/jammy-updates,now 6.0.108-0ubuntu1~22.04.1 amd64 [installed]
dotnet-targeting-pack-6.0/jammy-updates,now 6.0.108-0ubuntu1~22.04.1 amd64 [installed,automatic]
dotnet-templates-6.0/jammy-updates,now 6.0.108-0ubuntu1~22.04.1 amd64 [installed,automatic]
dotnet6/jammy-updates 6.0.108-0ubuntu1~22.04.1 amd64
libgtk-dotnet3.0-cil-dev/jammy 2.99.3-4build1 amd64
libgtk-dotnet3.0-cil/jammy 2.99.3-4build1 amd64
Something look off?
Nothing does look off, no, thanks. This particular (and very new) installation method seems to be interfering with the "command line" installer that uno-check uses. Can you also provide the output from uno-check --verbose
?
Now, it may not be a problem for now, particularly as you're running dotnet on Linux. You should still be able to build and run uno apps with the apt install dotnet6
install.
π Uno Platform Check v1.5.3.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/d1aae2371cf6f6f241fc6f664ce16d042f6cdf0b/manifests/uno.ui.manifest.json
Required Version: 1.5.0
Current Version: 1.5.3.0
ok
β³ Scheduling appointments...SetEnvironmentVariable: DOTNET_ROOT=/usr/lib/dotnet/dotnet6-6.0.108
SetEnvironmentVariable: DOTNET_ROOT=/usr/lib/dotnet/dotnet6-6.0.108
ok
π .NET SDK Checkup...
SetEnvironmentVariable: DOTNET_ROOT=/usr/lib/dotnet/dotnet6-6.0.108
SHELL: /bin/bash /tmp/tmpS2KIVA.tmp
6.0.108 [/usr/lib/dotnet/dotnet6-6.0.108/sdk]
β 6.0.108 - /usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.108
SetEnvironmentVariable: DOTNET_SDK=/usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.108
SetEnvironmentVariable: DOTNET_SDK_VERSION=6.0.108
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Recommendation: Download .NET SDK (6.0.400-rtm.22364.21)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Attempt to fix? [y/n] (y): y
β³ Attempting to fix: .NET SDK
Downloading dotnet-install script: https://dot.net/v1/dotnet-install.sh
Executing dotnet-install script...
bash "/tmp/dotnet-install.sh" --install-dir "/usr/lib/dotnet/dotnet6-6.0.108" --version "6.0.400-rtm.22364.21"
SHELL: /bin/bash /tmp/tmpvk6HLo.tmp
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
dotnet-install: Attempting to download using primary link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.400-rtm.22364.21/dotnet-sdk-6.0.400-rtm.22364.21-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.400-rtm.22364.21/dotnet-sdk-6.0.400-rtm.22364.21-linux-x64.tar.gz' is not available.
dotnet-install: Attempting to download using primary link https://dotnetbuilds.azureedge.net/public/Sdk/6.0.400-rtm.22364.21/dotnet-sdk-6.0.400-linux-x64.tar.gz
dotnet-install: Extracting zip from https://dotnetbuilds.azureedge.net/public/Sdk/6.0.400-rtm.22364.21/dotnet-sdk-6.0.400-linux-x64.tar.gz
cp: cannot create directory '/usr/lib/dotnet/dotnet6-6.0.108/host/fxr/6.0.7/': Permission denied
cp: cannot create directory '/usr/lib/dotnet/dotnet6-6.0.108/packs/Microsoft.AspNetCore.App.Ref/6.0.7/': Permission denied
mkdir: cannot create directory β/usr/lib/dotnet/dotnet6-6.0.108/packs/Microsoft.NETCore.App.Host.linux-x64β: Permission denied
cp: cannot create directory '/usr/lib/dotnet/dotnet6-6.0.108/packs/Microsoft.NETCore.App.Host.linux-x64/6.0.7/': No such file or directory
cp: cannot create directory '/usr/lib/dotnet/dotnet6-6.0.108/packs/Microsoft.NETCore.App.Ref/6.0.7/': Permission denied
cp: cannot create directory '/usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.400/': Permission denied
mkdir: cannot create directory β/usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.400β: Permission denied
cp: cannot create directory '/usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.400/DotnetTools/dotnet-dev-certs/6.0.7-servicing.22322.5/': No such file or directory
mkdir: cannot create directory β/usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.400β: Permission denied
cp: cannot create directory '/usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.400/DotnetTools/dotnet-user-secrets/6.0.7-servicing.22322.5/': No such file or directory
mkdir: cannot create directory β/usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.400β: Permission denied
cp: cannot create directory '/usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.400/DotnetTools/dotnet-watch/6.0.400-preview.22364.3/': No such file or directory
cp: cannot create directory '/usr/lib/dotnet/dotnet6-6.0.108/sdk-manifests/6.0.300/': Permission denied
cp: cannot create directory '/usr/lib/dotnet/dotnet6-6.0.108/shared/Microsoft.AspNetCore.App/6.0.7/': Permission denied
cp: cannot create directory '/usr/lib/dotnet/dotnet6-6.0.108/shared/Microsoft.NETCore.App/6.0.7/': Permission denied
cp: cannot create directory '/usr/lib/dotnet/dotnet6-6.0.108/templates/6.0.7/': Permission denied
cp: cannot create regular file '/usr/lib/dotnet/dotnet6-6.0.108/dotnet': Permission denied
cp: cannot create regular file '/usr/lib/dotnet/dotnet6-6.0.108/ThirdPartyNotices.txt': Permission denied
cp: cannot create regular file '/usr/lib/dotnet/dotnet6-6.0.108/LICENSE.txt': Permission denied
dotnet_install: Error: Failed to verify the version of installed `.NET Core SDK`.
Installation source: https://dotnetbuilds.azureedge.net/public/Sdk/6.0.400-rtm.22364.21/dotnet-sdk-6.0.400-linux-x64.tar.gz.
Installation location: /usr/lib/dotnet/dotnet6-6.0.108.
Report the bug at https://github.com/dotnet/install-scripts/issues.
dotnet_install: Error: `.NET Core SDK` with version = 6.0.400 failed to install with an error.
Fix applied. Checking again...
π .NET SDK Checkup...
SetEnvironmentVariable: DOTNET_ROOT=/usr/lib/dotnet/dotnet6-6.0.108
SHELL: /bin/bash /tmp/tmpvBj9vD.tmp
6.0.108 [/usr/lib/dotnet/dotnet6-6.0.108/sdk]
β 6.0.108 - /usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.108
SetEnvironmentVariable: DOTNET_SDK=/usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.108
SetEnvironmentVariable: DOTNET_SDK_VERSION=6.0.108
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Recommendation: Download .NET SDK (6.0.400-rtm.22364.21)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Attempt to fix? [y/n] (y): y
β Skipped: .NET SDK - Workload Deduplication
π GTK3+ Checkup...
SHELL: /bin/bash /tmp/tmpheDDlE.tmp
libgdk-3.so.0: /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
β Skipped: .NET SDK - Workloads (6.0.400-rtm.22364.21)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Checkup had Error status: dotnet
dotnet: .NET SDK (6.0.400-rtm.22364.21) 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...
Has Errors? True
Interesting. It almost seems like the check for superuser is inverted given what I get when I run it with sudo (asks for superuser permission)
With sudo:
π Uno Platform Check v1.5.3.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/d1aae2371cf6f6f241fc6f664ce16d042f6cdf0b/manifests/uno.ui.manifest.json
Required Version: 1.5.0
Current Version: 1.5.3.0
ok
β³ Scheduling appointments...SetEnvironmentVariable: DOTNET_ROOT=/usr/lib/dotnet/dotnet6-6.0.108
SetEnvironmentVariable: DOTNET_ROOT=/usr/lib/dotnet/dotnet6-6.0.108
ok
π .NET SDK Checkup...
SetEnvironmentVariable: DOTNET_ROOT=/usr/lib/dotnet/dotnet6-6.0.108
SHELL: /bin/bash /tmp/tmps1GA0i.tmp
6.0.108 [/usr/lib/dotnet/dotnet6-6.0.108/sdk]
β 6.0.108 - /usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.108
SetEnvironmentVariable: DOTNET_SDK=/usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.108
SetEnvironmentVariable: DOTNET_SDK_VERSION=6.0.108
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Recommendation: Download .NET SDK (6.0.400-rtm.22364.21)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Attempt to fix? [y/n] (y): y
β³ Attempting to fix: .NET SDK
Downloading dotnet-install script: https://dot.net/v1/dotnet-install.sh
System.UnauthorizedAccessException: Access to the path '/tmp/dotnet-install.sh' is denied.
System.IO.IOException: Permission denied
β¦
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share
, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share,
FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode,
FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.File.WriteAllText(String path, String contents)
at DotNetCheck.Solutions.DotNetSdkScriptInstallSolution.Implement(SharedState sharedState, CancellationToken
cancellationToken) in /_/UnoCheck/Solutions/DotNetSdkScriptInstallSolution.cs:49
at DotNetCheck.Cli.CheckCommand.ExecuteAsync(CommandContext context, CheckSettings settings) in /_/UnoCheck/
CheckCommand.cs:228
π Super User Permissions Required. Try running this tool again with 'sudo'.
β Skipped: .NET SDK - Workload Deduplication
π GTK3+ Checkup...
SHELL: /bin/bash /tmp/tmp2XmoX6.tmp
libgdk-3.so.0: /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
β Skipped: .NET SDK - Workloads (6.0.400-rtm.22364.21)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Checkup had Error status: dotnet
dotnet: .NET SDK (6.0.400-rtm.22364.21) 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...
So I wonder why root would not be able to write to /tmp
No special partition structure.
nvme0n1 259:5 0 1.8T 0 disk
ββnvme0n1p1 259:6 0 512M 0 part /boot/efi
ββnvme0n1p2 259:7 0 1.8T 0 part /
Access denied may be caused by the emulation of the file sharing features of windows, or maybe because the file exists with non-root compatible set of permissions. There's should be an automatic sudo, though, for the first log. We'll look into it.
Are you still able to continue further to run an uno app ?
So, I fixed it. I didn't know about --verbose, thank you for that tip.
It looks like I only got prompted for sudo permissions if the /tmp/dotnet-install.sh
access check fails, so perhaps some additional permissions error handling and ownership/rewrite rules would be good there.
I removed the dotnet install script it was failing on:
$ ls -la /tmp | grep dotnet
-rw-rw-r-- 1 stevenlafl stevenlafl 56297 Aug 22 14:30 dotnet-install.sh
$ rm -rf /tmp/dotnet-install.sh
Then ran uno-check
as root:
$ sudo ~/.dotnet/tools/uno-check
π Uno Platform Check v1.5.3.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
π .NET SDK Checkup...
β 6.0.108 - /usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.108
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Recommendation: Download .NET SDK (6.0.400-rtm.22364.21)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Attempt to fix? [y/n] (y): y
β³ Attempting to fix: .NET SDK
Fix applied. Checking again...
π .NET SDK Checkup...
β 6.0.108 - /usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.108
β 6.0.400 - /usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.400
π .NET SDK - Workload Deduplication Checkup...
π GTK3+ Checkup...
π .NET SDK - Workloads (6.0.400-rtm.22364.21) Checkup...
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Congratulations, everything looks great!
And now /tmp/dotnet-install.sh
looks like:
$ ls -la /tmp | grep dotnet
-rw-r--r-- 1 root root 56297 Aug 22 14:55 dotnet-install.sh
Are you still able to continue further to run an uno app ?
This is my first time with Uno, so I am not sure yet. If I experience issues that aren't already in the issue queue, I'll add another one.
Thanks for taking the time to troubleshoot!
I am unable to update to the latest SDK or finish running uno-check. I tried also saying "No" to the "attempt to fix" dialog, and it also shows the deduplication workflow message.
Checking the dotnet library folder:
Running it as root (sudo) it bizarrely shows that it requires superuser permission and should be run with sudo:
Here's my platform and dotnet information (Installed by Ubuntu's package manager, not using the microsoft repository):