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

'Sequence contains more than one element' following simultaneous NuGet push #1959

Closed
zimerick opened this issue Mar 11, 2014 · 3 comments
Closed

Comments

@zimerick
Copy link

If a package with same ID is simultaneously pushed to the NuGet gallery server, and that package ID doesn't pre-exist, you can get duplicate PackageRegistration rows (and associated rows) for this package, even if a prerelease or different version is used on the package. Later attempts to push new versions of this package will result in the following error & the only known solution is to manually cleanup the db entries.

System.InvalidOperationException: Failed to process request. 'Sequence contains more than one element'. 
[16:30:34][MSBuild output] EXEC : The remote server returned an error : (500) Internal Server Error.. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error. [C:\BuildAgent\work\ccb7ae74f291883\.build\Build.proj.teamcity]
[16:30:34][MSBuild output]      at System.Net.HttpWebRequest.GetResponse()
[16:30:34][MSBuild output]      at NuGet.RequestHelper.GetResponse(Func`1 createRequest, Action`1 prepareRequest, IProxyCache proxyCache, ICredentialCache credentialCache, ICredentialProvider credentialProvider)
[16:30:34][MSBuild output]      at NuGet.HttpClient.GetResponse()
[16:30:34][MSBuild output]      at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable`1 expectedStatusCode)
[16:30:34][MSBuild output]      --- End of inner exception stack trace ---
[16:30:34][MSBuild output]      at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable`1 expectedStatusCode)
[16:30:34][MSBuild output]      at NuGet.PackageServer.PushPackageToServer(String apiKey, Func`1 packageStreamFactory, Int32 timeout)
[16:30:34][MSBuild output]      at NuGet.PackageServer.PushPackage(String apiKey, IPackage package, Int32 timeout)
[16:30:34][MSBuild output]      at NuGet.Commands.PushCommand.PushPackageCore(String source, String apiKey, PackageServer packageServer, String packageToPush, TimeSpan timeout)
[16:30:34][MSBuild output]      at NuGet.Commands.PushCommand.PushPackage(String packagePath, String source, String apiKey, TimeSpan timeout)
[16:30:34][MSBuild output]      at NuGet.Commands.PushCommand.ExecuteCommand()
[16:30:34][MSBuild output]      at NuGet.Commands.Command.Execute()
[16:30:34][MSBuild output]      at NuGet.Program.Main(String[] args)
@misternopps
Copy link

I've got this error too - it's a pain.

@johnataylor johnataylor added this to the 3.0.0 RTM milestone Apr 30, 2015
@johnataylor
Copy link
Member

If this repo's on NuGet.org this is quite poor behavior and should be fixed. Even for v3 feed in RTM milestone we still use the same publish path through the gallery.

@maartenba
Copy link
Contributor

Working on this in #2509

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

4 participants