capawesome-team / capacitor-mlkit

⚡️ ML Kit plugins for Capacitor. Supports Android and iOS.
https://capawesome.io/plugins/mlkit/
Apache License 2.0
147 stars 46 forks source link

bug: CDN: trunk URL couldn't be downloaded (can't sync capacitor after package install) #170

Closed loic-parent closed 4 months ago

loic-parent commented 4 months ago

Plugin(s)

Version

6.1.0

Platform(s)

Current behavior

Hello, This command npm install @capacitor-mlkit/barcode-scanning works fine but when I sync capacitor using npx cap sync, I get this error message :

✖ update ios - failed!
[error] Analyzing dependencies
[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/all_pods_versions_b_e_b.txt Response: URL using bad/illegal format or missing URL

Expected behavior

Capacitor should sync correctly without any error message.

Reproduction

https://github.com/loic-parent/capacitor-mlkit-scanner-test

Steps to reproduce

  1. Close or download a copy of this repository.
  2. Install the packages using npm install
  3. Launch the command npx cap sync
  4. See the error message in the console.

Other information

No response

Capacitor doctor

Latest Dependencies:

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

Installed Dependencies:

  @capacitor/android: not installed
  @capacitor/cli: 6.1.1
  @capacitor/core: 6.1.1
  @capacitor/ios: 6.1.1

Before submitting

loic-parent commented 4 months ago

Hello,

I finally fix this following this guide.

So :

  1. Add source 'https://github.com/CocoaPods/Specs.git' at the top of the Podfile.
  2. Delete the /ios/App/Podfile.lock
  3. Open the terminal in this folder /ios/App/
  4. Run the command pod repo remove trunk.
  5. Run the command pod install
  6. Go back to the project folder (in terminal)
  7. Run the command npx cap synx
  8. See that the command terminates well ✅

So, It was an incompatibility with the version and config of Cocoapods. I close this ticket.