{"record":{"id":"88f1e054d68d35dc","repo":"CocoaPods/CocoaPods","slug":"no-podspec-found-for-name-in-podspec","errorCode":null,"errorMessage":"No podspec found for `#{name}` in #{podspec}","messagePattern":"No podspec found for `#(.+?)` in #(.+?)","errorType":"exception","errorClass":"Informative","httpStatus":null,"severity":"error","filePath":"lib/cocoapods/sandbox.rb","lineNumber":293,"sourceCode":"    # @param  [String, Pathname, Specification] podspec\n    #         The contents of the specification (String) or the path to a\n    #         podspec file (Pathname).\n    #\n    # @return [void]\n    #\n    #\n    def store_podspec(name, podspec, _external_source = false, json = false)\n      file_name = json ? \"#{name}.podspec.json\" : \"#{name}.podspec\"\n      output_path = specifications_root + file_name\n\n      spec =\n        case podspec\n        when String\n          Sandbox.update_changed_file(output_path, podspec)\n          Specification.from_file(output_path)\n        when Pathname\n          unless podspec.exist?\n            raise Informative, \"No podspec found for `#{name}` in #{podspec}\"\n          end\n          FileUtils.copy(podspec, output_path)\n          Specification.from_file(podspec)\n        when Specification\n          raise ArgumentError, 'can only store Specification objects as json' unless json\n          Sandbox.update_changed_file(output_path, podspec.to_pretty_json)\n          podspec.dup\n        else\n          raise ArgumentError, \"Unknown type for podspec: #{podspec.inspect}\"\n        end\n\n      # we force the file to be the file in the sandbox, so specs that have been serialized to\n      # json maintain a consistent checksum.\n      # this is safe to do because `spec` is always a clean instance\n      spec.defined_in_file = output_path\n\n      unless spec.name == name\n        raise Informative, \"The name of the given podspec `#{spec.name}` doesn't match the expected one `#{name}`\"","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/CocoaPods/CocoaPods/blob/b80e113e28a7e23cd6dbc169f0c923f6b48bf7a2/lib/cocoapods/sandbox.rb#L275-L311","documentation":"Error \"No podspec found for `#{name}` in #{podspec}\" thrown in CocoaPods/CocoaPods.","triggerScenarios":"Thrown at lib/cocoapods/sandbox.rb:293 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b80e113e28a7e23cd6dbc169f0c923f6b48bf7a2","analyzedAt":"2026-08-21T15:07:28.652Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}