Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-25879

Failure parsing Remote Nuget v3 registrations API response when multiple authors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: 7.4.1
    • Fix Version/s: 7.27.3
    • Component/s: NuGet
    • Labels:
    • Severity:
      Critical

      Description

      Problem Description:
      Using a remote Nuget repository pointing to a Proget v3 feed, installing packages with multiple source authors causes Artifactory to fail and return 500 internal server error.

       

      Expected Behaviour:
      When using a remote Nuget v3 repository, intalling packages with multiple source authors should work.  The v3 registration API spec supports an array of strings in the authors field of a Catalog entry.
      https://docs.microsoft.com/en-us/nuget/api/registration-base-url-resource

       

      Suspected Root Cause
      The artifactory implimentation of Nuget v3 client fails to parse a registration API response when the response's authors entry contains an array of strings.

       

      Error in artifactory.log:
      2021-05-06T17:57:30.426Z [jfrt ] [ERROR] [482eb7e4b18a6b1 ] [etV3VirtualAndRemoteCommon:124] [p-nio-8081-exec-1331] - Failed to parse registration for repo: Proget-Shared, packageId: aggregator.core

      org.jfrog.common.JsonParsingException: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token

       at [Source: (String)"{"count":1,"items":[{"count":8,"items":[{"@id":"https://nuget2.phreesia.net/nuget/Shared/v3/registrations/aggregator.core/1.0.1989.566.json","@type":"Package","catalogEntry":{"@id":"https://nuget2.phreesia.net/nuget/Shared/v3/catalog/aggregator.core/1.0.1989.566.json","@type":"PackageDetails","authors":["Phreesia"," Inc."],"dependencyGroups":[{"targetFramework":".NETStandard2.0","dependencies":[

      {"id":"Core.Log","range":"2.0.1768"}

      ]}],"description":"Package Description","id":"Aggregator.Core","pu"[truncated 6507 chars]; line: 1, column: 305] (through reference chain: org.jfrog.repomd.nugetv3.model.RegistrationResult["items"]>java.util.ArrayList[0]>org.jfrog.repomd.nugetv3.model.RegistrationResultItem["items"]>java.util.ArrayList[0]>org.jfrog.repomd.nugetv3.model.RegistrationResultPageItem["catalogEntry"]->org.jfrog.repomd.nugetv3.model.RegistrationResultCatalogEntry["authors"])

      at org.jfrog.common.MapperUtilsBase.unchecked(MapperUtilsBase.java:243)

      at org.jfrog.common.MapperUtilsBase.readValue(MapperUtilsBase.java:125)

      at org.jfrog.common.JsonUtils.readValue(JsonUtils.java:27)

      at org.artifactory.addon.nugetv3.repo.NuGetV3VirtualAndRemoteCommon.downloadRemoteRegistration(NuGetV3VirtualAndRemoteCommon.java:120)

      at org.artifactory.addon.nugetv3.repo.NuGetV3RemoteRepoHandler.registration(NuGetV3RemoteRepoHandler.java:72)

      at org.jfrog.repomd.nugetv3.rest.NuGetV3SubResource.registration(NuGetV3SubResource.java:50)

      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.base/java.lang.reflect.Method.invoke(Method.java:566)

      at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)

      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)

      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)

      at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:200)

      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)

      at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)

      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)

      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)

      at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)

      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)

      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)

      at org.glassfish.jersey.internal.Errors.process(Errors.java:316)

      at org.glassfish.jersey.internal.Errors.process(Errors.java:298)

      at org.glassfish.jersey.internal.Errors.process(Errors.java:268)

      at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)

      at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)

      at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)

      at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)

      at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)

      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)

      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)

      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:195)

      at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:97)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.artifactory.webapp.servlet.AccessFilter.useAuthentication(AccessFilter.java:513)

      at org.artifactory.webapp.servlet.AccessFilter.authenticateAndExecute(AccessFilter.java:379)

      at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:249)

      at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:78)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.artifactory.webapp.servlet.ArtifactoryCsrfFilter.doFilter(ArtifactoryCsrfFilter.java:75)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:164)

      at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)

      at org.artifactory.webapp.servlet.SessionFilter.doFilter(SessionFilter.java:62)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.artifactory.webapp.servlet.ArtifactoryTracingFilter.doFilter(ArtifactoryTracingFilter.java:27)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:124)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)

      at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:304)

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)

      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)

      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)

      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

      at java.base/java.lang.Thread.run(Thread.java:834)

      Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token

       at [Source: (String)"{"count":1,"items":[{"count":8,"items":[{"@id":"https://nuget2.phreesia.net/nuget/Shared/v3/registrations/aggregator.core/1.0.1989.566.json","@type":"Package","catalogEntry":{"@id":"https://nuget2.phreesia.net/nuget/Shared/v3/catalog/aggregator.core/1.0.1989.566.json","@type":"PackageDetails","authors":["Phreesia"," Inc."],"dependencyGroups":[{"targetFramework":".NETStandard2.0","dependencies":[

      {"id":"Core.Log","range":"2.0.1768"}

      ]}],"description":"Package Description","id":"Aggregator.Core","pu"[truncated 6507 chars]; line: 1, column: 305] (through reference chain: org.jfrog.repomd.nugetv3.model.RegistrationResult["items"]>java.util.ArrayList[0]>org.jfrog.repomd.nugetv3.model.RegistrationResultItem["items"]>java.util.ArrayList[0]>org.jfrog.repomd.nugetv3.model.RegistrationResultPageItem["catalogEntry"]->org.jfrog.repomd.nugetv3.model.RegistrationResultCatalogEntry["authors"])

      at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)

      at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1442)

      at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1216)

      at com.fasterxml.jackson.databind.deser.std.StdDeserializer._deserializeFromArray(StdDeserializer.java:714)

      at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:40)

      at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:10)

      at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)

      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)

      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)

      at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)

      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)

      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)

      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:286)

      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)

      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)

      at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)

      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)

      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)

      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:286)

      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)

      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)

      at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)

      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)

      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)

      at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202)

      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3205)

      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3173)

      at org.jfrog.common.MapperUtilsBase.lambda$readValue$8(MapperUtilsBase.java:125)

      at org.jfrog.common.MapperUtilsBase.unchecked(MapperUtilsBase.java:241)

      ... 77 common frames omitted

      2021-05-06T17:57:30.427Z [jfrt ] [ERROR] [482eb7e4b18a6b1 ] [etV3VirtualAndRemoteCommon:458] [p-nio-8081-exec-1331] - Failed to parse registration json for package: aggregator.core, in repo: Proget-Shared

       

      Steps to reproduce:

      Step 1: Create a nupkg with multiple authors separated by comma and store in a Proget v3 feed

      Ste2 2: Create a remote Nuget v3 repository in artifactory pointing to the Proget v3 feed

      Step 3: Attempt to install the nupkg using Nuget v3 API

       

      Affected versions:

      Artifactory: 7.4.1 Enterprise

      Proget: 5.3.24

      Local Nuget client:  5.9.1.11

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              jbrowning Joseph
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-25879 -
                  SYNCHRONIZED
                  • Last Sync Date: