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

bug: Error with Cocoapods on npx cap sync #81

Closed
loic-parent opened this issue Jan 10, 2024 · 4 comments
Closed

bug: Error with Cocoapods on npx cap sync #81

loic-parent opened this issue Jan 10, 2024 · 4 comments

Comments

@loic-parent
Copy link

Hello,

I installed the package without any error but when I launch the command npx cap sync, I get an error with Cocoapods:

LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle, 0x0009): tried:
        '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture
        (have 'arm64', need 'x86_64')),
        '/System/Volumes/Preboot/Cryptexes/OS/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle' (no such file),
        '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture
        (have 'arm64', need 'x86_64')) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle
        /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
        `require'
        /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
        `require'
        /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi.rb:5:in `rescue in <top (required)>'
        /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi.rb:2:in `<top (required)>'
        /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
        `require'
        /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
        `require'
        /Library/Ruby/Gems/2.6.0/gems/ethon-0.12.0/lib/ethon.rb:2:in `<top (required)>'
        /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
        `require'
        /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
        `require'
        /Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
        /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
        `require'
        /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
        `require'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.14.3/lib/cocoapods-core/cdn_source.rb:440:in
        `download_typhoeus_impl_async'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.14.3/lib/cocoapods-core/cdn_source.rb:372:in
        `download_and_save_with_retries_async'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.14.3/lib/cocoapods-core/cdn_source.rb:365:in
        `download_file_async'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.14.3/lib/cocoapods-core/cdn_source.rb:338:in `download_file'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.14.3/lib/cocoapods-core/cdn_source.rb:284:in
        `ensure_versions_file_loaded'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.14.3/lib/cocoapods-core/cdn_source.rb:208:in `search'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.14.3/lib/cocoapods-core/source/aggregate.rb:83:in `block in
        search'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.14.3/lib/cocoapods-core/source/aggregate.rb:83:in `select'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.14.3/lib/cocoapods-core/source/aggregate.rb:83:in `search'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/resolver.rb:385:in `find_cached_set'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/resolver.rb:165:in `search_for'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/resolver.rb:267:in `each'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/resolver.rb:267:in `sort_by'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/resolver.rb:267:in `sort_by!'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:60:in `block in
        sort_dependencies'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in
        `with_no_such_dependency_error_handling'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:59:in
        `sort_dependencies'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:in
        `require_nested_dependencies_for'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in `activate_new_spec'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
        /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/resolver.rb:94:in `resolve'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/analyzer.rb:1082:in `block in
        resolve_dependencies'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:64:in `section'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/analyzer.rb:1080:in
        `resolve_dependencies'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/analyzer.rb:125:in `analyze'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:422:in `analyze'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:64:in `section'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:162:in `install!'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/command/install.rb:52:in `run'
        /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/command.rb:52:in `run'
        /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/bin/pod:55:in `<top (required)>'
        /usr/local/bin/pod:23:in `load'
        /usr/local/bin/pod:23:in `<main>'

When I uninstall the package and run the command npx cap sync, I don't have any error.

Should I update something to use this package?

I am working on macos Sonoma 14.1.1 with an Apple M2 processor and the project is an Ionic/Capacitor project at the latest major updates.

Thanks for your help,
Loïc

@robingenz
Copy link
Member

Please provide a Minimal, Reproducible Example using this template in a public GitHub repository so I can debug the issue.
If it is not possible to create a reproducible example (e.g. because the issue is your local setup), then unfortunately there is not much I can do to help you.

@loic-parent
Copy link
Author

loic-parent commented Jan 11, 2024

Hello,
you can access the repository here.

I guess this is related to my local settings since it concerns Cocoapods but I am not very sure.
Also, if it is related to my local setting, I hope you can help me to understand what is wrong. Is it linked to the type of processor, is it linked to the version of cocoapods (1.14.3), is it linked to something else?

In any case, I only have this problem when the package is installed :/

So all you have to do to reproduce the error is install the project in local (on macos Sonoma with M2 processor) and then, run the command npx cap sync.

Thanks for your help,
Loïc

@robingenz
Copy link
Member

Unfortunately I could not reproduce your issue:

$ npx cap sync ios
[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted.
✔ Copying web assets from dist to ios/App/App/public in 4.25ms
✔ Creating capacitor.config.json in ios/App/App in 686.54μs
✔ copy ios in 9.46ms
✔ Updating iOS plugins in 799.58μs
[info] Found 3 Capacitor plugins for ios:
       @capacitor-community/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
✔ Updating iOS native dependencies with pod install in 36.00s
✔ update ios in 36.03s
[info] Sync finished in 36.239s

I am therefore closing this issue.

Also, if it is related to my local setting, I hope you can help me to understand what is wrong.

I currently have a lot of open GH issues and therefore too little time. But the following information may help you:

$ pod --version
1.14.3
$ gem --version                                    
3.5.4

@loic-parent
Copy link
Author

Hello,

Ok thank you for your test. I will check the version and try to solve it.

Regards,
Loïc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants