3

I was able to build and publish my flutter app on October 6th, I returned today on Octuber 30th and I am getting this build error:

  • Could not resolve io.grpc:grpc-core:[1.28.0].
  • Could not HEAD 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'.
  • Read timed out

It seems there is an issue with cloud_firestore somehow it's still trying to read from jcenter which I am informed that it's down and not supporting new repositories, but the issue is that I have not changed a single line nor updated any packages since my last publish and build, what caused this issue?

I remember I had a similar issue a few months ago but everything was fixed after I replaced jcenter with mavenCentral, but this time it's back again.

Launching lib\main.dart on Android SDK built for x86 in debug mode...

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve io.grpc:grpc-core:[1.28.0].
     Required by:
         project :app > project :cloud_firestore > com.google.firebase:firebase-firestore:21.7.1 > io.grpc:grpc-android:1.28.0
         project :app > project :cloud_firestore > com.google.firebase:firebase-firestore:21.7.1 > io.grpc:grpc-okhttp:1.28.0
      > Failed to list versions for io.grpc:grpc-core.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml.
            > Could not HEAD 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'.
               > Read timed out

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
BUILD FAILED in 1m 37s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

This is my build.gradle:

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.2'
        classpath 'com.google.gms:google-services:4.3.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Yes, my app is pretty old, since I have yet to update to null-safety.

Any tips to avoid this issue in the future?

How do I solve this current issue?

fenchai
  • 518
  • 1
  • 7
  • 21

2 Answers2

1

Same to me

  Could not HEAD 'https://jcenter.bintray.com/com/stripe/stripe-android/maven-metadata.xml'.
           > Read timed out

It seems that there is an issue with JCenter. It should be available, although it was changed to read only.

See also https://updownradar.com/status/jcenter.bintray.com

And I don't expect solutions on Sunday ;) So just wait till tomorrow.

Regarding JFROG:

UPDATE 4/27/2021: We listened to the community and will keep JCenter as a read-only repository indefinitely. Our customers and the community can continue to rely on JCenter as a reliable mirror for Java packages. (Source https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/)

  • sht, It seems I am at the mercy of jcenter, but I dont have jcenter on my dependencies, maybe mavencentral is redirecting to jcenter? I will have to try the new dependencies from this post https://stackoverflow.com/questions/74258160/is-jcenter-down-permanently-31-oct It seems I am not the only one with this issue hehe. – fenchai Oct 31 '22 at 13:16
  • Aaand it happens again :D https://updownradar.com/status/jcenter.bintray.com – Florian Knoll Nov 07 '22 at 22:25
0

It seems Jcenter was just down, as per https://developer.android.com/studio/build/jcenter-migration the website will continue to provide read-only repositories indefinitely.

fenchai
  • 518
  • 1
  • 7
  • 21