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

InternalServerError when pushing to push.chocolatey.org #303

Closed
6 tasks done
lx-s opened this issue Feb 24, 2024 · 11 comments
Closed
6 tasks done

InternalServerError when pushing to push.chocolatey.org #303

lx-s opened this issue Feb 24, 2024 · 11 comments
Labels
0 - Waiting on User Waiting on a response from either a commenter or ticket creator. Bug Tickets that represent defects/bugs.

Comments

@lx-s
Copy link

lx-s commented Feb 24, 2024

Checklist

  • I confirm there are no unresolved issues reported on the Chocolatey Status page.
  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.
  • I confirm I am using official, and not unofficial, or modified, Chocolatey products.

What You Are Seeing?

As maintainer of WinMute, when trying to push my package to chocolatey.org I get the following error since last december:

[NuGet] Pushing winmute.2.5.0.nupkg to 'https://push.chocolatey.org/'...
[NuGet]   PUT https://push.chocolatey.org/api/v2/package/
[NuGet]   InternalServerError https://push.chocolatey.org/api/v2/package/ 451ms
[NuGet]   PUT https://push.chocolatey.org/api/v2/package/
[NuGet]   InternalServerError https://push.chocolatey.org/api/v2/package/ 295ms
[NuGet]   PUT https://push.chocolatey.org/api/v2/package/
[NuGet]   InternalServerError https://push.chocolatey.org/api/v2/package/ 385ms

What is Expected?

A push without errors

How Did You Get This To Happen?

  1. Updated my package to the newest version (2.4.0. -> 2.5.0.)
  2. Tried to push via choco push .\winmute.2.5.0.nupkg --source https://push.chocolatey.org/
  3. Received HTTP 500 InternalServerError

System Details

  • Operating System: Windows 11
  • Windows PowerShell version: 5.1.22621.2506
  • Chocolatey CLI Version: 2.2.2
  • Chocolatey Licensed Extension version:
  • Chocolatey License type:
  • Terminal/Emulator: Windows Terminal

Installed Packages

Chocolatey v2.2.2
chocolatey 2.2.2
chocolatey-community-validation.extension 0.1.0
2 packages installed.

Output Log

Chocolatey v2.2.2
Chocolatey is running on Windows v 10.0.22631.0
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
Command line not shown - sensitive arguments may have been passed.
RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
Sending message 'PreRunMessage' out if there are subscribers...
[Pending] Removing all pending packages that should not be considered installed...
Performing validation checks.
Global Configuration Validation Checks:
 - Package Exit Code / Exit On Reboot = Checked
System State Validation Checks:
 Reboot Requirement Checks:
 - Pending Computer Rename = Checked
 - Pending Component Based Servicing = Checked
 - Pending Windows Auto Update = Checked
 - Pending File Rename Operations = Checked
 - Pending Windows Package Installer = Checked
 - Pending Windows Package Installer SysWow64 = Checked
Cache Folder Lockdown Checks:
 - Elevated State = Failed
The source 'https://push.chocolatey.org/' evaluated to a 'normal' source type

NOTE: Hiding sensitive configuration data! Please double and triple
 check to be sure no sensitive data is shown, especially if copying
 output to a gist for review.
Configuration: CommandName='push'|
CacheLocation='C:\Users\<Redacted>\AppData\Local\Temp\chocolatey'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='https://push.chocolatey.org/'|SourceType='normal'|
ShowOnlineHelp='False'|Debug='True'|Verbose='True'|Trace='False'|
Force='False'|Noop='False'|HelpRequested='False'|
UnsuccessfulParsing='False'|RegularOutput='True'|QuietOutput='False'|
PromptForConfirmation='True'|DisableCompatibilityChecks='False'|
AcceptLicense='False'|AllowUnofficialBuild='False'|
Input='.\winmute.2.5.0.nupkg'|AllVersions='False'|
SkipPackageInstallProvider='False'|SkipHookScripts='False'|
Prerelease='False'|ForceX86='False'|OverrideArguments='False'|
NotSilent='False'|ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
CacheExpirationInMinutes='30'|AllowDowngrade='False'|
ForceDependencies='False'|PinPackage='False'|
Information.PlatformType='Windows'|
Information.PlatformVersion='10.0.22631.0'|
Information.PlatformName='Windows 10'|
Information.ChocolateyVersion='2.2.2.0'|
Information.ChocolateyProductVersion='2.2.2'|
Information.FullName='choco, Version=2.2.2.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|

Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='True'|
Information.UserName='<Redacted>'|Information.UserDomainName='<Redacted>'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='False'|
Information.IsUserRemote='False'|Information.IsProcessElevated='False'|
Information.IsLicensedVersion='False'|
Information.IsLicensedAssemblyLoaded='False'|
Information.LicenseType='Foss'|
Information.CurrentDirectory='D:\Source\WinMute\Dist\Chocolatey'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseEnhancedExitCodes='False'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.SkipPackageUpgradesWhenNotInstalled='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ExitOnRebootDetected='False'|
Features.LogValidationResultsOnWarnings='True'|
Features.UsePackageRepositoryOptimizations='True'|
ListCommand.LocalOnly='False'|ListCommand.IdOnly='False'|
ListCommand.IncludeRegistryPrograms='False'|ListCommand.PageSize='25'|
ListCommand.Exact='False'|ListCommand.ByIdOnly='False'|
ListCommand.ByTagOnly='False'|ListCommand.IdStartsWith='False'|
ListCommand.OrderByPopularity='False'|ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
ListCommand.ExplicitPageSize='False'|
ListCommand.ExplicitSource='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
SourceCommand.VisibleToAdminsOnly='False'|
FeatureCommand.Command='unknown'|ConfigCommand.Command='Unknown'|
ApiKeyCommand.Command='Unknown'|PinCommand.Command='Unknown'|
OutdatedCommand.IgnorePinned='False'|
ExportCommand.IncludeVersionNumbers='False'|Proxy.BypassOnLocal='True'|
TemplateCommand.Command='unknown'|CacheCommand.Command='Unknown'|
CacheCommand.RemoveExpiredItemsOnly='False'|
_ Chocolatey:ChocolateyPushCommand - Normal Run Mode _
Attempting to push winmute.2.5.0.nupkg to https://push.chocolatey.org/
Resolving resource PackageUpdateResource for source https://push.chocolatey.org/
[NuGet] Pushing winmute.2.5.0.nupkg to 'https://push.chocolatey.org/'...
[NuGet]   PUT https://push.chocolatey.org/api/v2/package/
[NuGet]   InternalServerError https://push.chocolatey.org/api/v2/package/ 451ms
[NuGet]   PUT https://push.chocolatey.org/api/v2/package/
[NuGet]   InternalServerError https://push.chocolatey.org/api/v2/package/ 295ms
[NuGet]   PUT https://push.chocolatey.org/api/v2/package/
[NuGet]   InternalServerError https://push.chocolatey.org/api/v2/package/ 385ms
Sending message 'PostRunMessage' out if there are subscribers...
Chocolatey had an error occur:
System.Net.Http.HttpRequestException: Der Antwortstatuscode gibt keinen Erfolg an: 500 (Internal Server Error).
   bei System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   bei NuGet.Protocol.Core.Types.PackageUpdateResource.EnsureSuccessStatusCode(HttpResponseMessage response, Nullable`1 codeNotToThrow, ILogger logger)
   bei NuGet.Protocol.Core.Types.PackageUpdateResource.<>c__DisplayClass24_0.<PushPackageToServer>b__0(HttpResponseMessage response)
   bei NuGet.Protocol.HttpSource.<ProcessResponseAsync>d__21`1.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackageToServer>d__24.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackageCore>d__20.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bei NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackagePath>d__19.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bei NuGet.Protocol.Core.Types.PackageUpdateResource.<Push>d__14.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei chocolatey.infrastructure.app.nuget.NugetPush.PushPackage(ChocolateyConfiguration config, String nupkgFilePath, ILogger nugetLogger, String nupkgFileName, IFileSystem filesystem, ChocolateySourceCacheContext cacheContext)
   bei chocolatey.infrastructure.app.services.NugetService.Push(ChocolateyConfiguration config)
   bei chocolatey.infrastructure.app.services.ChocolateyPackageService.Push(ChocolateyConfiguration config)
   bei chocolatey.infrastructure.app.runners.GenericRunner.Run(ChocolateyConfiguration config, Container container, Boolean isConsole, Action`1 parseArgs)
   bei chocolatey.infrastructure.app.runners.ConsoleApplication.Run(String[] args, ChocolateyConfiguration config, Container container)
   bei chocolatey.console.Program.Main(String[] args)
Exiting with 1

Additional Context

No response

@lx-s lx-s added the Bug Tickets that represent defects/bugs. label Feb 24, 2024
@pauby
Copy link
Member

pauby commented Feb 24, 2024

Can you install the Chocolatey Validation Extension, run a choco pack on the package again and see if it reports any issues with the package?

@pauby pauby added the 0 - Waiting on User Waiting on a response from either a commenter or ticket creator. label Feb 24, 2024
@lx-s
Copy link
Author

lx-s commented Feb 25, 2024

The validation extension is already installed. Here is the output of choco pack --verbose --debug:

Chocolatey is running on Windows v 10.0.22631.0
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
Command line: "C:\ProgramData\chocolatey\choco.exe" pack --verbose --debug
Received arguments: pack --verbose --debug
RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
Sending message 'PreRunMessage' out if there are subscribers...
[Pending] Removing all pending packages that should not be considered installed...
Performing validation checks.
Global Configuration Validation Checks:
 - Package Exit Code / Exit On Reboot = Checked
System State Validation Checks:
 Reboot Requirement Checks:
 - Pending Computer Rename = Checked
 - Pending Component Based Servicing = Checked
 - Pending Windows Auto Update = Checked
 - Pending File Rename Operations = Checked
 - Pending Windows Package Installer = Checked
 - Pending Windows Package Installer SysWow64 = Checked
Cache Folder Lockdown Checks:
 - Elevated State = Failed
The source 'https://community.chocolatey.org/api/v2/' evaluated to a 'normal' source type

NOTE: Hiding sensitive configuration data! Please double and triple
 check to be sure no sensitive data is shown, especially if copying
 output to a gist for review.
Configuration: CommandName='pack'|
CacheLocation='C:\Users\<redacted>\AppData\Local\Temp\chocolatey'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='https://community.chocolatey.org/api/v2/'|SourceType='normal'|
ShowOnlineHelp='False'|Debug='True'|Verbose='True'|Trace='False'|
Force='False'|Noop='False'|HelpRequested='False'|
UnsuccessfulParsing='False'|RegularOutput='True'|QuietOutput='False'|
PromptForConfirmation='True'|DisableCompatibilityChecks='False'|
AcceptLicense='False'|AllowUnofficialBuild='False'|AllVersions='False'|
SkipPackageInstallProvider='False'|SkipHookScripts='False'|
Prerelease='False'|ForceX86='False'|OverrideArguments='False'|
NotSilent='False'|ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
CacheExpirationInMinutes='30'|AllowDowngrade='False'|
ForceDependencies='False'|PinPackage='False'|
Information.PlatformType='Windows'|
Information.PlatformVersion='10.0.22631.0'|
Information.PlatformName='Windows 10'|
Information.ChocolateyVersion='2.2.2.0'|
Information.ChocolateyProductVersion='2.2.2'|
Information.FullName='choco, Version=2.2.2.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|

Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='True'|
Information.UserName='<redacted>'|Information.UserDomainName='<redacted>'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='False'|
Information.IsUserRemote='False'|Information.IsProcessElevated='False'|
Information.IsLicensedVersion='False'|
Information.IsLicensedAssemblyLoaded='False'|
Information.LicenseType='Foss'|
Information.CurrentDirectory='D:\Source\WinMute\Dist\Chocolatey'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseEnhancedExitCodes='False'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.SkipPackageUpgradesWhenNotInstalled='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ExitOnRebootDetected='False'|
Features.LogValidationResultsOnWarnings='True'|
Features.UsePackageRepositoryOptimizations='True'|
ListCommand.LocalOnly='False'|ListCommand.IdOnly='False'|
ListCommand.IncludeRegistryPrograms='False'|ListCommand.PageSize='25'|
ListCommand.Exact='False'|ListCommand.ByIdOnly='False'|
ListCommand.ByTagOnly='False'|ListCommand.IdStartsWith='False'|
ListCommand.OrderByPopularity='False'|ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
ListCommand.ExplicitPageSize='False'|
ListCommand.ExplicitSource='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
SourceCommand.VisibleToAdminsOnly='False'|
FeatureCommand.Command='unknown'|ConfigCommand.Command='Unknown'|
ApiKeyCommand.Command='Unknown'|PinCommand.Command='Unknown'|
OutdatedCommand.IgnorePinned='False'|
ExportCommand.IncludeVersionNumbers='False'|Proxy.BypassOnLocal='True'|
TemplateCommand.Command='unknown'|CacheCommand.Command='Unknown'|
CacheCommand.RemoveExpiredItemsOnly='False'|
_ Chocolatey:ChocolateyPackCommand - Normal Run Mode _
Attempting to build package from 'WinMute.nuspec'.
Successfully created package 'D:\Source\WinMute\Dist\Chocolatey\winmute.2.5.0.nupkg'
Sending message 'PostRunMessage' out if there are subscribers...
Exiting with 0

@vexx32
Copy link
Member

vexx32 commented Feb 26, 2024

Interesting, I'll see if we can look into what happened in these instances. Do you happen to remember approximate date/times of when you tried to push the package, to help narrow our search a bit?

I'm also curious if this issue is somehow environmental (error would indicate it shouldn't be, but this is also the first instance I'm aware of where something like this is failing). Can you try / have you tried pushing the package from another machine?

@lx-s
Copy link
Author

lx-s commented Feb 26, 2024

Interesting, I'll see if we can look into what happened in these instances. Do you happen to remember approximate date/times of when you tried to push the package, to help narrow our search a bit?

I tried a push right now (2024-02-26 14:55:21 UTC) if that helps.

I'm also curious if this issue is somehow environmental (error would indicate it shouldn't be, but this is also the first instance I'm aware of where something like this is failing). Can you try / have you tried pushing the package from another machine?

I'll get back to you on that one.

@lx-s
Copy link
Author

lx-s commented Feb 26, 2024

I'm also curious if this issue is somehow environmental (error would indicate it shouldn't be, but this is also the first instance I'm aware of where something like this is failing). Can you try / have you tried pushing the package from another machine?

I tried it again from my notebook, that I just set up this weekend.
I also tried pushing with pihole disabled and even tried pushing from a mobile hotspot via my phone.

Unfortunately none of it worked and I still got InternalServerErrors

@vexx32
Copy link
Member

vexx32 commented Feb 26, 2024

Hmm, that is pretty odd. Can you attach the nupkg you're trying to push to this issue?

@lx-s
Copy link
Author

lx-s commented Feb 26, 2024

Gladly
winmute.2.5.0.nupkg.zip

@vexx32
Copy link
Member

vexx32 commented Feb 26, 2024

Hmm. Something about that zip file (/nupkg?) is... a bit weird. When I try to extract the files with 7zip it tells me it's being told to extract the bin/ folder twice, which... feels a bit like there's something janky going on with the metadata of the file. If this is the file you're trying to push, I could see the server tripping over that somewhat, potentially? Is that the original file you're pushing?

Can you also send the pre-pack version of the nuspec you're using? Just wanna see if there's any room for weirdness with how it's being told to pack the files or something,

@lx-s
Copy link
Author

lx-s commented Feb 26, 2024

I changed the nuspec file like this: lx-s/WinMute@82f6a1e

Now the zip error seems to be gone: winmute.2.5.0.zip
Alas I still cannot push the file... :(

(By the way: I really appreciate your help!)

@lx-s
Copy link
Author

lx-s commented Feb 26, 2024

Alright, I got it to push.
In my nuspec file I included

<file src="..\bin\update-check-disabled" target="bin\" />

Which, for some reason did not include the file in the zip.
I renamed the file to update-check.disabled (so it follows a <filename>.<extension> scheme) and changed the code of my program accordingly.
I repacked the package and now pushing works again.

I close this issue, but feel free to re-open if there's a need to investigate the behaviour concering the "non-extension" file :)

thanks again for your help!

@lx-s lx-s closed this as completed Feb 26, 2024
@vexx32
Copy link
Member

vexx32 commented Feb 26, 2024

Oh that is really odd. I'm glad you got it figured out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Waiting on User Waiting on a response from either a commenter or ticket creator. Bug Tickets that represent defects/bugs.
Projects
None yet
Development

No branches or pull requests

3 participants