Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- ERROR | [iOS] unknown: Encountered an unknown error (Malformed version number string ) during validation. #8240

Closed
ConfusedVorlon opened this issue Nov 1, 2018 · 19 comments

Comments

@ConfusedVorlon
Copy link

Report

What did you do?

  1. tried to release updated pod (version number change)
    pod lib lint

What did you expect to happen?

lint passes

What happened instead?

$ pod lib lint

 -> HSTestingBackchannel (1.2.2)
    - ERROR | [iOS] unknown: Encountered an unknown error (Malformed version number string ) during validation.

[!] HSTestingBackchannel did not pass validation, due to 1 error.
You can use the `--no-clean` option to inspect any issue.

CocoaPods Environment

Stack

   CocoaPods : 1.5.3
        Ruby : ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
    RubyGems : 2.7.7
        Host : Mac OS X 10.13.6 (17G65)
       Xcode : 10.0 (10A254a)
         Git : git version 2.17.1 (Apple Git-112)
Ruby lib dir : /Users/rob/.rvm/rubies/ruby-2.4.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 7c92221f919dd45b807d5d4525faac7938defa9d

Installation Source

Executable Path: /Users/rob/.rvm/gems/ruby-2.4.0/bin/pod

Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.1
cocoapods-try         : 1.1.0

Project that demonstrates the issue

https://github.com/ConfusedVorlon/HSTestingBackchannel

@ConfusedVorlon
Copy link
Author

some more detail:

I get it with a podspec that was published some months ago, as well as with a podspec that I'm trying to update

trying to update this one to 1.2.2 (no changes other than the two instances of the version string)

I have tested with cocoapods 1.5.3 and 1.6.0.beta.2

$ pod lib lint

 -> HSTestingBackchannel (1.2.2)
    - ERROR | [iOS] unknown: Encountered an unknown error (Malformed version number string ) during validation.

[!] HSTestingBackchannel did not pass validation, due to 1 error.
You can use the `--no-clean` option to inspect any issue.

full pod

Pod::Spec.new do |s|


  s.name         = "HSTestingBackchannel"
  s.version      = "1.2.2"

  s.summary      = "Send notifications directly from your UITesting classes to your running app."

  s.description  = <<-DESC
                   Sometimes you want to cheat in your UITesting.

                   HSTestingBackchannel provides an easy way for you to send notifications to your running app. You can use these to set things up for tests, screenshots, etc
                   DESC

  s.homepage     = "https://github.com/ConfusedVorlon/HSTestingBackchannel"


  s.license      = { :type => "MIT", :file => "LICENSE" }


  s.author             = { "Rob" => "Rob@HobbyistSoftware.com" }

  s.platform     = :ios, "7.0"

  s.source       = { :git => "https://github.com/ConfusedVorlon/HSTestingBackchannel.git", :tag => "1.2.2" }


  s.source_files  = "Classes", "Classes/**/*.{h,m}"
  s.exclude_files = "Classes/Exclude"

  s.dependency 'GCDWebServer'

end

and for good measure a pod that I published some time ago and haven't changed

#
#  Be sure to run `pod spec lint HSTableView.podspec' to ensure this is a
#  valid spec and to remove all comments including this before submitting the spec.
#
#  To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
#  To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#

Pod::Spec.new do |s|

  # ―――  Spec Metadata  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  These will help people to find your library, and whilst it
  #  can feel like a chore to fill in it's definitely to your advantage. The
  #  summary should be tweet-length, and the description more in depth.
  #

  s.name         = "HSTableView"
  s.version      = "1.1.0"
  s.summary      = "A simpler, more elegant UITableView using objects, blocks instead of delegates"

  # This description is used to generate tags and improve search results.
  #   * Think: What does it do? Why did you write it? What is the focus?
  #   * Try to keep it short, snappy and to the point.
  #   * Write the description between the DESC delimiters below.
  #   * Finally, don't worry about the indent, CocoaPods strips it!
  s.description  = <<-DESC
A simpler, more elegant UITableView. Rows are managed by objects. Things happen with blocks.

Your whole table is declared up front with no need for delegates

The table view uses a responder chain to provide settings. Any setting can be set at the row level, the section level or the table level.

This allows simple configuration at the table level, and easy customisation at the row level.

Blocks are used for tap handlers, delete handlers, etc.

Default (and coloured) accessories are supported

HSTableView is suitable for situations where there is a known finite number of rows (although the number can change). It doesn’t support infinite scrolling tables (you’ll have to use UITableView and delegates for that!)
                   DESC

  s.homepage     = "https://github.com/ConfusedVorlon/HSTableView"
  # s.screenshots  = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"


  # ―――  Spec License  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  Licensing your code is important. See http://choosealicense.com for more info.
  #  CocoaPods will detect a license file if there is a named LICENSE*
  #  Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
  #

  s.license      = "MIT"
  # s.license      = { :type => "MIT", :file => "FILE_LICENSE" }


  # ――― Author Metadata  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  Specify the authors of the library, with email addresses. Email addresses
  #  of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
  #  accepts just a name if you'd rather not provide an email address.
  #
  #  Specify a social_media_url where others can refer to, for example a twitter
  #  profile URL.
  #

  s.author             =  "Rob Jonson"
  # Or just: s.author    = "Rob Jonson"
  # s.authors            = { "Rob Jonson" => "rob@hobbyistsoftware.com" }
  # s.social_media_url   = "http://twitter.com/Rob Jonson"

  # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  If this Pod runs only on iOS or OS X, then specify the platform and
  #  the deployment target. You can optionally include the target after the platform.
  #

  # s.platform     = :ios
  s.platform     = :ios, "9.0"

  s.swift_version = '4.2'

  #  When using multiple platforms
  # s.ios.deployment_target = "5.0"
  # s.osx.deployment_target = "10.7"
  # s.watchos.deployment_target = "2.0"
  # s.tvos.deployment_target = "9.0"


  # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  Specify the location from where the source should be retrieved.
  #  Supports git, hg, bzr, svn and HTTP.
  #

  s.source       = { :git => "https://github.com/ConfusedVorlon/HSTableView.git", :tag => "#{s.version}" }


  # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  CocoaPods is smart about how it includes source code. For source files
  #  giving a folder will include any swift, h, m, mm, c & cpp files.
  #  For header files it will include any header in the folder.
  #  Not including the public_header_files will make all headers public.
  #

  s.source_files  = "HSTableView"
  # s.exclude_files = "Classes/Exclude"

  # s.public_header_files = "Classes/**/*.h"


  # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  A list of resources included with the Pod. These are copied into the
  #  target bundle with a build phase script. Anything else will be cleaned.
  #  You can preserve files from being cleaned, please don't preserve
  #  non-essential files like tests, examples and documentation.
  #

  # s.resource  = "icon.png"
  # s.resources = "Resources/*.png"

  # s.preserve_paths = "FilesToSave", "MoreFilesToSave"


  # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  Link your library with frameworks, or libraries. Libraries do not include
  #  the lib prefix of their name.
  #

  # s.framework  = "SomeFramework"
  # s.frameworks = "SomeFramework", "AnotherFramework"

  # s.library   = "iconv"
  # s.libraries = "iconv", "xml2"


  # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  If your library depends on compiler flags you can set them in the xcconfig hash
  #  where they will only apply to your library. If you depend on other Podspecs
  #  you can include multiple dependencies to ensure it works.

  # s.requires_arc = true

  # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
  # s.dependency "JSONKit", "~> 1.4"

end
$ pod lib lint

 -> HSTableView (1.1.0)
    - ERROR | [iOS] unknown: Encountered an unknown error (Malformed version number string ) during validation.

[!] HSTableView did not pass validation, due to 1 error.
You can use the `--no-clean` option to inspect any issue.

@ConfusedVorlon
Copy link
Author

ConfusedVorlon commented Nov 1, 2018

and for good measure:

$ pod lib lint --verbose

 -> HSTestingBackchannel
  HSTestingBackchannel (1.2.2) - Analyzing on iOS 7.0 platform.
  Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-App`: (``)

Fetching external sources
-> Fetching podspec for `HSTestingBackchannel` from `/Users/rob/Documents/Development/Specs/HSTestingBackchannel`

Resolving dependencies of 

Comparing resolved specification to the sandbox manifest
  A GCDWebServer
  A HSTestingBackchannel

Downloading dependencies

-> Installing GCDWebServer (3.4.2)
  > Copying GCDWebServer from `/Users/rob/Library/Caches/CocoaPods/Pods/Release/GCDWebServer/3.4.2-8d67e` to `../../../../../../private/var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Pods/GCDWebServer`

-> Installing HSTestingBackchannel (1.2.2)
  - Running pre install hooks

Generating Pods project
  - Creating Pods project
  - Adding source files to Pods project
  - Adding frameworks to Pods project
  - Adding libraries to Pods project
  - Adding resources to Pods project
  - Adding development pod helper files to Pods project
  - Linking headers
  - Installing targets
    - Installing target `GCDWebServer` iOS 8.0
      - Generating module map file at `../../../../../../private/var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Pods/Target Support Files/GCDWebServer/GCDWebServer.modulemap`
      - Generating umbrella header at `../../../../../../private/var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Pods/Target Support Files/GCDWebServer/GCDWebServer-umbrella.h`
      - Generating Info.plist file at `../../../../../../private/var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Pods/Target Support Files/GCDWebServer/Info.plist`
    - Installing target `HSTestingBackchannel` iOS 8.0
      - Generating module map file at `../../../../../../private/var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Pods/Target Support Files/HSTestingBackchannel/HSTestingBackchannel.modulemap`
      - Generating umbrella header at `../../../../../../private/var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Pods/Target Support Files/HSTestingBackchannel/HSTestingBackchannel-umbrella.h`
      - Generating Info.plist file at `../../../../../../private/var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Pods/Target Support Files/HSTestingBackchannel/Info.plist`
    - Installing target `Pods-App` iOS 8.0
      - Generating Info.plist file at `../../../../../../private/var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Pods/Target Support Files/Pods-App/Info.plist`
      - Generating module map file at `../../../../../../private/var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Pods/Target Support Files/Pods-App/Pods-App.modulemap`
      - Generating umbrella header at `../../../../../../private/var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Pods/Target Support Files/Pods-App/Pods-App-umbrella.h`
  - Running post install hooks
  - Writing Xcode project file to `../../../../../../private/var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Pods/Pods.xcodeproj`
  - Writing Lockfile in `../../../../../../var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Podfile.lock`
  - Writing Manifest in `../../../../../../private/var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/Pods/Manifest.lock`

Integrating client project

[!] Please close any current Xcode sessions and use `App.xcworkspace` for this project from now on.

Integrating target `Pods-App` (`../../../../../../var/folders/ls/nyk7xgm14vb40_pcngzv11bw0000gn/T/CocoaPods-Lint-20181101-2189-1r927hj-HSTestingBackchannel/App.xcodeproj` project)
  Adding Build Phase '[CP] Embed Pods Frameworks' to project.
  Adding Build Phase '[CP] Check Pods Manifest.lock' to project.
  - Running post install hooks

-> Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
  Building with `xcodebuild`.

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

/Users/rob/.rvm/gems/ruby-2.4.0/bin/pod lib lint --verbose


### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack

CocoaPods : 1.5.3
Ruby : ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
RubyGems : 2.7.7
Host : Mac OS X 10.13.6 (17G65)
Xcode : 10.0 (10A254a)
Git : git version 2.17.1 (Apple Git-112)
Ruby lib dir : /Users/rob/.rvm/rubies/ruby-2.4.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 7c92221f919dd45b807d5d4525faac7938defa9d


### Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.1
cocoapods-try : 1.1.0


### Error

RuntimeError - can't modify frozen String
/Users/rob/.rvm/gems/ruby-2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/validator.rb:335:in rescue in perform_extensive_analysis' /Users/rob/.rvm/gems/ruby-2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/validator.rb:302:in perform_extensive_analysis'
/Users/rob/.rvm/gems/ruby-2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/validator.rb:87:in validate' /Users/rob/.rvm/gems/ruby-2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command/lib/lint.rb:68:in block in run'
/Users/rob/.rvm/gems/ruby-2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command/lib/lint.rb:54:in each' /Users/rob/.rvm/gems/ruby-2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command/lib/lint.rb:54:in run'
/Users/rob/.rvm/gems/ruby-2.4.0/gems/claide-1.0.2/lib/claide/command.rb:334:in run' /Users/rob/.rvm/gems/ruby-2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in run'
/Users/rob/.rvm/gems/ruby-2.4.0/gems/cocoapods-1.5.3/bin/pod:55:in <top (required)>' /Users/rob/.rvm/gems/ruby-2.4.0/bin/pod:23:in load'
/Users/rob/.rvm/gems/ruby-2.4.0/bin/pod:23:in <main>' /Users/rob/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in eval'
/Users/rob/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `

'


――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=can%27t+modify+frozen+String&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...
 - Error: can't modify frozen String
   https://github.com/CocoaPods/CocoaPods/issues/1444 [closed] [9 comments]
   a week ago




@dnkoutso
Copy link
Contributor

dnkoutso commented Nov 1, 2018

This works for me on 1.6.0.beta.2 can you please try it? I believe this is already fixed.

    Touch /Users/dimitris/Library/Developer/Xcode/DerivedData/App-bveglotfxgbpyhefkqngdijmlxme/Build/Products/Release-iphonesimulator/App.app (in target: App)
        cd /var/folders/0x/798grj997td8xhm6_jr85l680000gn/T/CocoaPods-Lint-20181101-29703-17ll7cy-HSTestingBackchannel
        /usr/bin/touch -c /Users/dimitris/Library/Developer/Xcode/DerivedData/App-bveglotfxgbpyhefkqngdijmlxme/Build/Products/Release-iphonesimulator/App.app
   
    ** BUILD SUCCEEDED **

@dnkoutso dnkoutso added the s1:awaiting input Waiting for input from the original author label Nov 1, 2018
@ConfusedVorlon
Copy link
Author

ConfusedVorlon commented Nov 1, 2018

nope - as I said, same issue with 1.6.0.beta.2

$ pod lib lint

 -> HSTestingBackchannel (1.2.2)
    - ERROR | [iOS] unknown: Encountered an unknown error (Malformed version number string ) during validation.

[!] HSTestingBackchannel did not pass validation, due to 1 error.
You can use the `--no-clean` option to inspect any issue.
Robs-Retina-iMac:HSTestingBackchannel rob$ pod --version
1.6.0.beta.2

did you try pod lib lint ??

@stale stale bot removed the s1:awaiting input Waiting for input from the original author label Nov 1, 2018
@dnkoutso
Copy link
Contributor

dnkoutso commented Nov 1, 2018

I did and it worked

@ConfusedVorlon
Copy link
Author

ok - so different results on different systems.
any suggestions?

@ConfusedVorlon
Copy link
Author

ConfusedVorlon commented Nov 1, 2018

previous reports from

$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]

switching to ruby 2.5.3 leads to the following

$ pod lib lint

 -> HSTestingBackchannel (1.2.2)
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | [iOS] xcodebuild:  note: Planning build
    - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    - NOTE  | [iOS] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file. (in target 'App')
    - WARN  | [iOS] xcodebuild:  /Users/rob/Documents/Development/Specs/HSTestingBackchannel/Classes/HSTestingBackchannel.m:38:81: warning: values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead [-Wformat]
    - WARN  | [iOS] xcodebuild:  /Users/rob/Documents/Development/Specs/HSTestingBackchannel/Classes/HSTestingBackchannel.m:55:87: warning: values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead [-Wformat]
    - WARN  | [iOS] xcodebuild:  /Users/rob/Documents/Development/Specs/HSTestingBackchannel/Classes/HSTestingBackchannel.m:121:103: warning: values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead [-Wformat]

[!] HSTestingBackchannel did not pass validation, due to 3 warnings (but you can use `--allow-warnings` to ignore them).
You can use the `--no-clean` option to inspect any issue.

so perhaps a ruby 2.4.0 issue???

@dnkoutso
Copy link
Contributor

dnkoutso commented Nov 2, 2018

interesting

@openingax
Copy link

Cocoapods update to 1.6.0(beta) is worked for me.
[sudo] gem install cocoapods --pre

Xcode version: 10.1

@dnkoutso
Copy link
Contributor

dnkoutso commented Nov 2, 2018

@ConfusedVorlon still works for me in ruby 2.4.0 :|

@ConfusedVorlon
Copy link
Author

any further info I can give?

did you see the 'RuntimeError - can't modify frozen String' error in the --verbose output?

@knox
Copy link

knox commented Nov 2, 2018

Maybe this is a duplicate?

gem 2.7.7 can not run cocoapods 1.3.x . 1.4.x
you should install rubygem in 2.7.6

#7765 (comment)

@ConfusedVorlon
Copy link
Author

yes - that fixes it. Thank you.

fwiw, this still feels like a bug to me.

  • It's fine for cocoapods not to run on gem 2.7.7
  • it is not fine for cocoapods to fail without saying why

@ConfusedVorlon
Copy link
Author

ConfusedVorlon commented Nov 2, 2018

so, for the record and any future viewers.
I was using gem 2.7.7

$ gem --version
2.7.7

This was fixed by running

gem update --system 2.7.6

@dnkoutso
Copy link
Contributor

dnkoutso commented Nov 3, 2018

closing as dup

@Anke6336
Copy link

gem update --system 2.7.6

Updating rubygems-update
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.

@williamrodz
Copy link

I ran 'sudo gem install cocoapods' after doing pod repo update and got my 'pod install' to work

@cyh404
Copy link

cyh404 commented May 24, 2019

The problem
Solved?

@ConfusedVorlon
Copy link
Author

yes I tested in ruby 2.4.0 with cocoapods 1.7.0 and no longer see an error
thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants