Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    System.InvalidCastException: Unable to cast object of type 'Inedo.ProGet.Feeds.Npm.NpmFeed' to type 'Inedo.ProGet.IRepackageFeed'

    Scheduled Pinned Locked Moved Support
    4 Posts 3 Posters 10 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F Offline
      forcenet_4316
      last edited by

      Having upgraded from Proget 5.3 to 6.0.1, a previously working script we have used many times on the promotions API is now failing when promoting packages on an NPM feed.

      Issue #1: The 'ToFeed' param is now required in the JSON. Previously you could omit this if the feed was configured to have a Promote To Feed setting configured.

      Issue #2: Calling the promotion API always returns the following error.

      Unhandled exception processing http://proget.internal/api/promotions/promote

      System.InvalidCastException: Unable to cast object of type 'Inedo.ProGet.Feeds.Npm.NpmFeed' to type 'Inedo.ProGet.IRepackageFeed'.
      at Inedo.ProGet.WebApplication.SimpleHandlers.Api.PackagePromotion.PromotePackageApiHandler.ProcessRequestAsync(HttpContext context, LoggedResponseStream output, WebApiContext apiContext) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E155545\Src\ProGet.WebApplication\SimpleHandlers\Api\PackagePromotion\PackagePromotionApiHandler.cs:line 98
      at Inedo.ProGet.WebApplication.SimpleHandlers.Api.ProGetApiKeySecuredHandler.ProcessRequestInternalAsync(HttpContext context, LoggedResponseStream output, WrappedApiKey apiKey) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp_E155545\Src\ProGet.WebApplication\SimpleHandlers\Api\ProGetApiKeySecuredHandler.cs:line 45
      at Inedo.Web.Handlers.Api.ApiKeySecuredHandler.ProcessRequestInternalAsync(HttpContext context)
      at Inedo.Web.Handlers.Api.StandardApiHandler.ProcessRequestAsync(HttpContext context)

      1 Reply Last reply Reply Quote 0
      • Dan_WoolfD Offline
        Dan_Woolf inedo-engineer
        last edited by

        Hi @forcenet_4316,

        Thanks for finding this for us. This looks to be a regression due to our recent API key changes. We have fixed this in our upcoming ProGet 6.0.2 release that is due out on Friday. These fixes are tracked in PG-2033 and PG-2034.

        Thanks,
        Dan

        F 1 Reply Last reply Reply Quote 0
        • F Offline
          forcenet_4316 @Dan_Woolf
          last edited by

          @Dan_Woolf Version 6.0.2 (Build 5) still has the same issue as PG-2034, at least on NPM feeds, possibly others.

          1 Reply Last reply Reply Quote 0
          • rhessingerR Offline
            rhessinger inedo-engineer
            last edited by

            Hi @forcenet_4316,

            Thanks for bringing this to our attention. I'm not sure how this slipped through, but I made sure it is fixed in the next release, ProGet 6.0.3. The final fix is tracked via PG-2043.

            Thanks,
            Rich

            Products Engineer, Inedo

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation