question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android build is failing. 502 Bad Gateway

See original GitHub issue

Description

I am trying to build an android release in AppCenter and I am getting the following error:

* What went wrong:
Execution failed for task ':app:lintVitalStagingRelease'.
> Could not resolve all artifacts for configuration ':react-native-screens:releaseRuntimeClasspath'.
   > Could not resolve com.facebook.react:react-native:+.
     Required by:
         project :react-native-screens
      > Failed to list versions for com.facebook.react:react-native.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
            > Could not get resource 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
               > Could not GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

I think its related to jcenter but I am unsure of how I need to sort this out. I saw a PR here which possibly sort this issue out and I am wondering if there is any other solution here.

Platform

  • iOS
  • Android
  • Web
  • Windows
  • tvOS

Workflow

  • Managed workflow
  • Bare workflow

Package versions

package version
react-native 0.66.3
@react-navigation/native 6.0.6
@react-navigation/native-stack 6.2.5
react-native-screens 3.10.1
react-native-safe-area-context 3.3.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
gax97commented, Jan 12, 2022

I made a PR that removes jcenter: 1270

3reactions
oslivercommented, Jan 12, 2022

I have for now resolved this issue by adding the following code into root build.gradle of the android app. Turns out the + was causing the issue so by specifying a version the problem got resolved and I was able to build. I am going to leave this issue open to get some thoughts from other people too.

didn’t help

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio: Gradle sync failed: Could not HEAD ...
Android Studio : Gradle sync failed: Could not HEAD '...'. Received status code 502 from server: Bad Gateway [closed] · try this stackoverflow.com ......
Read more >
Received status code 502 from server: Bad Gateway ... - GitHub
Same here: `FAILURE: Build failed with an exception. What went wrong: Could not determine the dependencies of task ':app:processDebugResources'.
Read more >
Received status code 502 from server: Bad Gateway in React ...
kill terminal; open project in Android Studio (Android folder location). Click on sync in logcat . Project will build successfully. Run the ...
Read more >
502 Bad Gateway Error: What It Is and How to Fix It - Lifewire
The 502 Bad Gateway error is an HTTP status code that means that one server on the internet received an invalid response from...
Read more >
What is a 502 Bad Gateway Error (And How Can I Fix It)?
A 502 Bad Gateway Error occurs when you try to visit a web page, but one web server gets an invalid response from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found