tag:help.appveyor.com,2012-11-13:/discussions/problems/1767-nuget-deploy-failingAppVeyor: Discussion 2019-09-20T19:17:24Ztag:help.appveyor.com,2012-11-13:Comment/362819102015-03-14T15:43:17Z2019-09-20T19:17:23ZNuGet Deploy Failing<div><p>I am having a big problem trying to deploy nuget packages. I have a project that has a bunch of nuget packages and every single time I try to deploy them to either myget or nuget the process randomly fails. This is critically important for us. Can you please take a look into this and let us know what is going on?</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/362819102015-03-14T15:51:04Z2015-03-14T15:51:04ZNuGet Deploy Failing<div><p>What errors are you getting?</p>
<p>-Feodor</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/362819102015-03-14T15:59:01Z2019-09-20T19:17:24ZNuGet Deploy Failing<div><p>Pushing Exceptionless.Log4net 2.0.1253 to the NuGet gallery (<a href="https://www.nuget.org">https://www.nuget.org</a>)...<br>
ERROR: Failed to process request. 'An error occurred while updating the entries. See the inner exception for details.'.<br>
ERROR: The remote server returned an error: (500) Internal Server Error..<br>
nuget process exited with code 1</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/362819102015-03-14T16:05:30Z2019-09-20T19:17:24ZNuGet Deploy Failing<div><p>Getting a bunch of different errors. It hardly ever succeeds.</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/362819102015-03-14T16:07:58Z2019-09-20T19:17:24ZNuGet Deploy Failing<div><p>It seems to fail every single time going to nuget.org, but succeeds sometimes going to myget. If I redeploy going to myget though it seems to be able to resume, but doing that to nuget blows up saying that the package already exists.</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/362819102015-03-14T16:15:47Z2015-03-14T16:15:47ZNuGet Deploy Failing<div><p>Looks like the problem on nuget.org side?</p>
<p>-Feodor</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/362819102015-03-14T16:22:29Z2019-09-20T19:17:24ZNuGet Deploy Failing<div><p>I don't think so. It's been an issue for a while for us, but we just haven't reported it until now. I think one thing is that you need to make sure your deploy script keeps going if nuget tells you that one of the packages is already there.</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/362819102015-03-15T04:08:56Z2015-03-15T04:08:56ZNuGet Deploy Failing<div><p>NuGet deployment provider is simply a wrapper calling stock
<code>nuget.exe</code> and redirecting output to real-time
deployment/build console.</p>
<p>Those lines prefixed with <code>ERROR:</code> is just nuget.exe
output to StdErr. Looking at that specific error above I can
recognize Entity Framework exception. As <code>nuget.exe</code> has
nothing to do with EF and there is 500 server error the only
explanation for that is the error occurred at nuget.org while
adding package.</p>
<p>What other errors like that do you get? I think we should report
them to NuGet team.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/362819102015-03-15T14:53:05Z2019-09-20T19:17:24ZNuGet Deploy Failing<div><p>But I can send the same set of packages to nuget using myget's deploy functionality just fine. But I end up getting an error every time when I try to use your service. Also, again it is very important to be able to try and resume from where the deployment left off since nuget will fail if the package version has already been published. So if I am able to upload 2 packages and then the 3rd fails, I should be able to run the deployment again and have it finish the deployment. It seems like a pretty huge issue not being able to reliably deploy to nuget.</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/362819102015-03-15T14:55:39Z2019-09-20T19:17:24ZNuGet Deploy Failing<div><p>I believe you should be looking for this error and treating it as a success and moving on to the next package.</p>
<p>Pushing Exceptionless 2.0.1257 to the NuGet gallery (<a href="https://www.nuget.org">https://www.nuget.org</a>)...<br>
ERROR: Failed to process request. 'A package with id 'Exceptionless' and version '2.0.1257' already exists and cannot be modified.'.<br>
ERROR: The remote server returned an error: (409) Conflict..<br>
nuget process exited with code 1</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/362819102015-03-16T06:39:01Z2015-03-16T06:39:01ZNuGet Deploy Failing<div><p>After giving another thought to the problem I agree that we
should do NuGet deployment process more reliable. Obviously, we
can't be sure in 100% availability of nuget.org.</p>
<p>Current implementation based on <code>nuget.exe</code> doesn't
allow checking HTTP status codes and it will be changed with direct
communication to nuget service.</p>
<p>Right now I'm thinking about the following workflow:</p>
<pre>
<code>- Push package to a feed:
- if response is 200 - everything was OK, finish
- if response is 409 (conflict, package exists) - ignore and finish
- if response is 500 error:
Push package again:
- if response is 200 - OK, finish
- if response is 409 - we assume package was pushed on previous step and 500 error was "transient" - ignore and finish
- if response is 500 - it's second time we get 500 error - terminate with error.</code>
</pre>
<p>All other responses like 404 (not found), 401 (unauthorized)
terminates deployment immediately.</p>
<p>Let me know what you think.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/362819102015-03-16T14:31:25Z2019-09-20T19:17:24ZNuGet Deploy Failing<div><p>That sounds great! I'm looking forward to this so that we can get rid of myget and just use your service to deploy.</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/362819102015-03-16T15:28:31Z2015-03-16T15:28:31ZNuGet Deploy Failing<div><p>Actually, new "native" (without using nuget.exe) provider has
been implemented. Take a look at the attached deployment log
sample.</p>
<p>Will deploy it later this week.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/362819102015-03-16T17:34:37Z2019-09-20T19:17:24ZNuGet Deploy Failing<div><p>Awesome! Looking forward to giving it a try. Will you post it here when it's deployed?</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/362819102015-03-16T17:37:02Z2015-03-16T17:37:02ZNuGet Deploy Failing<div><p>Sure!</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/362819102015-03-23T10:37:31Z2015-03-23T10:37:31ZNuGet Deploy Failing<div><p>Hi Eric,</p>
<p>In case you missed AppVeyor update notification (which you can
subscribe here: <a href="https://ci.appveyor.com/profile">https://ci.appveyor.com/profile</a>)
- a new NuGet deployment provider was deployed.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/362819102015-03-27T03:22:19Z2019-09-20T19:17:24ZNuGet Deploy Failing<div><p>Just tried a deployment. I just can't seem to get a complete deployment to be successful. I have a lot of nuget packages, but it should still work. Just got this after it deployed 25 packages.</p>
<p>Downloading artifact Build/Deploy/packages/Exceptionless.Web.Signed.2.0.1288.symbols.nupkg to temporary location...Cannot download artifact to temp location: NotFound</p>
<p>Also, the whole deployment process seems to take a long time and it seems to mostly be the process of downloading the artifacts to temp location.</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/362819102015-03-27T04:14:11Z2015-03-27T04:14:11ZNuGet Deploy Failing<div><p>I think it gives NotFound while downloading artifacts to temp
location because the whole process takes longer than 10 minutes,
but download links expire in 10 minutes. We'll fix that.</p>
<p>Btw, while testing provider locally I noticed that package
publishing to nuget.org takes quite a long time even for small
packages (few K), so it's not just AppVeyor commitment to the
deployment slowness.</p>
<p>Maybe as a workaround for now you can setup several environments
for publishing artifacts in groups. You can have multiple regexps
in "Artifact" field separated by ";"</p>
<p>-Feodor</p></div>Feodor Fitsner