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

RuntimeError - [Xcodeproj] Type checking error: got PBXFileReference for attribute: Attribute files (type: to_many, classes: ["PBXBuildFile"], owner class: AbstractBuildPhase) #9117

Closed
1 task done
tarun29061990 opened this issue Aug 20, 2019 · 4 comments

Comments

@tarun29061990
Copy link

tarun29061990 commented Aug 20, 2019

Report

What did you do?

Run pod install

What did you expect to happen?

Install all pod dependencies correctly.

What happened instead?

RuntimeError - [Xcodeproj] Type checking error: got `PBXFileReference` for attribute: Attribute `files` (type: `to_many`, classes: `["PBXBuildFile"]`, owner class: `AbstractBuildPhase`)
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object_attributes.rb:142:in `validate_value'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object_list.rb:205:in `block in perform_additions_operations'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object_list.rb:202:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object_list.rb:202:in `perform_additions_operations'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object_list.rb:76:in `<<'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:301:in `block (2 levels) in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:299:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:296:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project.rb:271:in `new_from_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:350:in `object_with_uuid'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:300:in `block (2 levels) in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:299:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:296:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project.rb:271:in `new_from_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:350:in `object_with_uuid'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:300:in `block (2 levels) in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:299:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:296:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project.rb:271:in `new_from_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project.rb:212:in `initialize_from_file'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project.rb:112:in `open'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/installer/analyzer.rb:1086:in `block (2 levels) in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/installer/analyzer.rb:1085:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/installer/analyzer.rb:1085:in `block in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/installer/analyzer.rb:1080:in `inspect_targets_to_integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/installer/analyzer.rb:106:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/installer.rb:234:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/installer.rb:233:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0.beta.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

CocoaPods Environment

Stack

   CocoaPods : 1.8.0.beta.1
        Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
    RubyGems : 2.5.2.3
        Host : Mac OS X 10.14.5 (18F203)
       Xcode : 10.3 (10G8)
         Git : git version 2.20.1 (Apple Git-117)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - git - https://github.com/CocoaPods/Specs.git @ 95234debde93214cfd40dac8bd3b444c617156ac

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

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

Podfile

platform :ios, '9.0'

target 'Canvas' do
  pod 'React', :path => '../node_modules/react-native/'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'Firebase/Analytics'
  pod 'Firebase/Core', '5.18.0'
  pod 'Firebase/Messaging'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
  pod 'Firebase/RemoteConfig'
  pod 'AppAuth', '0.95.0'

  # pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'

  pod 'Branch', '0.27.0'




  pod 'RNAppAuth', :path => '../node_modules/react-native-app-auth'

  pod 'react-native-webview', :path => '../node_modules/react-native-webview'

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'

  pod 'SentryReactNative', :path => '../node_modules/react-native-sentry'

  pod 'react-native-maps', :path => '../node_modules/react-native-maps'

  pod 'RNFS', :path => '../node_modules/react-native-fs'

  pod 'RNFirebase', :path => '../node_modules/react-native-firebase'

  pod 'react-native-document-picker', :path => '../node_modules/react-native-document-picker'

  pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'

  pod 'CodePush', :path => '../node_modules/react-native-code-push'

  pod 'react-native-branch', :path => '../node_modules/react-native-branch'

  pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.name == 'React'
        target.remove_from_project
      end
    end
  end

end

project "Canvas", "Test-Debug" => :debug, "Test-Release" => :release
@dnkoutso
Copy link
Contributor

Can you upload the .xcodeproj you are using? Either a bug in Xcodeproj or a bad value in one of the fields that is unexpected.

@dnkoutso dnkoutso added the s1:awaiting input Waiting for input from the original author label Aug 20, 2019
@tarun29061990
Copy link
Author

Now I fixed the above error by deleting some unnecessary libs from project.pbxproj file. But Now I am getting another Nanaimo error. I am using nanaimo-0.2.6
I can't upload the file as the format is not supported. SO I am pasting the error instead

Error

Nanaimo::Reader::ParseError - [!] Array missing ',' in between objects
   #  -------------------------------------------
   #  			sourceTree = "<group>";
   #  		};
263>  		5D96C02C2E854BCA87D8C9B6 /* Resources */ = {
      		                                         ^
   #  			isa = PBXGroup;
   #  			children = (
   #  -------------------------------------------

/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:284:in `raise_parser_error'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:174:in `parse_array'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:134:in `parse_object'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:132:in `parse_object'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:132:in `parse_object'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:132:in `parse_object'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:107:in `parse!'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/plist.rb:27:in `read_from_path'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project.rb:210:in `initialize_from_file'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project.rb:112:in `open'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-deintegrate-1.0.4/lib/cocoapods/command/deintegrate.rb:40:in `validate!'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:333:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

@stale stale bot removed the s1:awaiting input Waiting for input from the original author label Aug 22, 2019
@tarun29061990
Copy link
Author

Now I have fixed the above issue as well and getting the same issue again. I am uploading project.pbxproj file in txt format

   CocoaPods : 1.7.5
        Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
    RubyGems : 2.5.2.3
        Host : Mac OS X 10.14.5 (18F203)
       Xcode : 10.3 (10G8)
         Git : git version 2.20.1 (Apple Git-117)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 95234debde93214cfd40dac8bd3b444c617156ac

Plugins

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

Podfile

platform :ios, '9.0'

target 'Canvas' do
  pod 'React', :path => '../node_modules/react-native/'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'Firebase/Analytics'
  pod 'Firebase/Core', '5.18.0'
  pod 'Firebase/Messaging'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
  pod 'Firebase/RemoteConfig'
  pod 'AppAuth', '0.95.0'

  # pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'

  pod 'Branch', '0.27.0'

  pod 'react-native-webview', :path => '../node_modules/react-native-webview'

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'

  pod 'SentryReactNative', :path => '../node_modules/react-native-sentry'

  pod 'react-native-maps', :path => '../node_modules/react-native-maps'

  pod 'RNFS', :path => '../node_modules/react-native-fs'

  pod 'react-native-document-picker', :path => '../node_modules/react-native-document-picker'

  pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'

  pod 'CodePush', :path => '../node_modules/react-native-code-push'

  pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.name == 'React'
        target.remove_from_project
      end
    end
  end

end

project "Canvas", "Test-Debug" => :debug, "Test-Release" => :release

Error

RuntimeError - [Xcodeproj] Type checking error: got `PBXBuildFile` for attribute: Attribute `children` (type: `to_many`, classes: `["PBXGroup", "PBXFileReference", "PBXReferenceProxy"]`, owner class: `PBXGroup`)
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object_attributes.rb:142:in `validate_value'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object_list.rb:205:in `block in perform_additions_operations'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object_list.rb:202:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object_list.rb:202:in `perform_additions_operations'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object_list.rb:76:in `<<'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:301:in `block (2 levels) in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:299:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:296:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project.rb:271:in `new_from_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:350:in `object_with_uuid'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:300:in `block (2 levels) in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:299:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:296:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project.rb:271:in `new_from_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:350:in `object_with_uuid'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:290:in `block in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:287:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project/object.rb:287:in `configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project.rb:271:in `new_from_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project.rb:212:in `initialize_from_file'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.12.0/lib/xcodeproj/project.rb:112:in `open'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:1051:in `block (2 levels) in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:1050:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:1050:in `block in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:1045:in `inspect_targets_to_integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:100:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:398:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:221:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:220:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/command/install.rb:51:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

project.txt

@dnkoutso
Copy link
Contributor

dnkoutso commented Aug 22, 2019

Xcode itself cannot even open this file.

Screen Shot 2019-08-22 at 8 23 01 AM

You have bad references in some of your PBXGroup here's the diff:

@@ -185,8 +185,6 @@
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
-                               ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
-                               ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
                                ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */,
                                
                        );
@@ -251,12 +249,6 @@
                2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
                        isa = PBXGroup;
                        children = (
-                               ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
-                               ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
-                               
-                               
-                               B5BE338DFEF5BB1FD347E4F0 /* libPods-Canvas-tvOSTests.a */,
-                               5B2423CC7BE9B3123920AA34 /* libPods-CanvasTests.a */,
                        );
                        name = Frameworks;
                        sourceTree = "<group>";

This should make Xcode open the project and also CocoaPods can parse it properly.

Not a CocoaPods issue.

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

2 participants