C
C#β€’2y ago
SarouiX

❔ Its there a way to fix this?

Hi there, currently I am trying to develop some functions to publish them to azure later, but right now I am having the following error when I run dotnet run/build or restore. error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json. I am developing this functions on Ubuntu 20.04 using the last stable version of VS Code and dotnet-sdk-7.0 I searched for a solution all over internet but without a result for my specific case. Thank you before hand!🀠
32 Replies
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
SarouiX
SarouiXOPβ€’2y ago
Yes, it is , also I tried with .net6.0 and the problem persists
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
SarouiX
SarouiXOPβ€’2y ago
With curl the index just run perfect, also works with different browsers so It doesnαΊ— looks like a DNS or Proxy problem Here it is how the error looks inside the restore verbosity
Failed to restore /home/saroui/Documents/NewFunction/NewFunction.csproj (in 553 ms). (TaskId:39)
(TaskId:39)
NuGet Config files used: (TaskId:39)
/home/saroui/.nuget/NuGet/NuGet.Config (TaskId:39)
(TaskId:39)
Feeds used: (TaskId:39)
https://api.nuget.org/v3/index.json (TaskId:39)

Done executing task "RestoreTask" -- FAILED. (TaskId:39)
17:28:33.086 1>Done building target "Restore" in project "NewFunction.csproj" -- FAILED.: (TargetId:42)
17:28:33.097 1>Done Building Project "/home/saroui/Documents/NewFunction/NewFunction.csproj" (Restore target(s)) -- FAILED.
Deferred Messages
17:28:33.101 0>
Failed to restore /home/saroui/Documents/NewFunction/NewFunction.csproj (in 553 ms). (TaskId:39)
(TaskId:39)
NuGet Config files used: (TaskId:39)
/home/saroui/.nuget/NuGet/NuGet.Config (TaskId:39)
(TaskId:39)
Feeds used: (TaskId:39)
https://api.nuget.org/v3/index.json (TaskId:39)

Done executing task "RestoreTask" -- FAILED. (TaskId:39)
17:28:33.086 1>Done building target "Restore" in project "NewFunction.csproj" -- FAILED.: (TargetId:42)
17:28:33.097 1>Done Building Project "/home/saroui/Documents/NewFunction/NewFunction.csproj" (Restore target(s)) -- FAILED.
Deferred Messages
17:28:33.101 0>
I don't know if tthis is something related to this prompt
X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/7.0.202/trustedroots/codesignctl.pem'. (TaskId:39)
X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/7.0.202/trustedroots/timestampctl.pem'. (TaskId:39)
Running restore with 4 concurrent jobs. (TaskId:39)
X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/7.0.202/trustedroots/codesignctl.pem'. (TaskId:39)
X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/7.0.202/trustedroots/timestampctl.pem'. (TaskId:39)
Running restore with 4 concurrent jobs. (TaskId:39)
x0rld πŸ‘» πŸŽƒ
https://github.com/NuGet/Home/issues/12027 looks like there is some issues with signature validation
GitHub
[Bug]: Package signature validation fails on Linux due to missing '...
NuGet Product Used dotnet.exe Product Version sdk:6.0.400 Worked before? No response Impact It's more difficult to complete my work Repro Steps & Context Dockerfile FROM mcr.microsoft.com/d...
SarouiX
SarouiXOPβ€’2y ago
I am gonna look this and see if it is my case It looks like the bug was fixed at the last sdk update, that is the one that I am using, so no wonder what else could be
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
SarouiX
SarouiXOPβ€’2y ago
Hi there again, this is the info I got using dotnet --info
.NET SDK:
Version: 7.0.202
Commit: 6c74320bc3

Runtime Environment:
OS Name: ubuntu
OS Version: 20.04
OS Platform: Linux
RID: ubuntu.20.04-x64
Base Path: /usr/share/dotnet/sdk/7.0.202/

Host:
Version: 7.0.4
Architecture: x64
Commit: 0a396acafe

.NET SDKs installed:
6.0.407 [/usr/share/dotnet/sdk]
7.0.202 [/usr/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.15 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.15 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.4 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download
.NET SDK:
Version: 7.0.202
Commit: 6c74320bc3

Runtime Environment:
OS Name: ubuntu
OS Version: 20.04
OS Platform: Linux
RID: ubuntu.20.04-x64
Base Path: /usr/share/dotnet/sdk/7.0.202/

Host:
Version: 7.0.4
Architecture: x64
Commit: 0a396acafe

.NET SDKs installed:
6.0.407 [/usr/share/dotnet/sdk]
7.0.202 [/usr/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.15 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.15 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.4 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download
it is normal to don't have a global .json file or enviroment variables? Oh thanks, Actually is from Ubuntu 20.04 running as the OS for my personal machine, but I think maybe I can re-open the issue in the nuget repo
SarouiX
SarouiXOPβ€’2y ago
Ok so here it is the Issue created on the Nuget Repo https://github.com/NuGet/Home/issues/12535
GitHub
[bug] error NU1301 (Unable to load the service index for source htt...
NuGet Product Used dotnet.exe Product Version dotnet-sdk-7.0.202 Worked before? No response Impact None Repro Steps & Context Step one keep Ubuntu 20.04 with all its dependencies updated Try to...
SarouiX
SarouiXOPβ€’2y ago
Hi there again, so with the help of some of the people from NuGet, I get the possible Issue with NuGet, it looks like Kernel or Linux related
info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/7.0.202/trustedroots/codesignctl.pem'.
info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/7.0.202/trustedroots/timestampctl.pem'.
info : Adding PackageReference for package 'NuGet.Protocol' into project '/home/saroui/Documents/sample-app/TodoApi/TodoApi.csproj'.
error: Unable to load the service index for source https://api.nuget.org/v3/index.json.
error: The format of value '(Linux 6.2.10-1-liquorix-amd64 #1 ZEN SMP PREEMPT_DYNAMIC liquorix 6.2-13ubuntu1~focal (2023-04)' is invalid.
info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/7.0.202/trustedroots/codesignctl.pem'.
info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/share/dotnet/sdk/7.0.202/trustedroots/timestampctl.pem'.
info : Adding PackageReference for package 'NuGet.Protocol' into project '/home/saroui/Documents/sample-app/TodoApi/TodoApi.csproj'.
error: Unable to load the service index for source https://api.nuget.org/v3/index.json.
error: The format of value '(Linux 6.2.10-1-liquorix-amd64 #1 ZEN SMP PREEMPT_DYNAMIC liquorix 6.2-13ubuntu1~focal (2023-04)' is invalid.
So, there is something I can do to fix this error locally on my machine?
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
SarouiX
SarouiXOPβ€’2y ago
Okay I am going to try that Well, It looks like I have to update to 22.04 or something, because the ca certs are already update Hey there again, I was able to fix without upgrading, you only need to install a .NET SDK from 7.0.3xx or later, other option to fix this is issue is to wait until NuGet 6.6 its launched along .NET 8.0
SarouiX
SarouiXOPβ€’2y ago
GitHub
installer/README.md at main Β· dotnet/installer
.NET SDK Installer. Contribute to dotnet/installer development by creating an account on GitHub.
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
SarouiX
SarouiXOPβ€’2y ago
Yes its is because 7.0.3xx its a nightly build
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
SarouiX
SarouiXOPβ€’2y ago
Sorry, I am going to rephrase it because its the product of a lapsus lol
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
SarouiX
SarouiXOPβ€’2y ago
Dont worry, me too, and I dont know what I was thinking It does make sense now? Lol
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
x0rld πŸ‘» πŸŽƒ
so the solution is waiting almost 1 year ? XD
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
SarouiX
SarouiXOPβ€’2y ago
Yes also I think it was something with the way ubuntu make the calls to the sdk-net installer
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiXβ€’2y ago
tebeco#0205
is net7 actually supported/running on 20.x ?
Quoted by
<@!689473681302224947> from #Its there a way to fix this? (click here)
React with ❌ to remove this embed.
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
SarouiX
SarouiXOPβ€’2y ago
that makes totally sense also, one of the NuGet staffers told me this If you're using a version of the .NET SDK that is available as part of Ubuntu's package repository, that's using what .NET calls "source build", and for reasons I don't understand they limit to the 1xx versions of the SDK, which means it won't contain NuGet's fix until version 8.0.1xx. But if you can use the Microsoft package feed
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
SarouiX
SarouiXOPβ€’2y ago
I am going to take that into account for future references and installations
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
SarouiX
SarouiXOPβ€’2y ago
Yes I Installed .NET trough the Microsoft Feed or at least thas what I was thinking
Accord
Accordβ€’2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server