Open JanHergenhan opened 1 week ago
For anybody else reading it, the translation of the error is:
--- End of List ---
Resolving resource ListResource for source https://chocolatey.org/api/v2/
Unable to load the service index for source https://chocolatey.org/api/v2/.
Error sending request.
The underlying connection was closed: Unknown error while receiving..
The specified value is invalid in the SslProtocolType enumeration.
Parameter name: sslProtocolType
For more information on this issue and guidance in resolving the problem, see https://ch0.co/t/svcidx
Resolving resource PackageMetadataResource for source https://chocolatey.org/api/v2/
Unable to connect to source 'https://chocolatey.org/api/v2/':
System.NullReferenceException: The object reference was not set to an object instance.
at chocolatey.infrastructure.app.nuget.NugetList.<>c__DisplayClass20_1.<FindPackage>b__2()
at chocolatey.infrastructure.tolerance.FaultTolerance.TryCatchWithLoggingException[T](Func`1 function, String errorMessage, Boolean throwError, Boolean logWarningInsteadOfError, Boolean logDebugInsteadOfError, Boolean isSilent)
@JanHergenhan What is the output from [Enum]::GetNames([Net.SecurityProtocolType])
?
@pauby the response is
SystemDefault
Ssl3
Tls
Tls11
Tls12
Tls13
Then I'm unsure what the problem is with that value.
~I feel our logging should really say "The specified value
I don't think is related to your issue, as this is a warning, not a terminating error: SecurityProtocol was set to Ssl3, Tls, resetting to SystemDefault.
.
Have you looked at https://ch0.co/t/svcidx as recommended in the output?
Sorry, @pauby , I didn't notice the update in your answer. I had looked at that page and also tried the recommended IISCrpypto tool. As strage as it may seem, I got it working once after setting the best practices config. However, since then I'm back to the described issue.
At this stage, I think what we have left is trying the normal troubleshooting methods:
I'm unsure if the SSL issue is related to you not being able to connect, but we have not had any issue raised about this before. I am as certain as I can be that this is an environmental issue and not a Chocolatey CLI one.
Checklist
What You Are Seeing?
choco upgrade resets the security protocol although the command
[System.Net.ServicePointManager]::SecurityProtocol
shows that it's alreadySystemDefault
. Then the connection to get the service index fails:Der angegebene Wert ist in der Enumeration SslProtocolType ungültig.
(specified value in Enum SslProtocolType is invalid, sorry for the German console, cannot change it...).Executing the command with the
--debug
option revealsUnable to connect to source 'https://chocolatey.org/api/v2/': System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. bei chocolatey.infrastructure.app.nuget.NugetList.<>c__DisplayClass20_1.<FindPackage>b__2() bei chocolatey.infrastructure.tolerance.FaultTolerance.TryCatchWithLoggingException[T](Func
1 function, String errorMessage, Boolean throwError, Boolean logWarningInsteadOfError, Boolean logDebugInsteadOfError, Boolean isSilent)`What is Expected?
I'd expect that the connection is established. Had no issues in several years using chocolatey...
How Did You Get This To Happen?
System Details
PSVersion 5.1.19041.4412 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.4412 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Installed Packages
Output Log
Additional Context
No response