NuGet Deploy Failing

Eric J. Smith's Avatar

Eric J. Smith

14 Mar, 2015 03:43 PM

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?

  1. Support Staff 1 Posted by Feodor Fitsner on 14 Mar, 2015 03:51 PM

    Feodor Fitsner's Avatar

    What errors are you getting?

    -Feodor

  2. 2 Posted by Eric J. Smith on 14 Mar, 2015 03:59 PM

    Eric J. Smith's Avatar

    Pushing Exceptionless.Log4net 2.0.1253 to the NuGet gallery (https://www.nuget.org)...
    ERROR: Failed to process request. 'An error occurred while updating the entries. See the inner exception for details.'.
    ERROR: The remote server returned an error: (500) Internal Server Error..
    nuget process exited with code 1

  3. 3 Posted by Eric J. Smith on 14 Mar, 2015 04:05 PM

    Eric J. Smith's Avatar

    Getting a bunch of different errors. It hardly ever succeeds.

  4. 4 Posted by Eric J. Smith on 14 Mar, 2015 04:07 PM

    Eric J. Smith's Avatar

    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.

  5. Support Staff 5 Posted by Feodor Fitsner on 14 Mar, 2015 04:15 PM

    Feodor Fitsner's Avatar

    Looks like the problem on nuget.org side?

    -Feodor

  6. 6 Posted by Eric J. Smith on 14 Mar, 2015 04:22 PM

    Eric J. Smith's Avatar

    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.

  7. Support Staff 7 Posted by Feodor Fitsner on 15 Mar, 2015 04:08 AM

    Feodor Fitsner's Avatar

    NuGet deployment provider is simply a wrapper calling stock nuget.exe and redirecting output to real-time deployment/build console.

    Those lines prefixed with ERROR: is just nuget.exe output to StdErr. Looking at that specific error above I can recognize Entity Framework exception. As nuget.exe 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.

    What other errors like that do you get? I think we should report them to NuGet team.

  8. 8 Posted by Eric J. Smith on 15 Mar, 2015 02:53 PM

    Eric J. Smith's Avatar

    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.

  9. 9 Posted by Eric J. Smith on 15 Mar, 2015 02:55 PM

    Eric J. Smith's Avatar

    I believe you should be looking for this error and treating it as a success and moving on to the next package.

    Pushing Exceptionless 2.0.1257 to the NuGet gallery (https://www.nuget.org)...
    ERROR: Failed to process request. 'A package with id 'Exceptionless' and version '2.0.1257' already exists and cannot be modified.'.
    ERROR: The remote server returned an error: (409) Conflict..
    nuget process exited with code 1

  10. Support Staff 10 Posted by Feodor Fitsner on 16 Mar, 2015 06:39 AM

    Feodor Fitsner's Avatar

    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.

    Current implementation based on nuget.exe doesn't allow checking HTTP status codes and it will be changed with direct communication to nuget service.

    Right now I'm thinking about the following workflow:

    - 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.
    

    All other responses like 404 (not found), 401 (unauthorized) terminates deployment immediately.

    Let me know what you think.

  11. 11 Posted by Eric J. Smith on 16 Mar, 2015 02:31 PM

    Eric J. Smith's Avatar

    That sounds great! I'm looking forward to this so that we can get rid of myget and just use your service to deploy.

  12. Support Staff 12 Posted by Feodor Fitsner on 16 Mar, 2015 03:28 PM

    Feodor Fitsner's Avatar

    Actually, new "native" (without using nuget.exe) provider has been implemented. Take a look at the attached deployment log sample.

    Will deploy it later this week.

  13. 13 Posted by Eric J. Smith on 16 Mar, 2015 05:34 PM

    Eric J. Smith's Avatar

    Awesome! Looking forward to giving it a try. Will you post it here when it's deployed?

  14. Support Staff 14 Posted by Feodor Fitsner on 16 Mar, 2015 05:37 PM

    Feodor Fitsner's Avatar

    Sure!

  15. Support Staff 15 Posted by Feodor Fitsner on 23 Mar, 2015 10:37 AM

    Feodor Fitsner's Avatar

    Hi Eric,

    In case you missed AppVeyor update notification (which you can subscribe here: https://ci.appveyor.com/profile) - a new NuGet deployment provider was deployed.

  16. 16 Posted by Eric J. Smith on 27 Mar, 2015 03:22 AM

    Eric J. Smith's Avatar

    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.

    Downloading artifact Build/Deploy/packages/Exceptionless.Web.Signed.2.0.1288.symbols.nupkg to temporary location...Cannot download artifact to temp location: NotFound

    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.

  17. Support Staff 17 Posted by Feodor Fitsner on 27 Mar, 2015 04:14 AM

    Feodor Fitsner's Avatar

    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.

    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.

    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 ";"

    -Feodor

  18. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:55 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac