ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡ïļ
https://capacitorjs.com
MIT License
12.11k stars 1k forks source link

bug: Capacitor 5 `ios` fails #6579

Closed AmitMY closed 1 year ago

AmitMY commented 1 year ago

Bug Report

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 5.0.1
  @capacitor/core: 5.0.1
  @capacitor/android: 5.0.1
  @capacitor/ios: 5.0.1

Installed Dependencies:

  @capacitor/cli: 5.0.1
  @capacitor/core: 5.0.1
  @capacitor/android: 5.0.1
  @capacitor/ios: 5.0.1

[success] iOS looking great! 👌
[success] Android looking great! 👌

Platform(s)

iOS

Current Behavior

Running npx cap sync ios fails

✔ Copying web assets from browser to ios/App/App/public in 1.13s
✔ Creating capacitor.config.json in ios/App/App in 708.54ξs
✔ copy ios in 1.16s
✔ Updating iOS plugins in 7.60ms
[info] Found 9 Capacitor plugins for ios:
       @capacitor-firebase/analytics@5.0.0
       @capacitor-firebase/app@5.0.0
       @capacitor-firebase/crashlytics@5.0.0
       @capacitor-firebase/performance@5.0.0
       @capacitor/filesystem@5.0.1
       @capacitor/keyboard@5.0.1
       @capacitor/share@5.0.1
       @capacitor/splash-screen@5.0.1
       capacitor-blob-writer@1.1.10
✖ Updating iOS native dependencies with bundle exec pod install - failed!
✖ update ios - failed!
[error] /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.16/lib/bundler/definition.rb:484:in `materialize': Could not find
        fastlane-2.207.0, CFPropertyList-3.0.5, addressable-2.8.0, artifactory-3.0.15, aws-sdk-s3-1.114.0, babosa-1.0.4,
        colored-1.2, commander-4.6.0, dotenv-2.7.6, emoji_regex-3.2.3, excon-0.92.3, faraday-1.10.0,
        faraday-cookie_jar-0.0.7, faraday_middleware-1.2.0, fastimage-2.2.6, google-apis-androidpublisher_v3-0.24.0,
        google-apis-playcustomapp_v1-0.10.0, google-cloud-storage-1.37.0, highline-2.0.3, json-2.6.2, jwt-2.4.1,
        mini_magick-4.11.0, multipart-post-2.0.0, naturally-2.2.1, optparse-0.1.1, plist-3.6.0, rubyzip-2.3.2,
        security-0.1.3, simctl-1.6.8, terminal-notifier-2.0.0, terminal-table-1.8.0, tty-screen-0.8.1,
        tty-spinner-0.9.3, word_wrap-1.0.0, xcpretty-0.3.0, xcpretty-travis-formatter-1.0.1, aws-sdk-core-3.131.2,
        aws-sdk-kms-1.57.0, aws-sigv4-1.5.0, faraday-em_http-1.0.0, faraday-em_synchrony-1.0.0, faraday-excon-1.1.0,
        faraday-httpclient-1.0.1, faraday-multipart-1.0.4, faraday-net_http-1.0.1, faraday-net_http_persistent-1.2.0,
        faraday-patron-1.0.0, faraday-rack-1.0.0, faraday-retry-1.0.3, http-cookie-1.0.5, google-apis-core-0.7.0,
        digest-crc-0.6.4, google-apis-iamcredentials_v1-0.13.0, google-apis-storage_v1-0.17.0, google-cloud-core-1.6.0,
        googleauth-1.2.0, mini_mime-1.1.2, unicode-display_width-1.8.0, tty-cursor-0.7.1, rouge-2.0.7,
        aws-eventstream-1.2.0, aws-partitions-1.603.0, jmespath-1.6.1, domain_name-0.5.20190701, representable-3.2.0,
        retriable-3.1.2, webrick-1.7.0, google-cloud-env-1.6.0, google-cloud-errors-1.2.0, memoist-0.16.2,
        multi_json-1.15.0, os-1.1.4, signet-0.17.0, unf-0.1.4, declarative-0.0.20, trailblazer-option-0.1.2, uber-0.1.0,
        unf_ext-0.0.8.2 in any of the sources (Bundler::GemNotFound)
        from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.16/lib/bundler/definition.rb:191:in `specs'
        from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.16/lib/bundler/definition.rb:239:in `specs_for'
        from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.16/lib/bundler/runtime.rb:18:in `setup'
        from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.16/lib/bundler.rb:162:in `setup'
        from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.16/lib/bundler/setup.rb:20:in `block in <top (required)>'
        from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.16/lib/bundler/ui/shell.rb:136:in `with_level'
        from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.16/lib/bundler/ui/shell.rb:88:in `silence'
        from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.16/lib/bundler/setup.rb:20:in `<top (required)>'
        from <internal:/opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in
        `require'
        from <internal:/opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in
        `require'

Expected Behavior

Should work just fine

Code Reproduction

I have no idea how to reproduce. Here's the upgrade commit: https://github.com/sign/translate/tree/69b9f00cab52edb3f5a5b48a7a6bdb5047fa7eb0 (npx cap migrate)

Other Technical Details

npm --version output: 9.5.0

node --version output: v18.15.0

pod --version output (iOS issues only): 1.12.1

jcesarmobile commented 1 year ago

Capacitor 5 added support for bundler. To be honest, I'm not sure how bundler works, but you have a Gemfile inside ios/App/ folder and that seems to be causing the issues, and didn't cause issues in Capacitor 4 because it didn't use bundler. If I remove the file the error I get goes away, so it's most likely something wrong with that file.

markemer commented 1 year ago

Adding Cocoapods to your Gemfile or deleting it if you don't use bundler ought to fix this. I'm going to look into the logic we have about running bundler in the meantime.

AmitMY commented 1 year ago

Deleting the Gemfile did the trick - this can be closed, or kept open if @markemer is still investigating. Thanks!

markemer commented 1 year ago

Deleting the Gemfile did the trick - this can be closed, or kept open if @markemer is still investigating.

Thanks!

Awesome. We can close it. I'll investigate on a separate ticket we can schedule this or next sprint.

ionitron-bot[bot] commented 1 year ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.