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: Unable to load contents of file list: '/Target Support Files/Pods-xxx/Pods-xxx-frameworks-Debug-input-files.xcfilelist' (in target 'xxx') #1

Closed
vanessaaleung opened this issue May 16, 2019 · 31 comments

Comments

@vanessaaleung
Copy link

vanessaaleung commented May 16, 2019

Hi I got this error when trying to integrate Unity in my own project.

XCode Version 10.2.1

error: Unable to load contents of file list: '/Target Support Files/Pods-SMarket/Pods-SMarket-frameworks-Debug-input-files.xcfilelist' (in target 'SMarket')

error: Unable to load contents of file list: '/Target Support Files/Pods-SMarket/Pods-SMarket-frameworks-Debug-output-files.xcfilelist' (in target 'SMarket')

error: Unable to load contents of file list: '/Target Support Files/Pods-SMarket/Pods-SMarket-resources-Debug-input-files.xcfilelist' (in target 'SMarket')

error: Unable to load contents of file list: '/Target Support Files/Pods-SMarket/Pods-SMarket-resources-Debug-output-files.xcfilelist' (in target 'SMarket')

My Target -> Build Phases:
Screen Shot 2019-05-16 at 1 27 51 PM

[CP] Copy Pods Resources
Screen Shot 2019-05-16 at 1 29 24 PM

[CP] Embed Pods Frameworks
Screen Shot 2019-05-16 at 1 29 29 PM

I tried this solution /clean and rebuild the project, still failed, do you have any idea about this?

@vanessaaleung
Copy link
Author

I found out under [CP] Embed Pods Frameworks and [CP] Copy Pods Resources, there're input files and output files sections. Just deleted files in those sections, and it works.

But I still have no idea why this error is generated.

@yuhao-git-star
Copy link

you can use pod cache clean --all is work for me.

@P-B1101
Copy link

P-B1101 commented Nov 4, 2020

i did delete those files and then i get error that wants me to run pod install. after that those files came back and this cycle continue :(
also pod cache clean --all not helping

@PrajapatiAman
Copy link

@P-B1101
I am stuck in same cycle. did you get any solution ?

@P-B1101
Copy link

P-B1101 commented Jan 11, 2022

Sorry, I don't remember what was the issue at all. :((

@ldlefebvre
Copy link

I am currently stuck on this as well, would love an answer for that. I'm getting the following error:
"The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation."
I've been trying to delete cocoapods to move to the SDK package manager

@ldlefebvre
Copy link

Got it to work, this is the workaround

Switch from Cocoapods to SDK Package Manager
Delete the 2 profile and profile.lock files in the folder location of your project
Delete the .xcodeproj version of the file
Open the normal version of the file
Delete the Pod and Framework files
Empty the trash bin

In terminal run the following 2:
HomeBrew uninstall:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
Cocoapods removal:
gem list --local | grep cocoapods
Remove cocopods with the version you have
By example, to remove cocopods version 1.9.3 I used this command:
sudo gem uninstall cocoapods -v 1.9.3
(Note: sudo will ask for your administrator password.)

1- Go to your project's target, -> Build Phases -> Delete [CP] Copy Pods Resources.

Delete [CP] Embed Pods Frameworks

(Delete it with the x on the right side of the screen)

@brothersjuniors
Copy link

I found out under [CP] Embed Pods Frameworks and [CP] Copy Pods Resources, there're input files and output files sections. Just deleted files in those sections, and it works.

But I still have no idea why this error is generated.

Please teach me more detail,how to do?

@bombillazo
Copy link

Like others have mentioned, deleting those input/output files don't solve the issue since they come back as soon as pod install is run once again.

@chuonglam
Copy link

I found out under [CP] Embed Pods Frameworks and [CP] Copy Pods Resources, there're input files and output files sections. Just deleted files in those sections, and it works.

But I still have no idea why this error is generated.

this works for me. thanks

@sercangoger
Copy link

pod cache clean --all

arch -x86_64 pod install

@bobokhon7
Copy link

pod cache clean --all

arch -x86_64 pod install

Thanks, I spent 3 hours to fix this problem. you saved my time.

@dafecodes
Copy link

pod cache clean --all

arch -x86_64 pod install

This works perfectly. Many thanks @bobokhon7
Ensure you run this on the root of the iOS folder where you have the Podfile.

@Deryan98
Copy link

Deryan98 commented Oct 11, 2022

I was merging a branch, just went to the pod file and tried to install pods, this drove me in to this issue.

What I did to fix it (React Native only)?

follow this steps:

  1. delete yarn.lock
  2. delete node_modules folder
  3. run yarn
  4. go to the ios folder
  5. delete Podfile.lock
  6. delete Pods folder
  7. run pod install

The issue is gone!

@AkshayKlar
Copy link

AkshayKlar commented Oct 19, 2022

I fixed it using the correct version of flutter which matching with my project dependency. I used the latest version of a flutter but my project is not supporting that version so downgrade the version and the issue is resolved.

@Jitendra077
Copy link

not worked for me :(

@Jitendra077
Copy link

can anyone help me out with this error ?

@makleso6
Copy link

@Jitendra077 Hi. setting flag "-c" with my custom scheme works for me (if your project contains different configurations)

@chitraarasu
Copy link

Screenshot 2023-04-01 at 8 25 17 AM

I fixed this error by deleting input files and output files

#1 (comment)
this answer helped me to fix this
Thank you @vanessaaleung

@Gaberoids
Copy link

@chitraarasu
How do I get to this "runner" UI that you have in the screenshot?

Screenshot 2023-04-01 at 8 25 17 AM

I fixed this error by deleting input files and output files

#1 (comment) this answer helped me to fix this Thank you @vanessaaleung

@chitraarasu how do I get to this UI you have in the screen shot above?

@Gaberoids
Copy link

I found out under [CP] Embed Pods Frameworks and [CP] Copy Pods Resources, there're input files and output files sections. Just deleted files in those sections, and it works.

But I still have no idea why this error is generated.

how do I delete these files?

@Gaberoids
Copy link

@Jitendra077 Hi. setting flag "-c" with my custom scheme works for me (if your project contains different configurations)

how do I do this?

@ndbac
Copy link

ndbac commented Jul 1, 2023

@Gaberoids go to your *.xcodeproj file on ios folder, there are several lines that start with [CP] Embed Pods Frameworks and [CP] Copy Pods Resources, just delete it. *Noted this solution will not gonna work, because it will automatically generate when run pod install

@jfcuylits
Copy link

For me with flutter, I fixed the problem by adding in ios/Flutter/Debug.xcconfig:
#include? "Pods/Target Support Files/Pods-xxx/Pods-xxx.debug.xcconfig"

@jrikhof
Copy link

jrikhof commented Jul 17, 2023

I faced this issue after renaming my configuration. Found out renaming the configuration doesn't change the active build configuration on the scheme. After updating this manually for Run/Test/Profile/Analyze/Archive it worked again.

@yedi97
Copy link

yedi97 commented Aug 7, 2023

can anyone help me out with this error ?

@dhruv036
Copy link

Tried everything not happening.

@ilikerb0407
Copy link

I use pod install and it works for me

@arthurgeron
Copy link

arthurgeron commented Oct 5, 2023

For anyone still having this problem, it can be quite complicated to fix, but I've come to a solution after some steps.

This issue usually occurs in CI/CD platforms, where they might use different versions and version managers for cocoapods, ruby, etc.

Does this guide apply to your current issue?

Take a look at your "pod install" output; Sometimes it exits with a 0 while still having errors occur during the install, leading to further issues. Mine had an error that indicated conflicting ruby versions, which caused the error during build/archive.

TL;DR:

I had to correct the ruby-version to 2.7.6 in both Gemfile and .ruby-version (for my react-native project), and set the proper version via asdf on Bitrise CI/CD using a script to detect/fix conflicting versions or missing executables.

Warning: Required ruby version is specific to each framework/project, don't blindly set yours to 2.7.6, 2.7.x is just the version that fixes compatibility issues with nokogiri on my RN project.

Steps to glory

Make sure your Gemfile contains version instructions, for example:

source 'https://rubygems.org'

ruby ">= 2.7.6"

gem 'cocoapods', '~> 1.12'

Same here, make sure your desired ruby version is specified in .ruby-version

root of project, or in ios folder for RN projects:

2.7.6

Add a bash script in your ci before pod install

IMPORTANT:

  • There are different ruby version managers (e.g. rbenv, asdf), check which one is being used, the script below assumes rbenv is used (asdf example available below)
  • Check if the .ruby-version path is correct
EXPECTED_VERSION=$(cat ios/.ruby-version)

if rbenv versions --bare | grep -q "^${EXPECTED_VERSION}\$";
then
    echo "Ruby ${EXPECTED_VERSION} is already installed."
else 
    echo "Ruby ${EXPECTED_VERSION} is not installed. Installing now..."
    # Install the required Ruby version
    rbenv install "$EXPECTED_VERSION"
fi

# Check if the current Ruby version is the expected version
CURRENT_VERSION=$(rbenv version-name)
if [ "$CURRENT_VERSION" != "$EXPECTED_VERSION" ];
then
    echo "Current Ruby version is not ${EXPECTED_VERSION}. Switching now..."
    # Set the required Ruby version as the global version
    rbenv global "$EXPECTED_VERSION"
else
    echo "Current Ruby version is already ${EXPECTED_VERSION}."
fi

Above script's if/else part but with asdf instead of rbenv:

# Check if the required Ruby version is installed
if asdf list ruby | grep -q "^${EXPECTED_VERSION}$"; then
    print_green "Ruby ${EXPECTED_VERSION} is already installed."
else
    print_red "Ruby ${EXPECTED_VERSION} is not installed. Installing now..."
    # Install the required Ruby version
    asdf install ruby "$EXPECTED_VERSION"
fi

# Check if the current shell Ruby version is the expected version
CURRENT_VERSION=$(asdf current ruby)
if [ "${CURRENT_VERSION%% *}" != "$EXPECTED_VERSION" ]; then
    print_red "Current Ruby version is not ${EXPECTED_VERSION}. Switching now..."
    # Set the required Ruby version as the global version
    asdf global ruby "$EXPECTED_VERSION"
    print_green "Switched to Ruby ${EXPECTED_VERSION}."
else
    print_green "Current Ruby version is already ${EXPECTED_VERSION}."
fi

ActiveSupport

You might also be getting activesupport errors, make sure the proper gem version is installed, might also want to define it in gemfile, ex:

Gemfile:

# append this to the end of the file
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'

Script before pod-install

Can be same one used to fix the ruby version:

# Check activesupport version
if ! gem list activesupport -i '>= 6.1.7.3', '< 7.1.0'; then
  echo "activesupport version incorrect, installing the correct version..."
  gem uninstall -aIx activesupport
  gem install activesupport -v 6.1.7.3
  echo "activesupport 6.1.7.3 installed."
else
  echo "Correct version of activesupport is already installed."
fi

Error examples

Some errors that were fixed by following the steps described above

Pod install (passing, with error):

First Example:

$  cd ios && pod install --repo-update ; cd .. --verbose
/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/activesupport-7.1.0/lib/active_support/core_ext/array/conversions.rb:108:in `<class:Array>'\'': undefined method `deprecator'\'' for ActiveSupport:Module (NoMethodError)
  deprecate to_default_s: :to_s, deprecator: ActiveSupport.deprecator
                                                          ^^^^^^^^^^^
Did you mean?  deprecate_constant
	from /Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/activesupport-7.1.0/lib/active_support/core_ext/array/conversions.rb:8:in `<top (required)>'\''
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'\''
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'\''
	from /Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.13.0/lib/cocoapods.rb:9:in `<top (required)>'\''
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'\''
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'\''
	from /Users/vagrant/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/cocoapods-1.13.0/bin/pod:36:in `<top (required)>'\''
	from /Users/vagrant/.asdf/installs/ruby/3.2.2/bin/pod:25:in `load'\''
	from /Users/vagrant/.asdf/installs/ruby/3.2.2/bin/pod:25:in `<main>'\''
Done in 0.30s.'
+ '[' 0 -ne 0 ']'

Second Example:

$  cd ios && pod install --repo-update ; cd .. --verbose
No preset version installed for command pod
Please install a version by running one of the following:
asdf install ruby 2.7.6
or add one of the following versions in your config file at /Users/vagrant/.tool-versions
ruby 3
ruby 3.0
ruby 3.0.0
ruby 3.0.3
ruby 3.1
ruby 3.1.3
ruby 3.1.4
ruby 3.2
ruby 3.2.1
ruby 3.2.2
Done in 0.20s.'
+ '[' 0 -ne 0 ']'

During Archieve/Build:

error: Unable to load contents of file list: '/Target Support Files/Pods-ShareExtension/Pods-ShareExtension-resources-Release-input-files.xcfilelist' (in target 'ShareExtension' from project 'Redacted')

During gem install:

ERROR:  Error installing rails:
	The last version of nokogiri (>= 1.8.5) to support your Ruby & RubyGems was 1.13.10. Try installing it with `gem install nokogiri -v 1.13.10` and then running the current command again
	nokogiri requires Ruby version >= 2.7, < 3.3.dev. The current ruby version is 2.6.10.210.

That's a lot of information! But those steps really were what fixed those issues for me; hope it helps whoever comes across it.

@zLuoManhwas
Copy link

zLuoManhwas commented Nov 8, 2023

The solution is this: go to the project from your terminal or your IDE and navigate to the iOS folder of your Flutter project:

In Terminal, make sure you are in the root of your Flutter project and then navigate to the ios folder:

Copy code:
ios cd
Verify the existence of the Pods folder:

Once inside the ios folder, verify that the Pods folder and related files exist by running ls:

Copy code:

ls -la
If you don't see a Pods folder, it's likely that you need to install CocoaPods or it may not have been running correctly.

Run pod install:

If the Pods folder is present but you continue to have problems, try installing the dependencies again with CocoaPods:

Copy code:
pod install

Or if that doesn't work, you can try reinstalling the dependencies:

Copy code:
pod deintegrate
pod install

This should regenerate the necessary configuration files, including the .xcfilelist ones.

Verify .xcfilelist files:

If pod install ran without errors, the .xcfilelist files should be in the Pods/Target Support Files/Pods-Runner folder. You can verify this with the find command:

Copy code:
find . -name "*.xcfilelist"
You should see the files listed.

Clean the project:

These issues can often be resolved by cleaning up the Xcode project and workspace. You can do this from Xcode by selecting Product > Clean Build Folder, or using the shortcut Shift + Command + K.

Close and reopen Xcode:

After cleaning the project, close Xcode completely and reopen the .xcworkspace file generated by CocoaPods.

Review Build Phases settings:

If the above steps don't work, check your Build Phases settings in Xcode and make sure your scripts are pointing to the correct .xcfilelist files.

@melisa002
Copy link

pod cache clean --all

arch -x86_64 pod install

This saved my lifee !! I had been trying to fix the error for a full day.

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