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

Modifying the podspec file with any GUI editor like Xcode results in unreadable Metadata

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 6.0.3, 6.3.0
    • Fix Version/s: None
    • Component/s: CocoaPods
    • Labels:
      None

      Description

      Customer is manually editing the podspec file with a new version, i.e. the file generated from: pod spec create <DIR>, then manually changing:

        s.name         = "cocoapods-xcode"
        s.version      = "0.0.1"                                                                             <----------------------- This version, incremented to 0.0.2.
        s.summary      = "A short description of cocoapods-xcode."
      

      Then normal procedure, tar directory, upload to Artifactory. logs are not super useful (even with debug):

      2018-09-21 23:11:24,233 [http-nio-8081-exec-1] [INFO ] (o.a.a.c.CocoaPodsServiceImpl:244) - Reindex requested for repository cocoapods-local
      2018-09-21 23:11:24,237 [http-nio-8081-exec-1] [INFO ] (o.a.u.r.s.a.b.t.a.RecalculateIndexService:62) - Recalculating index for repository cocoapods-local scheduled to run
      2018-09-21 23:11:24,237 [art-exec-8816] [DEBUG] (o.a.a.c.CocoaPodsServiceImpl:257) - Checking for CocoaPods repository reindex requests.
      2018-09-21 23:11:24,238 [art-exec-8816] [DEBUG] (o.a.a.c.CocoaPodsServiceImpl:278) - Running AQL search for all pods in repo cocoapods-local
      2018-09-21 23:11:24,247 [art-exec-8816] [DEBUG] (o.a.a.c.CocoaPodsServiceImpl:300) - Found 4 pods in repo cocoapods-local
      2018-09-21 23:11:24,247 [art-exec-8816] [DEBUG] (o.a.a.c.CocoaPodsServiceImpl:266) - Reindexing repo cocoapods-local
      2018-09-21 23:11:24,248 [art-exec-8816] [DEBUG] (o.j.r.c.CocoaPodsMetadataExtractor:39) - Reading contents of pod 'xcode2.tar.gz' with size '439782' and SHA-1 '605f8b6ee9c4c4933ee8789ab997d64b0ffd2477'
      2018-09-21 23:11:24,254 [art-exec-8816] [DEBUG] (o.j.r.c.CocoaPodsMetadataExtractor:46) - Found .podspec file: cocoapods-xcode/cocoapods-xcode.podspec
      2018-09-21 23:11:24,257 [art-exec-8816] [DEBUG] (o.j.r.c.CocoaPodsMetadataIndexer:49) - Indexing CocoaPods metadata for repo 'cocoapods-local' on path 'xcode2.tar.gz'
      2018-09-21 23:11:24,257 [art-exec-8816] [DEBUG] (o.j.r.c.CocoaPodsMetadataIndexer:68) - Writing metadata attributes on pod cocoapods-xcode:0.0.2 path: xcode2.tar.gz
      2018-09-21 23:11:24,285 [art-exec-8816] [DEBUG] (o.j.r.c.CocoaPodsMetadataIndexer:114) - Writing index entry for pod cocoapods-xcode:0.0.2 to path .specs/cocoapods-xcode/0.0.2/cocoapods-xcode.podspec
      2018-09-21 23:11:24,318 [art-exec-8816] [DEBUG] (o.j.r.c.CocoaPodsMetadataExtractor:39) - Reading contents of pod 'xcode3.tar.gz' with size '439637' and SHA-1 '08f9e6003fbf45c9fcc98a716349e2804bcd72ae'
      2018-09-21 23:11:24,321 [art-exec-8816] [DEBUG] (o.j.r.c.CocoaPodsMetadataExtractor:46) - Found .podspec file: cocoapods-xcode/._cocoapods-xcode.podspec
      2018-09-21 23:11:24,321 [art-exec-8816] [ERROR] (o.j.r.c.CocoaPodsMetadataExtractor:57) - Error while extracting metadata from pod: Unable to parse spec
      2018-09-21 23:11:24,333 [art-exec-8816] [DEBUG] (o.j.r.c.CocoaPodsMetadataExtractor:58) - Error while extracting metadata from pod:Unable to parse spec
      java.io.IOException: Unable to parse spec
      	at org.jfrog.repomd.cocoapods.CocoaPodsMetadataExtractor.readFromPodspec(CocoaPodsMetadataExtractor.java:73)
      	at org.jfrog.repomd.cocoapods.CocoaPodsMetadataExtractor.extract(CocoaPodsMetadataExtractor.java:47)
      	at org.jfrog.repomd.cocoapods.CocoaPodsMetadataIndexer.index(CocoaPodsMetadataIndexer.java:47)
      	at org.artifactory.addon.cocoapods.CocoaPodsServiceImpl.index(CocoaPodsServiceImpl.java:93)
      	at org.artifactory.addon.cocoapods.CocoaPodsServiceImpl.asyncReindex(CocoaPodsServiceImpl.java:267)
      	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.schedule.aop.TraceableMethodInvocation.proceed(TraceableMethodInvocation.java:58)
      	at org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:333)
      	at org.artifactory.schedule.aop.AsyncAdvice.lambda$submit$2(AsyncAdvice.java:285)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at org.artifactory.concurrent.ArtifactoryRunnable.run(ArtifactoryRunnable.java:30)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      

      However, this does work when editing the file with VIM. Artifactory seems to be unable to read it only if its edited by Xcode - we noticed that if you edit the podspec with Xcode, ATFER upgrading to Artifactory, if you expand the tar.gz file, there is a file named ._cocoapods-xcode.podspec as well as cocoapods-xcode.podspec. The normal tar.gz does not have ._cocoapods-xcode.podspec, nor does the VIM edited tar.gz.

      $ diff cocoapods-xcode.podspec ../../cocoapods-xcode-edited/cocoapods-xcode/cocoapods-xcode.podspec

      $ shasum cocoapods-xcode.podspec
      c0d14fcf66538e4d2fd63cc94f591b02dc4750d7 cocoapods-xcode.podspec

      $ shasum ../../cocoapods-xcode-edited/cocoapods-xcode/cocoapods-xcode.podspec
      c0d14fcf66538e4d2fd63cc94f591b02dc4750d7 ../../cocoapods-xcode-edited/cocoapods-xcode/cocoapods-xcode.podspec

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              loreny Loren Yeung [X] (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: