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

use_expo_modules! causes Invalid Podfile file: wrong number of arguments (given 2, expect 1) #14983

Closed
chiubaka opened this issue Nov 1, 2021 · 2 comments
Labels
needs validation Issue needs to be validated

Comments

@chiubaka
Copy link

chiubaka commented Nov 1, 2021

Summary

While attempting to upgrade to Expo SDK 43 in a bare workflow project, I'm having trouble running pod install with the new Podfile. It seems like use_expo_modules! is running some internal Expo code that is then receiving an unexpected number of arguments.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

bare

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

43.0.0

Environment

Expo CLI 4.12.10 environment info:
System:
OS: macOS 11.5.2
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v12.18.3/bin/yarn
npm: 6.14.6 - ~/.nvm/versions/node/v12.18.3/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.2 - /Users/dchiu/.rvm/gems/ruby-2.5.3/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
Android SDK:
API Levels: 28, 29, 30, 31
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0
System Images: android-26 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7784292
Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
npmPackages:
expo: ~43.0.0 => 43.0.1
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-native: 0.64.2 => 0.64.2
react-native-web: 0.17.1 => 0.17.1
npmGlobalPackages:
expo-cli: 4.12.10
Expo Workflow: bare

Reproducible demo or steps to reproduce from a blank project

  1. Create a new expo project. expo init example
  2. Eject the project. cd example && expo eject
  3. Attempt to run pod install in the ios/ directory

Observe that pod install fails with the following output:

[!] Invalid `Podfile` file: wrong number of arguments (given 2, expected 1).

 #  from /Users/dchiu/Developer/template/ios/Podfile:11
 #  -------------------------------------------
 #  target 'template' do
 >    use_expo_modules!
 #    config = use_native_modules!
 #  -------------------------------------------

Further investigation reveals that use_expo_modules! itself is being called, and that during this call if @current_target_definition.autolinking_manager.present? is false, so a new Expo::AutolinkingManager is being instantiated. Somewhere in this process, a wrong number of arguments exception is being thrown.

@chiubaka chiubaka added the needs validation Issue needs to be validated label Nov 1, 2021
@chiubaka
Copy link
Author

chiubaka commented Nov 1, 2021

I suspect this was happening due to an outdated version of ruby installed on my system. I upgraded to ruby 3.0.0 using rvm, and subsequently also updated rubygems (gem update --system) and cocoapods (gem update cocoapods). No longer receiving the wrong number of arguments error.

@chiubaka chiubaka closed this as completed Nov 1, 2021
@Joel-Mercier
Copy link

This was really helpful ! Thanks !

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

No branches or pull requests

2 participants