CapacitorGoogleAuth icon indicating copy to clipboard operation
CapacitorGoogleAuth copied to clipboard

Pods dependencies conflict with capacitor-mlkit/barcode-scanning plugin

Open sertal70 opened this issue 1 year ago • 3 comments

After installing the latest release of this plugin, the npx cap update command results in error during the pod install phase, see the following output:

$ npx cap update                                     
✔ Updating Android plugins in 20.59ms
[info] Found 14 Capacitor plugins for android:
       @capacitor-community/[email protected]
       @capacitor-community/[email protected]
       @capacitor-mlkit/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @codetrix-studio/[email protected]
       [email protected]
✔ update android in 98.62ms
✔ Updating iOS plugins in 5.43ms
✖ Updating iOS native dependencies with pod install - failed!
✖ update ios - failed!
[error] Analyzing dependencies
        [!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
        In snapshot (Podfile.lock):
        GTMSessionFetcher/Core (< 4.0, = 3.4.1, >= 1.1)
        
        In Podfile:
        CodetrixStudioCapacitorGoogleAuth (from `../../node_modules/@codetrix-studio/capacitor-google-auth`) was
        resolved to 0.0.1, which depends on
        GoogleSignIn (~> 6.2.4) was resolved to 6.2.4, which depends on
        GTMSessionFetcher/Core (< 3.0, >= 1.1)
        
        
        You have either:
        * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
        * changed the constraints of dependency `GTMSessionFetcher/Core` inside your development pod
        `CodetrixStudioCapacitorGoogleAuth`.
        You should run `pod update GTMSessionFetcher/Core` to apply changes you've made.

This is because both CapacitorGoogleAuth and capacitor-mlkit/barcode-scanning depends on GTMSessionFetcher/Core pod. Actually CapacitorGoogleAuth depends on it indirectly, through GoogleSignIn v6.2.4, which is an older release the lastest being v7.1.0. Could the plugin dependency be updated to GoogleSignIn v7 in order to eliminate the compatibility issue?

If not, do you have any suggestion/workaround I can apply to my project to make these two plugin cohesist?

sertal70 avatar Jun 24 '24 16:06 sertal70

Hey i'm facing the same issue. Did you find any workaround for this? It seems like there is not going to be a response from the devs.

rafael-rentman avatar Oct 17 '24 09:10 rafael-rentman

@rafael-rentman in the lack of answers I decided to stick capacitor-mlkit/barcode-scanning on v5.4.0 so that shared dependencies didn't clash. Maybe there is a better solution, but I didn't have time to explore for it

sertal70 avatar Oct 17 '24 16:10 sertal70

@sertal70 I have opened a PR that updates the GoogleSignIn dependency to v7.1.0 Maybe this also works for your setup https://github.com/CodetrixStudio/CapacitorGoogleAuth/pull/403

rafael-rentman avatar Oct 18 '24 13:10 rafael-rentman