facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.23k stars 24.22k forks source link

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

Closed khuongsatou closed 3 years ago

khuongsatou commented 3 years ago

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest React Native release to make sure your issue has not already been fixed: https://reactnative.dev/docs/upgrading.html

React Native version:

Run react-native info in your terminal and copy the results here.

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. npx react-native init project 2.yarn react-native run-android

Expected Results

Describe what you expected to happen. [Could not GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway]

Snack, code example, screenshot, or link to a repository:

Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve image

khuongsatou commented 3 years ago

i checked https://stackoverflow.com/questions/49510176/android-studio-gradle-sync-failed-could-not-head-received-status-code-5 but it not working

sandy105 commented 3 years ago

It seems Jcenter downloads are down, please check https://status.bintray.com

mifi commented 3 years ago

Jcenter is shutting down. Maybe they are trying to warn us to switch. See https://github.com/react-native-community/discussions-and-proposals/issues/331

TBaoNguyen commented 3 years ago

Just run with offline mode. Turn off your connection, run-android and turn it on back.

ydv0121 commented 3 years ago

Screenshot 2021-03-16 at 10 32 50 AM

arwysyah commented 3 years ago

Is it another way to replace Jcenter to MavenCentral manually since jcenter getting server error now , and since jCenter is shutting down and affect Android apps globally starting May

ydv0121 commented 3 years ago

@arwysyah i think jCenter extended their support till 1st Feb 2022

Screenshot 2021-03-16 at 10 40 18 AM

Rananjaya commented 3 years ago

same issue here :(

arwysyah commented 3 years ago

@ydv0121

Ah i see ,only Rest Api and UI will be sunsetted on May

β€œTo clarify, the JCenter repository will keep serving packages for 12 months until February 1st 2022. Only the JCenter REST API and UI will be sunsetted on May 1st 2021.”

ydv0121 commented 3 years ago

JCenter is up now.

Screenshot 2021-03-16 at 10 54 56 AM

khuongsatou commented 3 years ago

it worked

arwysyah commented 3 years ago

you can close the issue

gopidevarapalli commented 2 years ago

Just run with offline mode. Turn off your connection, run-android and turn it on back.

Excellent. Thank you :) You have saved my time.

Lexical-Luke commented 2 years ago

I've just started having this issue today, I checked https://status.bintray.com and it seems jcenter and bintray have already been sunset even though the date was 1 Feb 2022. What can I do to fix this issue, besides for offline mode?

Screenshot 2021-12-10 at 9 53 35 AM

arwysyah commented 2 years ago

@Lexical-Luke you need to update your build.gradle

Remove or disable jcenter() and change it to mavenCentral() android/build.gradle repositories { mavenLocal()

// jcenter() // <- remove it mavenCentral() // <- add it

maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://repo.spring.io/plugins-release/" }

}

Lexical-Luke commented 2 years ago

@arwysyah, I've tried these but I still get the same issue.

Here is the android/build.gradle

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        maven { 
            // react-native-date-picker
            url "https://www.jitpack.io" 
        }

        google()
        mavenCentral()
        maven { url "https://maven.google.com" }

        maven { url "https://plugins.gradle.org/m2/" }
        maven { url "https://repo.spring.io/plugins-release/" }
    }
}
arwysyah commented 2 years ago

Sorry bro ,currently i didnt open my Laptop , But here the things

maybe you should update your React Native version, currently 0.65 already replaced jcenter()

and here some references, hope can help you:

  1. https://github.com/react-native-community/discussions-and-proposals/issues/331
  2. https://stackoverflow.com/questions/67418153/android-studio-gradle-please-remove-usages-of-jcenter-maven-repository-from
  3. https://stackoverflow.com/questions/50726435/difference-among-mavencentral-jcenter-and-mavenlocal
latusdenis commented 2 years ago

@arwysyah @Lexical-Luke I'm getting similar issue:

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

build.gradle

buildscript {
    ext {
        buildToolsVersion = "29.0.2"
        minSdkVersion = 21
        compileSdkVersion = 29
        targetSdkVersion = 29
        supportLibVersion = "28.0.0"
        googlePlayServicesVersion = "11.0.0"
        googlePlayServicesLocationVersion = "17.0.0"
        appCompatVersion = "1.1.0"
    }
    repositories {
        google()
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:4.1.0")
        classpath("com.google.gms:google-services:4.3.10")
    }
}

allprojects {
    repositories {
        mavenCentral()
        mavenLocal()
        maven { url("$rootDir/../node_modules/react-native/android") }
        maven { url("$rootDir/../node_modules/jsc-android/dist") }
        google()
        maven { url 'https://www.jitpack.io' }
        jcenter()
        flatDir {
            dirs "$rootProject.projectDir/libs"
        }

        maven {
            url "$rootDir/../node_modules/@notifee/react-native/android/libs"
        }

        maven {
            url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
            credentials {
                username 'braintree_team_sdk'
                password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
            }
        }
    }
}

The problem appeared without any code changes. Bintray status is major outage: https://isdown.app/integrations/bintray

Please advise, which steps do I need to perform, so I can successfully create release builds.

Lexical-Luke commented 2 years ago

@arwysyah, I made sure to take my time and check everything, I tried all 3 of your points independently then all together, even tried some other tricks like running $ npm ls metro-config and trying to resolve those issues, I'm still left with the same issue if not more of the same.

     > Failed to list versions for com.facebook.react:react-native.
         > Unable to load Maven meta-data from https://repo.spring.io/plugins-release/com/facebook/react/react-native/maven-metadata.xml.
            > Could not get resource 'https://repo.spring.io/plugins-release/com/facebook/react/react-native/maven-metadata.xml'.
               > Could not GET 'https://repo.spring.io/plugins-release/com/facebook/react/react-native/maven-metadata.xml'. Received status code 401 from server: Unauthorized
      > 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

Here is my android/build.gradle:

buildscript {
    ext {
        buildToolsVersion = "30.0.3"
        minSdkVersion = 21 
    kotlinVersion = "1.3.72" 
        compileSdkVersion = 30
        targetSdkVersion = 30
        ndkVersion = "20.1.5948944"
    }
    repositories {
        mavenCentral()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.2'
        classpath 'com.google.gms:google-services:4.3.10'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"

    }
}

allprojects {
    repositories {
        google()
        mavenLocal()
        mavenCentral()

        maven { url "https://plugins.gradle.org/m2/" }
        maven { url "https://repo.spring.io/plugins-release/" }

        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        maven { 
            // react-native-date-picker
            url 'https://www.jitpack.io' 
        }

        maven { url "https://maven.google.com" }       
    }
}
latusdenis commented 2 years ago

@Lexical-Luke Same for me. The issue persists for 2 days already and it seems like the server is down: https://isdown.app/integrations/bintray

arwysyah commented 2 years ago

@Lexical-Luke its looks like you already solved the problem , and i think better for you to change your credential account @latusdenis

Lexical-Luke commented 2 years ago

@arwysyah, Definitely not solved & those are @latusdenis's creds.

arwysyah commented 2 years ago

Hmm okay i see πŸ€”, @Lexical-Luke @latusdenis

i found an article in OneSignal website

Its sounds reasonable that there are some libs maybe havent changed to mavenCentral() on your project .

I havent tried on my laptop

but if you want to try it

delete your modules and reinstall

And here is the complete article : https://www.google.co.id/amp/s/onesignal.com/blog/android-migrate-jcenter-to-maven-central/amp/

Lexical-Luke commented 2 years ago

@arwysyah, I've done that literally hundreds of times, its the first thing I do before a clean install, also ./gradlew clean.

latusdenis commented 2 years ago

I'm using https://github.com/wgltony/react-native-braintree-dropin-ui, so should the lib move to mavenCentral()?

arwysyah commented 2 years ago

@Lexical-Luke πŸ˜‚πŸ˜‚, but how if you create a new project and trying to run it ? Is it running correctly ( react native latest version)? Sometimes its possible to get and error because of gradle because of network connection when sync the gradle , but for your case i think its not . πŸ€”

@latusdenis i think the libs already implemented mavenCentral () too . But i never used that lib, so really sorry for that.

I am searching by phone cause i am on leave πŸ˜‚πŸ™πŸ»

Lexical-Luke commented 2 years ago

@arwysyah, our dev team has other apps, this is the only one affected, the others are on RN 0.64.0. This one, that is having issues, was on RN 0.63.4, I've since upgraded it to 0.65.0.

Interestingly enough those apps still reference jcenter() in the build.gradle.

Lexical-Luke commented 2 years ago

I'm still getting this 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

Any help would be appreciated.

arwysyah commented 2 years ago

@Lexical-Luke i just tried to look into detail your problem ,flexbox-layout releases appear to only be published to jcenter and are not present on maven central. Remove

maven { url "https://google.bintray.com/flexbox-layout" }// remove this one if exist

Try this :

dependencies { implementation 'com.google.android.flexbox:flexbox:3.0.0' } //add this one

For detail information:

https://github.com/google/flexbox-layout/issues/566#issuecomment-844630491

@latusdenis i dont know if you already solved the problem or not, i guess you issue also because https://cardinalcommerceprod.jfrog.io/ ,

i found this article https://cardinaldocs.atlassian.net/wiki/spaces/CMSDK/pages/1998914459/Setting+up+CardinalMobileSDK+-+Android+-+V+2.2.5 Idont know it would help you or not, i cause i never used the lib and sdk

if bug still appear :maybe we can open the issue

Lexical-Luke commented 2 years ago

@arwysyah, thanks for the leads, unfortunately, I've already tried them out - same error.

I can't test that second article relating to jfrog as there doesn't seem to be an option to create an account.

arwysyah commented 2 years ago

@Lexical-Luke How if you change your internet connection, sometimes its also possible to happened because of your network connection didnt have a proxy πŸ€” https://github.com/google/flexbox-layout/issues/566#issuecomment-850954633 (Kotlin)

Lexical-Luke commented 2 years ago

@arwysyah, unfortunately, I don't have a VPN to try out some net config, I tried connecting through my phone's wifi, and still no luck, my colleague has the same issue and we both work from home (different networks).

Here is my current build.gradle, I am currently using kotlinVersion = "1.4.32", I'm not sure if additional steps are required.

buildscript {
    ext {
        buildToolsVersion = "31.0.0"
        minSdkVersion = 21 
    kotlinVersion = "1.4.32"
        supportLibVersion = "30.0.0"
    supportVersion = "30.0.0" 
        compileSdkVersion = 31
        targetSdkVersion = 31
        ndkVersion = "21.4.7075529"
        RNNKotlinVersion = kotlinVersion
    }
    repositories {
        google()
        mavenCentral()
        mavenLocal()
        // jcenter()
    }
    dependencies {
        classpath ("com.android.tools.build:gradle:4.1.2")
        classpath 'com.google.gms:google-services:4.3.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenCentral()
        mavenLocal()
        // jcenter()

        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        mavenCentral {
            // We don't want to fetch react-native from Maven Central as there are
            // older versions over there.
            content {
                excludeGroup "com.facebook.react"
            }
        }
        google()
        maven { 
            // react-native-date-picker
            url "https://jitpack.io"
        }
        maven { url "https://maven.google.com" }        
    }
}
arwysyah commented 2 years ago

Have you tried this one :

There is no flexbox on Maven Central. There is a flexbox on Google's Maven repo, but only 3.0.0. Some transitive dependency of yours is seeking 2.0.1. And, based on that dependency list, it must be io.kommunicate.sdk:kommunicateui:2.1.8 that is looking for the older flexbox.

Unfortunately, the developers of io.kommunicate.sdk:kommunicateui have not updated their library, apparently.

You can try manually adding your own dependency on com.google.android.flexbox:flexbox:3.0.0 and perhaps setting up an exclude rule on the io.kommunicate.sdk:kommunicateui:2.1.8 dependency to tell Gradle to ignore its transitive dependency on flexbox. Ideally, the developers of io.kommunicate.sdk:kommunicateui would update their library to depend on com.google.android.flexbox:flexbox:3.0.0.

To exclude the failing dependency, change:

implementation 'io.kommunicate.sdk:kommunicateui:2.1.8' to:

implementation('io.kommunicate.sdk:kommunicateui:2.1.8') { exclude group: "com.google.android", module: "flexbox" }

πŸ˜†πŸ˜†

Lexical-Luke commented 2 years ago

@arwysyah, you may be on the right track we are using kommunicate and it has been a problem child in the past πŸ₯΄

We have this in the app/build.gradle: implementation project(':react-native-kommunicate-chat')

I changed it to your suggestion and the only thing that has changed is the build time fails twice as fast πŸ˜‚ - same error.

arwysyah commented 2 years ago

@Lexical-Luke I saw they module/libs , its looks like they havent changed the version of flexbox ,still from old version, i was wondering have you tried to changed from their libs that exist on your project ? I saw also on Zendesk they have a same issue before , but i dont know πŸ˜‚πŸ˜‚,since my suggestion always got failed πŸ˜‚.

here the pict from the libs/module : 06E63805-C535-4DCD-B995-4D2571EBEBE5

Lexical-Luke commented 2 years ago

@arwysyah, Interesting results.. Don't worry about things not working so far, you've been hitting all the points I also thought would work, you're a king for trying πŸ‘‘

build.gradle

allprojects {
    repositories {
        mavenCentral()
        mavenLocal()
        // jcenter()
        maven {url "https://kommunicate.jfrog.io/artifactory/kommunicate-android-sdk"}      
        maven {url "https://google.bintray.com/flexbox-layout"}

        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        mavenCentral {
            // We don't want to fetch react-native from Maven Central as there are
            // older versions over there.
            content {
                excludeGroup "com.facebook.react"
            }
        }
        google()
        maven { 
            // react-native-date-picker
            url "https://jitpack.io"
        }

        maven { url "https://maven.google.com" }  

    }
}

The fancy new error:

> Task :app:mergeReleaseAssets FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeReleaseAssets'.
> Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
   > Could not resolve com.google.firebase:firebase-bom:29.0.0.
     Required by:
         project :app
      > Could not resolve com.google.firebase:firebase-bom:29.0.0.
         > Could not get resource 'https://google.bintray.com/flexbox-layout/com/google/firebase/firebase-bom/29.0.0/firebase-bom-29.0.0.pom'.
            > Could not HEAD 'https://google.bintray.com/flexbox-layout/com/google/firebase/firebase-bom/29.0.0/firebase-bom-29.0.0.pom'. Received status code 502 from server: Bad Gateway
   > Could not resolve com.google.firebase:firebase-bom:29.0.0.
     Required by:
         project :app > project :react-native-firebase_analytics
         project :app > project :react-native-firebase_app
         project :app > project :react-native-firebase_auth
         project :app > project :react-native-firebase_firestore
      > Could not resolve com.google.firebase:firebase-bom:29.0.0.
         > Could not get resource 'https://google.bintray.com/flexbox-layout/com/google/firebase/firebase-bom/29.0.0/firebase-bom-29.0.0.pom'.
            > Could not HEAD 'https://google.bintray.com/flexbox-layout/com/google/firebase/firebase-bom/29.0.0/firebase-bom-29.0.0.pom'. Received status code 502 from server: Bad Gateway
   > Could not resolve com.google.firebase:firebase-auth.
     Required by:
         project :app > project :react-native-firebase_auth
      > Skipped due to earlier error
      > Skipped due to earlier error
   > Could not resolve com.google.firebase:firebase-firestore.
     Required by:
         project :app > project :react-native-firebase_firestore
      > Skipped due to earlier error
      > Skipped due to earlier error

build.gradle

allprojects {
    repositories {
        maven {url "https://kommunicate.jfrog.io/artifactory/kommunicate-android-sdk"}      
        maven {url "https://google.bintray.com/flexbox-layout"}

        mavenCentral()
        mavenLocal()
        // jcenter()

        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        mavenCentral {
            // We don't want to fetch react-native from Maven Central as there are
            // older versions over there.
            content {
                excludeGroup "com.facebook.react"
            }
        }
        google()
        maven { 
            // react-native-date-picker
            url "https://jitpack.io"
        }

        maven { url "https://maven.google.com" }  

    }
}

The fancy new error:

* What went wrong:
Could not determine the dependencies of task ':react-native-webview:compileReleaseKotlin'.
> Could not resolve all files for configuration ':react-native-webview:kotlinCompilerClasspath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-compiler-embeddable:1.4.32.
     Required by:
         project :react-native-webview
      > Could not resolve org.jetbrains.kotlin:kotlin-compiler-embeddable:1.4.32.
         > Could not get resource 'https://google.bintray.com/flexbox-layout/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.4.32/kotlin-compiler-embeddable-1.4.32.pom'.
            > Could not HEAD 'https://google.bintray.com/flexbox-layout/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.4.32/kotlin-compiler-embeddable-1.4.32.pom'. Received status code 502 from server: Bad Gateway

build.gradle

allprojects {
    repositories {
        mavenCentral()
        mavenLocal()
        // jcenter()

        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        mavenCentral {
            // We don't want to fetch react-native from Maven Central as there are
            // older versions over there.
            content {
                excludeGroup "com.facebook.react"
            }
        }
        google()
        maven { 
            // react-native-date-picker
            url "https://jitpack.io"
        }

        maven { url "https://maven.google.com" }  

        maven {url "https://kommunicate.jfrog.io/artifactory/kommunicate-android-sdk"}      
        maven {url "https://google.bintray.com/flexbox-layout"}
    }
}

The same old 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
arwysyah commented 2 years ago

@Lexical-Luke

implementation 'com.google.android.flexbox:flexbox:3.0.0' Using this instead of maven {url "https://google.bintray.com/flexbox-layout"} inside your project and their libs(kommunicate-react-native-sdk) Like this : https://github.com/facebook/react-native/issues/31165#issuecomment-992545410 did you changed the firebase version ? How about using β€œcom.google.gms:google-services:4.3.10” ?

Lexical-Luke commented 2 years ago

@arwysyah, I'm not sure about the firebase version. I tried β€œcom.google.gms:google-services:4.3.10” it doesn't change the result.

I tried removing Firebase version: implementation platform('com.google.firebase:firebase-bom:29.0.0') and made it implementation platform('com.google.firebase:firebase-bom') then I got the original 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

package.json:

    "@react-native-firebase/analytics": "^12.8.0",
    "@react-native-firebase/app": "^12.8.0",
    "@react-native-firebase/auth": "^12.8.0",
    "@react-native-firebase/firestore": "^12.8.0",
    "firebase": "^7.23.0",
    "firebase-admin": "^8.12.0",

app/build.gradle:

dependencies {
    // implementation "org.webkit:android-jsc:+"
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation platform('com.google.firebase:firebase-bom:29.0.0')
    implementation project(':react-native-gesture-handler')
    implementation project(':react-native-linear-gradient')
    // implementation project(':react-native-kommunicate-chat')
    // implementation 'io.kommunicate.sdk:kommunicateui:2.1.8'
    implementation('io.kommunicate.sdk:kommunicateui:2.1.8') {
        exclude group: "com.google.android", module: "flexbox"
    }
    implementation 'com.google.android.flexbox:flexbox:3.0.0'
    // implementation("com.github.google:flexbox-layout:2.0.1")
    implementation "com.facebook.react:react-native:+"  // From node_modules
    // implementation("com.facebook.react:react-native:0.65.0") { force = true }
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.google.firebase:firebase-messaging:20.0.1'
    implementation 'com.google.firebase:firebase-iid:20.0.1'
    implementation project(':react-native-notifications')
    implementation 'com.google.firebase:firebase-core:16.0.0'
    implementation 'com.android.support:multidex:1.0.3'

    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.fbjni'
    }

    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
        exclude group:'com.squareup.okhttp3', module:'okhttp'
    }

    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    if (enableHermes) {
        def hermesPath = "../../node_modules/hermes-engine/android/";
        debugImplementation files(hermesPath + "hermes-debug.aar")
        releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
        implementation jscFlavor
    }
}
arwysyah commented 2 years ago

@Lexical-Luke

. I think no need to remove firebase.bom version , cause this β€œ implementation platform('com.google.firebase:firebase-bom:29.0.0')” the correct version that exist on firebas doc ,

hmm πŸ€”πŸ€” weird , i checked the flexbox already on maven also Here : https://maven.google.com/web/m_index.html?q=Flex#com.google.android.flexbox:flexbox:3.0.0

https://issuetracker.google.com/issues/120759347#comment106

Lexical-Luke commented 2 years ago

@arwysyah, can we open up the issue again? So far I've gone full circle down that rabbit hole. I read through each of the 126 comments in issuetracker tried out a bunch of things and even tried upgrading Gradle and a few dependencies, I've now got the same issue I started with...

arwysyah commented 2 years ago

@Lexical-Luke yeah we can reopen this issue , and also better for you to investigate your 3rd party libs since your upgraded the project version or create a new issue i guess and mentioned this issue because its still related i guess πŸ˜‚.

Lexical-Luke commented 2 years ago

@arwysyah, we're currently in the process, opened a ticket with kommunicate and we are checking all our packages, have to try everything to get our app to build again πŸ˜…

gopidevarapalli commented 2 years ago

I am able to resolve it. Update the packages to latest version whatever package you are receiving 502.

Lexical-Luke commented 2 years ago

@gopidevarapalli and this error?

> Failed to list versions for com.facebook.react:react-native.
         > Unable to load Maven meta-data from https://cardinalcommerce.bintray.com/android/com/facebook/react/react-native/maven-metadata.xml.
            > Could not get resource 'https://cardinalcommerce.bintray.com/android/com/facebook/react/react-native/maven-metadata.xml'.
               > Could not GET 'https://cardinalcommerce.bintray.com/android/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
gopidevarapalli commented 2 years ago

Hi Lexical-Luke, Remove maven { url('https://cardinalcommerce.bintray.com/maven') } from build.gradle and try

swatiredhu17 commented 2 years ago

I am facing similar issue:

Lexical-Luke commented 2 years ago

Update on my previous issue: We were unable to fix/patch the previous issue and we decided to just start a massive cleanup, we got rid of loads of packages, even removed Intercom entirely and moved to gifted chat. Good luck.

gopidevarapalli commented 2 years ago

I am facing similar issue:

  • What went wrong: Could not determine the dependencies of task ':react-native-intercom:generateReleaseRFile'.

Could not resolve all task dependencies for configuration ':react-native-intercom:releaseRuntimeClasspath'. 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

Try to remove maven { url('https://dl.bintray.com/maven') } from build.gradle and check

arwysyah commented 2 years ago

I guess mostly your problem its because you are using intercom package

Try this : In the build.gradle file, it uses the following dependency under repositories:

maven { url 'https://dl.bintray.com/intercom/intercom-maven' }

swatiredhu17 commented 2 years ago

UPDATE HERE!!

Yes, it worked. As below code was in node_modules, i can't delete that directly. After checking library(https://github.com/tinycreative/react-native-intercom) for updates, it was recently fixed. Code was removed in upgraded version.

Code that was causing issue: maven { url 'https://dl.bintray.com/intercom/intercom-maven' }