4

When I run react-native run-android, I get the following error:

* What went wrong:
Could not determine the dependencies of task ':react-native-intercom:generateDebugRFile'.
> Could not resolve all task dependencies for configuration ':react-native-intercom:debugRuntimeClasspath'.
   > Could not resolve com.facebook.react:react-native:+.
     Required by:
         project :react-native-intercom
      > Failed to list versions for com.facebook.react:react-native.
         > Unable to load Maven meta-data from https://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml.
            > Could not get resource 'https://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml'.
               > Could not GET 'https://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

I have seen similar issues others were having and they said to check the status: https://status.bintray.com/ - but it's saying everything is operational. I also grepped my whole codebase for bintray, but there is no reference to it.

Edit: Also tried that URL in the browser and get the same 502

also:

dara@dara-beast:~/DAD/rn-app$ curl http://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>


dara@dara-beast:~/DAD/rn-app$ curl https://dl.bintray.com/
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>

Update It seems that bintray was "sunsetted" so I'm not expecting it to come back. I've replaced jcenter() with mavenCentral() and it seemed to help, but I still get errors like the following:

* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.facebook.yoga:proguard-annotations:1.14.1.
     Searched in the following locations:
       - file:/home/dara/.m2/repository/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
       - file:/home/dara/DAD/rn-app/node_modules/react-native/android/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
       - file:/home/dara/DAD/rn-app/node_modules/jsc-android/dist/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
       - https://dl.google.com/dl/android/maven2/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
       - https://repo.maven.apache.org/maven2/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
       - https://www.jitpack.io/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
       - https://maven.google.com/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
       - https://sdk.squareup.com/public/android/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
     Required by:
         project :app > com.facebook.react:react-native:0.63.4
   > Could not find com.facebook.fbjni:fbjni-java-only:0.0.3.
     Searched in the following locations:
       - file:/home/dara/.m2/repository/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
       - file:/home/dara/DAD/rn-app/node_modules/react-native/android/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
       - file:/home/dara/DAD/rn-app/node_modules/jsc-android/dist/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
       - https://dl.google.com/dl/android/maven2/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
       - https://repo.maven.apache.org/maven2/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
       - https://www.jitpack.io/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
       - https://maven.google.com/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
       - https://sdk.squareup.com/public/android/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
     Required by:
         project :app > com.facebook.react:react-native:0.63.4

I tried to exclude yoga and others in the build file but it doesn't work. I have no idea what to do.

Dara Java
  • 2,410
  • 3
  • 27
  • 52

5 Answers5

3

I wouldn't recommend depending on JCenter, it has been unstable these past few weeks.

There's an official library from Intercom for React-Native now! It's using the new mavenCentral repo, and there's very little differences (that I found) between this and react-native-intercom. The methods are the same. You might want to migrate to it.

Nishant Nair
  • 1,837
  • 13
  • 19
  • Oh nice! There are other libraries I rely on that use JCenter unfortunately so I think I will have to keep using it for now. I didn't know about that lib though!! Thanks!! – Dara Java Dec 03 '21 at 03:08
  • In the same boat! No choice but to wait for RN libraries to update their dependencies. (Or maybe we can force it?) – Nishant Nair Dec 03 '21 at 06:39
  • Changing to that official library works for me! Thanks @NishantNair – Kalamarico Dec 12 '21 at 22:36
  • At least, there is a non-migrated method. In the previous library exists: Intercom.presentCarousel. And in the new library the same method has a different name: Intercom.displayCarousel – Kalamarico Dec 20 '21 at 18:28
  • One more deprecated: displayConversationsList – Kalamarico Dec 21 '21 at 18:26
1

It works now.

I reset my hours of changes to master and it works. Leaving this here for future people who have this error - don't trust the bintray status page, just wait. I read somewhere during my research that it will stay up indefinitely read only.

Dara Java
  • 2,410
  • 3
  • 27
  • 52
  • 1
    Update - it's happening again. I got around it this time by going offline so it relied on the cache. It didn't work last time presumably because I cleared my cache – Dara Java Dec 09 '21 at 01:55
  • I can approve that its happening again. It's so sad that we can't follow any updates to check when will it be resolved. It is best to update to alternative solutions as soon as possible. – octobus Dec 09 '21 at 08:21
  • Same problem. https://dl.bintray.com/microsoftazuremobile/SDK/com/facebook/react/react-native/maven-metadata.xml -- getting 502 error. – Evgeniy Dec 09 '21 at 11:13
  • https://status.jfrog.io/ Looks like the bintray already get the report of this error and working on fix. – Evgeniy Dec 09 '21 at 13:16
  • I ran `./gradlew assembleRelease --offline` if it helps – Dara Java Dec 09 '21 at 18:06
1

I'm having this issue now that jcenter has sunset what seems like 2 months early. https://status.bintray.com/

Help to resolve this would be great. Adding mavenCentral() has not helped, upgrading gradle to v6.9 & React Native versions to 0.65.0. has not helped either.

I still get the error:

> Failed to list versions for com.facebook.react:react-native.
     > Unable to load Maven meta-data from https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml.
        > Could not get resource 'https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml'.
           > Could not GET 'https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
1

I using new maven, it woking for me

File :

./android/build.gradle

changer to:

maven { url 'https://repo1.maven.org/maven2/' }
Trần Hiệp
  • 101
  • 1
  • 2
0

Toggle Offline Mode Button

  1. Swtich On Toggle Offline Mode(check the above image link!) in Gradle Window
  • You can open Gradle Window by clicking Gradle button in the right side bar.
  1. Build > Clean Project and File > Invalidate Caches > (check) Clear file system cache and Local History > Invalidate and Restart
  2. File > Sync Project with Gradle Files

It works after these things.