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!

Null reference exception on nuget package from connector



  • I had configured a connector to Telerik in a proget 5.x and it worked well.

    I've upgraded to 6.0.5 (Build 9) and I'm hitting an issue.
    Connector listing works well on webui, but trying to visit a package page an blocking error occurs.

    Category:
    Web

    Url:
    http://proget.mydomain.internal/feeds/test/Telerik.Package.Name/versions

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    

    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       Inedo.ProGet.WebApplication.Pages.Packages.Versions.<CreateChildControlsAsync>d__47.MoveNext() +827
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
       Inedo.ProGet.WebApplication.Pages.<InitializeAsync>d__12.MoveNext() +621
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
       Inedo.Web.PageFree.<ExecutePageLifeCycleAsync>d__57.MoveNext() +327
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
       Inedo.Web.PageFree.<ProcessRequestAsync>d__56.MoveNext() +319
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
       System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
       System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar) +59
       Inedo.Web.Handlers.AsyncHandlerWrapper.EndProcessRequest(IAsyncResult result) +36
       System.Web.CallHandlerExecutionStep.InvokeEndHandler(IAsyncResult ar) +241
       System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +172
    

    On diagnostic center there is also another error as follows:

    Category:
    Connector

    Message:

    Connector telerik.com error: Object reference not set to an instance of an object.
    

    Details:

    System.NullReferenceException: Object reference not set to an instance of an object.
    at Inedo.ProGet.Feeds.NuGet.NuGetConnector.<SearchAsync>d__26.MoveNext()
    

  • inedo-engineer

    Hi @claudio_9251

    I believe that Telerik has a buggy/quirky API implementation, and sends invalid/broken metadata. It happens to work in Visual Studio, and I guess an older ProGet.

    Anyways, if you can send us some credentials / instructions to connect to your Telerik feed, we will connect and attach a debugger, and trace the bad metadata.

    You can email those to support at inedo dot com -- just reference [QA-743] in the subject. And please let us know when you send them email, because we don't monitor that address.

    Cheers,
    Steve



  • Hello @stevedennis,
    thanks for your quick response. You can check your email; I have sent you some additional informations.

    I can confirm that Telerik's nuget API are working as expected on Visual Studio (2019/2022) and Nuget Package Explorer.

    Cheers,
    Claudio


  • inedo-engineer

    Hi @claudio_9251,

    Thanks for sending this over. I can confirm we have received your email. Please give us a little bit of time to review and we will get back with your shortly.

    Thanks,
    Dan


  • inedo-engineer

    Hi @claudio_9251,

    Thanks I was able to reproduce this and logged the fix as ticket PG-2077. This fix will be released in ProGet 6.0.6.

    Thanks,
    Dan



  • Hi @Dan_Woolf ,
    thanks for your quick feedback and fix, I'm going to reset Telerik access.

    Cheers,
    Claudio


  • inedo-engineer

    Hi @claudio_9251,

    Always happy to help! Please let us know if you still run into issues after the updgrade.

    Thanks,
    Dan



  • Hi @Dan_Woolf,
    we have upgraded the system.

    Now we can see connector infos via web UI, and we can perform some operations like manual download and proget pull.

    But we are hitting a new issue when we are trying to install a new version of a package that is not already pulled into ProGet: it seems it not exists.

    In example package manager console returns this:

    Install-Package Package.Name -Version 1.2.3.4
    
    Package 'Package.Name 1.2.3.4' is not found in the following primary source(s): 'http://proget.mydomain.internal/nuget/test/'. Please verify all your online package sources are available (OR) package 
    id, version are specified correctly.
    

    Via both VS2022 and Nuget Package Explorer we are also unable to list available versions from Connectors: we only see pulled versions.

    I'm not sure is related, but on connector page the counter still count 0
    46ac8e32-8284-44d7-a41d-d6e7e00aba8d-image.png


  • inedo-engineer

    Hi @claudio_9251 ,

    This is most certainly another bug/quirk with Telerik's proprietary feed, and them not following the clear NuGet API specifications 🙄

    If it's easy we'll consider trying to work-around, but otherwise they really need to be following the API specifications. Or they should migrate away from their own server, like how Infragistics did ;)

    Anyway, if you can share the specific HTTP request that is return an unexpected result (it's probably some GET query that returns 404?), then we can try that against the same credentials you sent earlier, and attach a debugger to see what's going on, and if it's an easy fix.

    You can find this request by attaching Fiddler, then doing a side-by-side comparison in Visual Studio.

    Cheers,
    Steve



  • With Fiddler comparison I have found that our feed was configured to expose nuget with v2 apis only. (ODATA v2)

    Enabling JSON-LD (v3) api and appending v3/index.json to api url solve my issue and all is working as expected.

    I think that something is missing on Proget on v2 only implementation. Not a big deal for me, but maybe is something to consider for the product.


  • inedo-engineer

    Hi @claudio_9251,

    I'm not too surprised by this. NuGet has deprecated many of it's ODATA( v2) endpoints which has caused some issue within ProGet, we have documented this in our NuGet v2 troubleshooting guide. It is very possible that Telerik (Progress) has not made these changes on their end which may be causing this. This is especially true when it comes to connectors because ProGet will pass through a lot of the V2 queries the client makes to the remote endpoint. Either way, the NuGet v3 API is the proper API to use going forward and we highly suggest using that.

    Thanks,
    Dan


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation