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

[NuGet.org Bug]: Embedded license endpoint returns 500 when package is deleted #8778

Closed
joelverhagen opened this issue Sep 1, 2021 · 0 comments

Comments

@joelverhagen
Copy link
Member

Impact

It bothers me. A fix would be nice

Describe the bug

If a package had an embedded license file but is deleted, the /packages/{id}/{version}/license endpoint returns HTTP 500.

Example:
/packages/SocialMediaSharing/5.1.1/license

Error:

System.ArgumentNullException: Value cannot be null.
Parameter name: stream
   at NuGetGallery.Helpers.StreamHelper.<GetTruncatedStreamWithMaxSizeAsync>d__1.MoveNext() in C:\a\1\s\src\Gallery\submodules\Gallery\src\NuGetGallery\Helpers\StreamHelper.cs:line 25
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGetGallery.PackagesController.<License>d__67.MoveNext() in C:\a\1\s\src\Gallery\submodules\Gallery\src\NuGetGallery\Controllers\PackagesController.cs:line 1223
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)

Repro Steps

https://www.nuget.org/packages/SocialMediaSharing/5.1.1/license

Expected Behavior

This should show that the package is delete, not return HTTP 500.

Screenshots

No response

Additional Context and logs

No response

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

No branches or pull requests

1 participant