Hello,
i have an app with Ionic 7 and Angular.
Initially it always worked. At a certain point it started giving me the following error when I launch this command: ionic capacitor sync iOS.
Error below:
[capacitor] update ios - failed!
[capacitor] [error] Analyzing dependencies
[capacitor] Downloading dependencies
[capacitor] Installing Capacitor (5.0.3)
[capacitor] Installing CapacitorApp (5.0.8)
[capacitor] Installing CapacitorCordova (5.0.3)
[capacitor] Installing CapacitorDevice (5.0.8)
[capacitor] Installing CapacitorHaptics (5.0.8)
[capacitor] Installing CapacitorKeyboard (5.0.9)
[capacitor] Installing CapacitorPreferences (5.0.8)
[capacitor] Installing CapacitorPushNotifications (5.1.2)
[capacitor] Installing CapacitorStatusBar (5.0.8)
[capacitor] Installing CapacitorTextZoom (5.0.8)
[capacitor] Installing CordovaPlugins (5.7.6)
[capacitor] Generating Pods project
[capacitor] Integrating client project
[capacitor]
[capacitor] ――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[capacitor]
[capacitor] ### Command
[capacitor]
[capacitor] [capacitor] /usr/local/bin/pod install [capacitor]
[capacitor]
[capacitor] ### Report
[capacitor]
[capacitor] * What did you do?
[capacitor]
[capacitor] * What did you expect to happen?
[capacitor]
[capacitor] * What happened instead?
[capacitor]
[capacitor]
[capacitor] ### Stack
[capacitor]
[capacitor] [capacitor] CocoaPods : 1.15.2 [capacitor] Ruby : ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22] [capacitor] RubyGems : 3.0.3.1 [capacitor] Host : macOS 13.6.7 (22G720) [capacitor] Xcode : 15.2 (15C500b) [capacitor] Git : git version 2.39.3 (Apple Git-145) [capacitor] Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib [capacitor] Repositories : trunk - CDN - https://cdn.cocoapods.org/ [capacitor]
[capacitor]
[capacitor] ### Plugins
[capacitor]
[capacitor] [capacitor] cocoapods-deintegrate : 1.0.5 [capacitor] cocoapods-plugins : 1.0.0 [capacitor] cocoapods-search : 1.0.1 [capacitor] cocoapods-trunk : 1.6.0 [capacitor] cocoapods-try : 1.2.0 [capacitor]
[capacitor]
[capacitor] ### Podfile
[capacitor]
[capacitor] ruby [capacitor] require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers' [capacitor] [capacitor] platform :ios, '13.0' [capacitor] use_frameworks! [capacitor] [capacitor] # workaround to avoid Xcode caching of Pods that requires [capacitor] # Product -> Clean Build Folder after new Cordova plugins installed [capacitor] # Requires CocoaPods 1.6 or newer [capacitor] install! 'cocoapods', :disable_input_output_paths => true [capacitor] [capacitor] def capacitor_pods [capacitor] pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' [capacitor] pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' [capacitor] pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app' [capacitor] pod 'CapacitorDevice', :path => '../../node_modules/@capacitor/device' [capacitor] pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics' [capacitor] pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard' [capacitor] pod 'CapacitorPreferences', :path => '../../node_modules/@capacitor/preferences' [capacitor] pod 'CapacitorPushNotifications', :path => '../../node_modules/@capacitor/push-notifications' [capacitor] pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar' [capacitor] pod 'CapacitorTextZoom', :path => '../../node_modules/@capacitor/text-zoom' [capacitor] pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins' [capacitor] end [capacitor] [capacitor] target 'App' do [capacitor] capacitor_pods [capacitor] # Add your Pods here [capacitor] end [capacitor] [capacitor] post_install do |installer| [capacitor] assertDeploymentTarget(installer) [capacitor] end [capacitor]
[capacitor]
[capacitor] ### Error
[capacitor]
[capacitor] [capacitor] REXML::ParseException - #<TypeError: wrong argument type String (expected Regexp)> [capacitor] /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/source.rb:220:in `scan' [capacitor] /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/source.rb:220:in `match' [capacitor] /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/baseparser.rb:227:in `pull_event' [capacitor] /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/baseparser.rb:207:in `pull' [capacitor] /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/treeparser.rb:23:in `parse' [capacitor] /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/document.rb:448:in `build' [capacitor] /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/document.rb:101:in `initialize' [capacitor] /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:83:in `new' [capacitor] /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:83:in `from_s' [capacitor] /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:66:in `new_from_xcworkspace' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/user_project_integrator.rb:102:in `create_workspace' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/user_project_integrator.rb:71:in `integrate!' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:929:in `block in integrate_user_project' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in `section' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:925:in `integrate_user_project' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:185:in `integrate' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:170:in `install!' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in `run' [capacitor] /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/bin/pod:55:in `<top (required)>' [capacitor] /usr/local/bin/pod:23:in `load' [capacitor] /usr/local/bin/pod:23:in `<main>' [capacitor] ... [capacitor] wrong argument type String (expected Regexp) [capacitor] Line: 1 [capacitor] Position: 38 [capacitor] Last 80 unconsumed characters: [capacitor] <?xml version="1.0" encoding="UTF-8"?> [capacitor] /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/treeparser.rb:96:in `rescue in parse' [capacitor] /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/parsers/treeparser.rb:21:in `parse' [capacitor] /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/document.rb:448:in `build' [capacitor] /Library/Ruby/Gems/2.6.0/gems/rexml-3.2.9/lib/rexml/document.rb:101:in `initialize' [capacitor] /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:83:in `new' [capacitor] /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:83:in `from_s' [capacitor] /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.24.0/lib/xcodeproj/workspace.rb:66:in `new_from_xcworkspace' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/user_project_integrator.rb:102:in `create_workspace' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/user_project_integrator.rb:71:in `integrate!' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:929:in `block in integrate_user_project' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in `section' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:925:in `integrate_user_project' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:185:in `integrate' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:170:in `install!' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in `run' [capacitor] /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run' [capacitor] /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.15.2/bin/pod:55:in `<top (required)>' [capacitor] /usr/local/bin/pod:23:in `load' [capacitor] /usr/local/bin/pod:23:in `<main>' [capacitor]
[capacitor]
[capacitor] ――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[capacitor]
[capacitor] [!] Oh no, an error occurred.
[capacitor]
[capacitor] Search for existing GitHub issues similar to yours:
[capacitor] xxxxxxgithubxxxxcom/CocoaPods/CocoaPods/search?q=%23%3CTypeError%3A+wrong+argument+type+String+%28expected+Regexp%29%3E%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Frexml-3.2.9%2Flib%2Frexml%2Fsource.rb%3A220%3Ain+%60scan%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Frexml-3.2.9%2Flib%2Frexml%2Fsource.rb%3A220%3Ain+%60match%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Frexml-3.2.9%2Flib%2Frexml%2Fparsers%2Fbaseparser.rb%3A227%3Ain+%60pull_event%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Frexml-3.2.9%2Flib%2Frexml%2Fparsers%2Fbaseparser.rb%3A207%3Ain+%60pull%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Frexml-3.2.9%2Flib%2Frexml%2Fparsers%2Ftreeparser.rb%3A23%3Ain+%60parse%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Frexml-3.2.9%2Flib%2Frexml%2Fdocument.rb%3A448%3Ain+%60build%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Frexml-3.2.9%2Flib%2Frexml%2Fdocument.rb%3A101%3Ain+%60initialize%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fxcodeproj-1.24.0%2Flib%2Fxcodeproj%2Fworkspace.rb%3A83%3Ain+%60new%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fxcodeproj-1.24.0%2Flib%2Fxcodeproj%2Fworkspace.rb%3A83%3Ain+%60from_s%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fxcodeproj-1.24.0%2Flib%2Fxcodeproj%2Fworkspace.rb%3A66%3Ain+%60new_from_xcworkspace%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fcocoapods-1.15.2%2Flib%2Fcocoapods%2Finstaller%2Fuser_project_integrator.rb%3A102%3Ain+%60create_workspace%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fcocoapods-1.15.2%2Flib%2Fcocoapods%2Finstaller%2Fuser_project_integrator.rb%3A71%3Ain+%60integrate%21%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fcocoapods-1.15.2%2Flib%2Fcocoapods%2Finstaller.rb%3A929%3Ain+%60block+in+integrate_user_project%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fcocoapods-1.15.2%2Flib%2Fcocoapods%2Fuser_interface.rb%3A64%3Ain+%60section%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fcocoapods-1.15.2%2Flib%2Fcocoapods%2Finstaller.rb%3A925%3Ain+%60integrate_user_project%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fcocoapods-1.15.2%2Flib%2Fcocoapods%2Finstaller.rb%3A185%3Ain+%60integrate%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fcocoapods-1.15.2%2Flib%2Fcocoapods%2Finstaller.rb%3A170%3Ain+%60install%21%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fcocoapods-1.15.2%2Flib%2Fcocoapods%2Fcommand%2Finstall.rb%3A52%3Ain+%60run%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fclaide-1.1.0%2Flib%2Fclaide%2Fcommand.rb%3A334%3Ain+%60run%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fcocoapods-1.15.2%2Flib%2Fcocoapods%2Fcommand.rb%3A52%3Ain+%60run%27%0A%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fcocoapods-1.15.2%2Fbin%2Fpod%3A55%3Ain+%60%3Ctop+%28required%29%3E%27%0A%2Fusr%2Flocal%2Fbin%2Fpod%3A23%3Ain+%60load%27%0A%2Fusr%2Flocal%2Fbin%2Fpod%3A23%3Ain+%60%3Cmain%3E%27%0A…%0Awrong+argument+type+String+%28expected+Regexp%29%0ALine%3A+1%0APosition%3A+38%0ALast+80+unconsumed+characters%3A%0A%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E&type=Issues
[capacitor]
[capacitor] If none exists, create a ticket, with the template displayed above, on:
[capacitor]
[capacitor]
[capacitor] Be sure to first read the contributing guide for details on how to properly submit a ticket:
[capacitor]
[capacitor]
[capacitor] Don’t forget to anonymize any private data!
[capacitor]
[capacitor] Searching for inspections failed: undefined method `map’ for nil:NilClass
[capacitor] Looking for related issues on cocoapods/cocoapods…
[capacitor]
[ERROR] An error occurred while running subprocess capacitor.
capacitor sync ios exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
I have updated the Ruby version but Ionic read the 2.6.x version but bot 2.7.8 or 3.1.6 on system.
Whit this command I have multiple directory:
which -a ruby
/Users/xxx/.rbenv/shims/ruby
/Users/xxx/.rbenv/shims/ruby
/usr/bin/ruby
/Users/xxx/.rbenv/shims/ruby
What is it the problem?
Thanks in advance.