Could not resolve com.google.android.gms:play-services-auth:18.+
Since few days I'm getting the following error while gradle build
> Could not resolve all files for configuration ':app:stagingDebugRuntimeClasspath'.
> Could not resolve com.google.android.gms:play-services-auth:18.+.
Required by:
project :app > project :codetrix-studio-capacitor-google-auth
> Failed to list versions for com.google.android.gms:play-services-auth.
> Unable to load Maven meta-data from https://dl.bintray.com/ionic-team/capacitor/com/google/android/gms/play-services-auth/maven-metadata.xml.
> Could not GET 'https://dl.bintray.com/ionic-team/capacitor/com/google/android/gms/play-services-auth/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
I'm using @codetrix-studio/[email protected]
Any idea how to solve this?
When I try to access to https://dl.bintray.com/, I got a 502 bad gateway. It seems to be related to dl.bintray.com https://isdown.app/integrations/bintray
Le ven. 17 déc. 2021 à 08:56, black-hawk85 @.***> a écrit :
Since few days I'm getting the following error while gradle build
Could not resolve all files for configuration ':app:stagingDebugRuntimeClasspath'. Could not resolve com.google.android.gms:play-services-auth:18.+. Required by: project :app > project :codetrix-studio-capacitor-google-auth > Failed to list versions for com.google.android.gms:play-services-auth. > Unable to load Maven meta-data from https://dl.bintray.com/ionic-team/capacitor/com/google/android/gms/play-services-auth/maven-metadata.xml. > Could not GET 'https://dl.bintray.com/ionic-team/capacitor/com/google/android/gms/play-services-auth/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
I'm using @@.***
Any idea how to solve this?
— Reply to this email directly, view it on GitHub https://github.com/CodetrixStudio/CapacitorGoogleAuth/issues/163, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG2M5BIBYUX6A7GUIPZFMZLURLUKFANCNFSM5KIGRAXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Cordialement, Adel Abdelli
Ya I saw the 502 message aswell while manually opening the URL. So means shall wait for few days n try again?
jcenter() was deprecated and should be replaced by mavenCentral(). This must be fixed in this plugin.
Yes, I also saw it. My temporary workaround is to make an offline gradle build in command line
./gradlew assembleStagingDebug --offline
But I agree with you, it must be fixed in the plugin.
@patryk-eco has right. https://developer.android.com/studio/build/jcenter-migration
You can use my fork https://github.com/patryk-eco/CapacitorGoogleAuth.git in the package.json:
npm i -D patryk-eco/CapacitorGoogleAuth#fix-jcenter
I had to make an additional fix. This should work for you, if you are curious:
npm i github:patryk-eco/CapacitorGoogleAuth#d09f1e5
Unfortunately still getting errors. Does your fork work with Capacitor 2?
Hey guys, just to prevent duplication: Did you inform the capacitor-google-auth project? Otherwise, I would create an issue there.
@carsten-klaffke I haven't created an issue there yet. You can do it if you want
@black-hawk85
Unfortunately still getting errors. Does your fork work with Capacitor 2?
For me it worked! Did you run "npm install" and "npm run build" in the fork? And then "ionic cap update" and "ionic cap sync" in your project?
My workaround to fix this issue:
Step 1, set up postinstall step:
Create in a root of your project file called 'postinstall.ts' and add this string to your package.json (to the "scripts"):
"postinstall": "node postinstall.ts"
Step 2, Add package to replace required string in CapactiorGoogleAuth:
npm i replace-in-file --save
Step 3, content of postinstall.ts :
const replace = require('replace-in-file');
const set_specific_version = {
files: 'node_modules/@codetrix-studio/capacitor-google-auth/android/build.gradle',
from: 'gms:play-services-auth:18.+',
to: 'gms:play-services-auth:18.1.0',
allowEmptyPaths: false,
};
replace(set_specific_version)
.then(() => {
console.log('postinstall.ts: Modified file succesfully !');
})
.catch(error => {
console.error('postinstall.ts: Error occurred:', error);
});
Now, on each npm install, npm will automatically patch capacitor-google-auth with specific version of play-services, and gradle build will work;