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

NuGet API V3 not working in Artifactory installed on Windows based systems since it use backward slash.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.6.3
    • Component/s: NuGet
    • Labels:
      None
    • Severity:
      Critical
    • Requirement Status:

      UNCOVERED

      Description

      NuGet API V3 not working in Artifactory installed on Windows based systems since it use backward slash.

      Since Windows paths are working with backwards slashes, when Artifactory try to cache the metadata of an artifacts it use backward slash while it expect slash and cause for failure.

      steps to reproduce:

      1. Install Artifactory on Windows based system.
      2. Create remote repository to NuGet gallery and configure V3 index.
      3. try to install any package using V3 api.

      you will receive the following stack trace:

      2018-09-09 09:11:58,502 [http-nio-8081-exec-10] [INFO ] (o.a.r.HttpRepo :415) - nuget-remote downloading https://api.nuget.org/v3/index.json Unknown content length
      2018-09-09 09:11:58,686 [http-nio-8081-exec-10] [INFO ] (o.a.r.HttpRepo :428) - nuget-remote downloaded https://api.nuget.org/v3/index.json 6.47 KB at 36.57 KB/sec
      2018-09-09 09:11:59,329 [http-nio-8081-exec-7] [INFO ] (o.a.r.HttpRepo :415) - nuget-remote downloading https://api.nuget.org/v3/registration3-gz-semver2/nunit/index.json Unknown content length
      2018-09-09 09:11:59,392 [http-nio-8081-exec-7] [ERROR] (o.a.r.d.DbStoringRepoMixin:274) - Couldn't save resource, reason:
      java.nio.file.InvalidPathException: Invalid path. '\' is not a valid name character: nuget-remote-cache/.nuGetV3\registration-semver2\nunit\index.json
      at org.artifactory.util.PathValidator.validate(PathValidator.java:106)
      at org.artifactory.storage.db.fs.model.DbMutableItem.<init>(DbMutableItem.java:109)
      at org.artifactory.storage.db.fs.model.DbMutableFile.<init>(DbMutableFile.java:66)
      at org.artifactory.storage.db.fs.model.DbMutableFileProvider.createNewMutableItem(DbMutableFileProvider.java:76)
      at org.artifactory.storage.db.fs.model.DbMutableFileProvider.createNewMutableItem(DbMutableFileProvider.java:44)
      at org.artifactory.storage.db.fs.model.DbFsItemProvider.getOrCreateMutableFsItem(DbFsItemProvider.java:152)
      at org.artifactory.storage.db.fs.model.DbMutableFileProvider.getOrCreMutableFile(DbMutableFileProvider.java:65)
      at org.artifactory.repo.db.DbStoringRepoMixin.createOrGetFile(DbStoringRepoMixin.java:671)
      at org.artifactory.repo.db.DbStoringRepoMixin.saveResource(DbStoringRepoMixin.java:187)
      at org.artifactory.repo.db.DbLocalRepo.saveResource(DbLocalRepo.java:154)
      at org.artifactory.repo.service.RepositoryServiceImpl.saveResourceInTransaction(RepositoryServiceImpl.java:1832)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
      at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      at com.sun.proxy.$Proxy148.saveResourceInTransaction(Unknown Source)
      at org.artifactory.repo.service.RepositoryServiceImpl.saveResource(RepositoryServiceImpl.java:1802)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
      at com.sun.proxy.$Proxy148.saveResource(Unknown Source)
      at org.artifactory.repo.RemoteRepoBase.doDownloadAndSave(RemoteRepoBase.java:751)
      at org.artifactory.repo.RemoteRepoBase.downloadAndSave(RemoteRepoBase.java:594)
      at org.artifactory.repo.service.RepositoryServiceImpl.downloadAndSave(RepositoryServiceImpl.java:1730)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
      at com.sun.proxy.$Proxy148.downloadAndSave(Unknown Source)
      at org.artifactory.repo.RemoteRepoBase.getResourceStreamHandle(RemoteRepoBase.java:498)
      at org.artifactory.repo.service.RepositoryServiceImpl.getResourceStreamHandle(RepositoryServiceImpl.java:1776)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
      at com.sun.proxy.$Proxy148.getResourceStreamHandle(Unknown Source)
      at org.artifactory.engine.DownloadServiceImpl.respondFoundResource(DownloadServiceImpl.java:331)
      at org.artifactory.engine.DownloadServiceImpl.respond(DownloadServiceImpl.java:277)
      at org.artifactory.engine.DownloadServiceImpl.process(DownloadServiceImpl.java:206)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      at org.artifactory.request.aop.RequestAdvice.invoke(RequestAdvice.java:67)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      at com.sun.proxy.$Proxy187.process(Unknown Source)
      at org.artifactory.addon.nugetv3.repo.NuGetV3VirtualAndRemoteCommon.download(NuGetV3VirtualAndRemoteCommon.java:229)
      at org.artifactory.addon.nugetv3.repo.NuGetV3VirtualAndRemoteCommon.downloadRemoteRegistration(NuGetV3VirtualAndRemoteCommon.java:105)
      at org.artifactory.addon.nugetv3.repo.NuGetV3RemoteRepoHandler.registration(NuGetV3RemoteRepoHandler.java:63)
      at org.jfrog.repomd.nugetv3.rest.NuGetV3SubResource.registrationGzSemVer2(NuGetV3SubResource.java:57)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
      at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
      at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
      at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
      at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
      at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
      at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
      at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
      at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
      at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      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:184)
      at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:93)
      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:433)
      at org.artifactory.webapp.servlet.AccessFilter.useAnonymousIfPossible(AccessFilter.java:392)
      at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:211)
      at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:168)
      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:55)
      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.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.valves.rewrite.RewriteValve.invoke(RewriteValve.java:279)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      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:342)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:748)
      2018-09-09 09:11:59,423 [http-nio-8081-exec-7] [WARN ] (o.a.s.f.l.SessionLockEntry:120) - Mutable item 'nuget-remote-cache:.nuGetV3/registration-semver2' has local modifications that will be discarded.
      2018-09-09 09:11:59,424 [http-nio-8081-exec-7] [WARN ] (o.a.s.f.l.SessionLockEntry:120) - Mutable item 'nuget-remote-cache:.nuGetV3/registration-semver2/nunit' has local modifications that will be discarded.
      2018-09-09 09:11:59,426 [http-nio-8081-exec-7] [ERROR] (o.a.r.HttpRepo :1215) - nuget-remote: Failed to download 'https://api.nuget.org/v3/registration3-gz-semver2/nunit/index.json'. Received status code 200 and caught exception: Invalid path. '\' is not a valid name character: nuget-remote-cache/.nuGetV3\registration-semver2\nunit\index.json
      

        Attachments

          Activity

            People

            Assignee:
            Dudim Dudi Morad (Inactive)
            Reporter:
            yehudah Yehuda Hadad
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: