Run gradlew step failing for EAS android build

Workflow: managed
eas-cli: v0.43.0

After running “eas build -p android --profile production”, I am getting the below error during the “Run gradlew” step.

Running './gradlew :app:assembleRelease' in /root/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-6.9-all.zip
Unzipping /root/.gradle/wrapper/dists/gradle-6.9-all/dooywd8nv05k16orzxge2b1bs/gradle-6.9-all.zip to /root/.gradle/wrapper/dists/gradle-6.9-all/dooywd8nv05k16orzxge2b1bs
Set executable permissions for: /root/.gradle/wrapper/dists/gradle-6.9-all/dooywd8nv05k16orzxge2b1bs/gradle-6.9/bin/gradle
Welcome to Gradle 6.9!
Here are the highlights of this release:
 - This is a small backport release.
 - Java 16 can be used to compile when used with Java toolchains
- Dynamic versions can be used within plugin declarations
 - Native support for Apple Silicon processors
For more details see https://docs.gradle.org/6.9/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/6.9/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
> Configure project :expo-structured-headers
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.
> Configure project :expo
Using expo modules
  - expo-application (4.0.1)
  - expo-av (10.2.0)
  - expo-constants (13.0.0)
  - expo-device (4.1.0)
  - expo-error-recovery (3.0.4)
- expo-file-system (13.1.0)
  - expo-font (10.0.4)
  - expo-image-picker (12.0.1)
  - expo-json-utils (0.2.0)
  - expo-keep-awake (10.0.1)
  - expo-linear-gradient (11.0.0)
  - expo-manifests (0.2.2)
  - expo-media-library (14.0.0)
  - expo-modules-core (0.6.4)
  - expo-notifications (0.14.0)
  - expo-secure-store (11.1.0)
  - expo-splash-screen (0.14.1)
  - expo-structured-headers (2.1.0)
  - expo-updates (0.11.3)
  - react-native-reanimated (2.3.1)
[stderr] FAILURE:
[stderr] > Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
[stderr]    > Could not resolve com.facebook.react:react-native:+.
[stderr]      Required by:
[stderr]          project :app
[stderr]          project :app > project :react-native-community_netinfo
[stderr]          project :app > project :expo
[stderr]          project :app > project :react-native-gesture-handler
[stderr]          project :app > project :react-native-reanimated
[stderr]          project :app > project :react-native-safe-area-context
[stderr] project :app > project :react-native-screens
[stderr]          project :app > project :expo > project :expo-modules-core
[stderr]          project :app > project :expo > project :expo-splash-screen
[stderr]          project :app > project :expo > project :expo-updates
[stderr]       > Failed to list versions for com.facebook.react:react-native.
[stderr]          > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
[stderr]             > Could not get resource 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
[stderr]                > Could not GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 1m 32s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
[stderr] Build failed with an exception.
[stderr] * What went wrong:
[stderr] Could not determine the dependencies of task ':app:lintVitalRelease'.
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

Not sure what to try honestly. Thanks for any help.

I believe it is a server availability issue. Giving it some time and will try build again.

This is jcenter outage, we can’t really do much about it

3 Likes

A few hours later this still seems to be an issue:

[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:mergeReleaseAssets'.
[stderr] > Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
[stderr]    > Could not resolve com.facebook.react:react-native:+.
[stderr]      Required by:
[stderr]          project :app
[stderr]          project :app > project :react-native-async-storage_async-storage
[stderr]          project :app > project :react-native-community_masked-view
[stderr]          project :app > project :expo
[stderr]          project :app > project :react-native-gesture-handler
[stderr]          project :app > project :react-native-safe-area-context
[stderr]          project :app > project :react-native-screens
[stderr]          project :app > project :react-native-svg
[stderr]          project :app > project :expo > project :expo-modules-core
[stderr]          project :app > project :expo > project :expo-splash-screen
[stderr]          project :app > project :expo > project :expo-updates
[stderr]       > Failed to list versions for com.facebook.react:react-native.
[stderr]          > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
[stderr]             > Could not get resource 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
[stderr]                > Could not GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 3m 34s

Even the status page of bintray gives me 502 Bad Gateway :scream:

Does anyone know what’s going to happen after February the 1st? I read that JCenter and Bintray are going to be closed down then.

I’m still seeing this issue also. After 5 hours, I’m just hoping this is not permanent.

jcenter went back up this morning

Is this happening again? I’m getting Gradle build errors in EAS build:

[stderr]
FAILURE: Build failed with an exception.
[stderr]
* What went wrong:
[stderr]
> Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
[stderr]
Execution failed for task ':app:mergeReleaseAssets'.
[stderr]
   > Could not resolve com.facebook.react:react-native:+.
[stderr]
Required by:
[stderr]
         project :app
[stderr]
         project :app > project :react-native-async-storage_async-storage
[stderr]
         project :app > project :react-native-community_datetimepicker
[stderr]
         project :app > project :react-native-picker_picker
[stderr]
         project :app > project :sentry_react-native
[stderr]
         project :app > project :expo
[stderr]
         project :app > project :react-native-safe-area-context
[stderr]
         project :app > project :react-native-svg
[stderr]
         project :app > project :react-native-vector-icons
[stderr]
         project :app > project :expo > project :expo-modules-core
[stderr]
         project :app > project :expo > project :expo-splash-screen
[stderr]
         project :app > project :expo > project :expo-updates
[stderr]
      > Failed to list versions for com.facebook.react:react-native.
[stderr]
         > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
[stderr]
            > Could not get resource 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
[stderr]
               > Could not GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

yes, jcenter 502 again.
i configure https://uptimerobot.com/ to push me message to telegram, when its up

And meanwhile all status pages (Expo, Gradle…) are telling that all systems are operational, when this has continued for at least 4 hours now. :woozy_face: Are these status pages updated manually or do they have some kind of automatic logic behind them?

I ran into build issues because of 502 errors when trying to fetch from jcenter today. I was able to work around it by using patch-package and a Config Plugin to remove jcenter() from my dependencies’ build.gradle files and also the build.gradle of the app itself.

Whether it will work for you probably depends on your dependencies.

[stderr]

FAILURE: Build failed with an exception.

111[stderr]

* What went wrong:

112[stderr]

Execution failed for task ':app:mergeReleaseAssets'.

113[stderr]

> Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.

114[stderr]

   > Could not resolve com.facebook.react:react-native:+.

115[stderr]

     Required by:

116[stderr]

         project :app

117[stderr]

         project :app > project :expo

118[stderr]

         project :app > project :expo > project :expo-modules-core

119[stderr]

         project :app > project :expo > project :expo-splash-screen

120[stderr]

      > Failed to list versions for com.facebook.react:react-native.

121[stderr]

         > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.

122[stderr]

            > Could not get resource 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.

123[stderr]

               > Could not GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

124[stderr]

* Try:

125[stderr]

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.

126[stderr]

* Get more help at https://help.gradle.org

127[stderr]

BUILD FAILED in 1m 30s

128

Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.