{"record":{"id":"0e0dba97c24e6bb0","repo":"CocoaPods/CocoaPods","slug":"the-podspec-specification-does-not-validate","errorCode":null,"errorMessage":"The `#{podspec}` specification does not validate.\n\n#{e.message}","messagePattern":"The `#(.+?)` specification does not validate\\.\n\n#(.+?)","errorType":"exception","errorClass":"Informative","httpStatus":null,"severity":"error","filePath":"lib/cocoapods/command/repo/push.rb","lineNumber":155,"sourceCode":"\n        # Performs a full lint against the podspecs.\n        #\n        def validate_podspec_files\n          UI.puts \"\\nValidating #{'spec'.pluralize(count)}\".yellow\n          podspec_files.each do |podspec|\n            validator = Validator.new(podspec, @source_urls)\n            validator.allow_warnings = @allow_warnings\n            validator.use_frameworks = @use_frameworks\n            validator.use_modular_headers = @use_modular_headers\n            validator.ignore_public_only_results = @private\n            validator.swift_version = @swift_version\n            validator.skip_import_validation = @skip_import_validation\n            validator.skip_tests = @skip_tests\n            validator.validation_dir = @validation_dir\n            begin\n              validator.validate\n            rescue => e\n              raise Informative, \"The `#{podspec}` specification does not validate.\" \\\n                                 \"\\n\\n#{e.message}\"\n            end\n            raise Informative, \"The `#{podspec}` specification does not validate.\" unless validator.validated?\n          end\n        end\n\n        # Checks that the repo is clean.\n        #\n        # @raise  If the repo is not clean.\n        #\n        # @todo   Add specs for staged and unstaged files.\n        #\n        # @todo   Gracefully handle the case where source is not under git\n        #         source control.\n        #\n        # @return [void]\n        #\n        def check_repo_status","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/CocoaPods/CocoaPods/blob/b80e113e28a7e23cd6dbc169f0c923f6b48bf7a2/lib/cocoapods/command/repo/push.rb#L137-L173","documentation":"During `pod repo push`, validate_podspec_files runs a full Validator per podspec with your flags. Any exception raised inside validator.validate (unreachable :git/:http source, malformed podspec, crashed check) is rescued and wrapped as Informative with the original exception text appended after the headline. This signals validation crashed outright — distinct from a clean failed-check result, which hits the separate `unless validator.validated?` raise without appended detail.","triggerScenarios":"Pushing a podspec whose s.source git tag has not been pushed yet, a repo URL typo, malformed .podspec.json, or a broken local toolchain that makes the lint app project raise rather than fail checks.","commonSituations":"Tag forgotten before push; CI machine with broken Xcode state; JSON syntax error introduced by hand-editing the podspec.","solutions":["Read the text after the blank line — it is the underlying exception and the real cause","Reproduce standalone with `pod spec lint Name.podspec` using the same flags for a cleaner trace","Fix the root cause (push the git tag, correct s.source, repair the toolchain) and re-push"],"exampleFix":"# before (MyPod.podspec)\ns.source = { :git => 'https://github.com/org/MyPod.git', :tag => 'v1.0.0' }  # tag not pushed\n\n# after\ngit tag v1.0.0 && git push origin v1.0.0\npod repo push my-specs MyPod.podspec","handlingStrategy":"try-catch","validationCode":"# pre-lint the exact spec with the same flags before pushing\nspec = Dir['*.podspec{,.json}'].first or abort 'no podspec'\nsystem('pod spec lint', spec, '--sources', ENV['SPEC_REPO_URL'] || 'trunk') or abort(\"#{spec} failed lint - fix before repo push\")\nsystem('pod repo push', ENV['SPEC_REPO_NAME'], spec) or exit $?.exitstatus","typeGuard":null,"tryCatchPattern":"begin\n  Pod::Command.run(['repo', 'push', repo, spec])\nrescue Pod::Informative => e\n  if e.message =~ /does not validate\\.\\s*\\n\\s*\\n(.*)\\z/m\n    warn \"underlying cause: #{$1}\"  # surface the wrapped exception text\n  end\n  exit 1\nend","preventionTips":["Push the release git tag before pushing the podspec","Run `pod spec lint` with identical flags before `pod repo push`","Validate podspec JSON (e.g. `ruby -rjson -e \"JSON.parse(File.read(ARGV[0]))\"`) after hand edits"],"tags":["repo-push","lint","podspec","cocoapods"],"backgroundTag":"lint-validation-failed","analyzedSha":"b80e113e28a7e23cd6dbc169f0c923f6b48bf7a2","analyzedAt":"2026-08-21T15:07:28.652Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}