Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library Version 2.0.0 - RN 0.65.1 - Gradle 6.9 cant compile on Android #543

Closed
jhazucha opened this issue Aug 26, 2021 · 15 comments
Closed

Comments

@jhazucha
Copy link

jhazucha commented Aug 26, 2021

Steps to reproduce

  1. Init a fresh RN 0.65.1 project
  2. Add Modules - yarn add https://github.com/blackuy/react-native-twilio-video-webrtc
  3. Perform all steps listed in installation instructions for android
  4. run "npx react-native run-android"

Expected behaviour

It should compile without errors.

Actual behaviour

I am receiving that it canot find org.webrtc:google-webrtc:

  • What went wrong:
    Execution failed for task ':app:checkDebugAarMetadata'.

    Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
    Could not find org.webrtc:google-webrtc:1.0.30039.
    Searched in the following locations:

Also cannot find com.getkeepsafe.relinker:relinker

Could not find com.getkeepsafe.relinker:relinker:1.3.1.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/getkeepsafe/relinker/relinker/1.3.1/relinker-1.3.1.pom
- file:/Users/my-username/.m2/repository/com/getkeepsafe/relinker/relinker/1.3.1/relinker-1.3.1.pom
- file:/Users/my-username/Projects/Tests/Test2/node_modules/react-native/android/com/getkeepsafe/relinker/relinker/1.3.1/relinker-1.3.1.pom
- file:/Users/my-username/Projects/Tests/Test2/node_modules/jsc-android/dist/com/getkeepsafe/relinker/relinker/1.3.1/relinker-1.3.1.pom
- https://dl.google.com/dl/android/maven2/com/getkeepsafe/relinker/relinker/1.3.1/relinker-1.3.1.pom
- https://www.jitpack.io/com/getkeepsafe/relinker/relinker/1.3.1/relinker-1.3.1.pom
Required by:
project :app > project :react-native-twilio-video-webrtc > com.twilio:video-android:6.2.1

Environment

  • Node.js version: 16.6.2
  • React Native version: 0.65.1
  • React Native platform + platform version: iOS 9.0

react-native-twilio-video-webrtc

Version: 2.0.0

Also iOS builds and seems to run just fine.

@James3432
Copy link

@jhazucha I found a temporary fix for this was to add jcenter() back into the 2 lists of dependencies in build.gradle. These are deprecated and were removed by default in a recent React Native update, but seem to be required for this version of google-webrtc to resolve.

@jhazucha
Copy link
Author

@jhazucha I found a temporary fix for this was to add jcenter() back into the 2 lists of dependencies in build.gradle. These are deprecated and were removed by default in a recent React Native update, but seem to be required for this version of google-webrtc to resolve.

Good catch! I did not even notice they were remarked out.

@wbroek
Copy link

wbroek commented Sep 6, 2021

@jhazucha I found a temporary fix for this was to add jcenter() back into the 2 lists of dependencies in build.gradle. These are deprecated and were removed by default in a recent React Native update, but seem to be required for this version of google-webrtc to resolve.

I would add the specific packages from jCenter so no other conflicts can occur because jCenter does not allow any updates anymore:

jcenter() {
    content {
        includeModule("org.webrtc", "google-webrtc")
        includeModule("com.getkeepsafe.relinker", "relinker")
    }
}

Also it's not only google-webrtc but relinker as well, which is a dependency of com.twilio:video-android That one should be resolved when video-android in this project is updated.

Maybe an idea to update the example app and readme with this because could not find any other release of google-webrtc on mavenCentral etc.......

@erisvaldojunior
Copy link

jcenter() is quite unstable / deprecated for a while. Can't we have this working with mavenCentral() ?

@hsavit1
Copy link

hsavit1 commented Jan 14, 2022

yeah this repo needs to move off of jcenter() ASAP

@hpardess
Copy link

hpardess commented Jan 16, 2022

@jhazucha I found a temporary fix for this was to add jcenter() back into the 2 lists of dependencies in build.gradle. These are deprecated and were removed by default in a recent React Native update, but seem to be required for this version of google-webrtc to resolve.

I would add the specific packages from jCenter so no other conflicts can occur because jCenter does not allow any updates anymore:

jcenter() {
    content {
        includeModule("org.webrtc", "google-webrtc")
        includeModule("com.getkeepsafe.relinker", "relinker")
    }
}

Also it's not only google-webrtc but relinker as well, which is a dependency of com.twilio:video-android That one should be resolved when video-android in this project is updated.

Maybe an idea to update the example app and readme with this because could not find any other release of google-webrtc on mavenCentral etc.......

I tried this piece of code but still it fails as jcenter returns 502 BAD GATEWAY

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':react-native-community_masked-view:releaseRuntimeClasspath'.
   > Could not resolve com.facebook.react:react-native:+.
     Required by:
         project :react-native-community_masked-view
      > 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 HEAD 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

It is recommented to remove jcenter from build but if i remove jcenter, then webrtc fails
Could not find org.webrtc:google-webrtc:1.0.30039.

https://developer.android.com/studio/build/jcenter-migration

@neilyoung
Copy link

neilyoung commented Jan 17, 2022

Last week there was a big outage, making it impossible to download Google Maps, WebRTC and stuff. Today (Jan 17) it seems to be the same shit again.

https://mvnrepository.com/artifact/org.webrtc/google-webrtc/1.0.32006

Note: this artifact is located at WebRTC repository (https://dl.bintray.com/google/webrtc/)

The mentioned URL gives 502.

I feel challenged to say "Thanks, JCenter" (or whoever is involved in this mess).

Historical outage data, which I was privileged to witness last week: https://status.gradle.com/history

No mentioning of yesterday or today, but impossible to work with gradle and webrtc ATM

@neilyoung
Copy link

BTW:

https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/

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.

@svkd
Copy link

svkd commented Jan 17, 2022

@jhazucha I found a temporary fix for this was to add jcenter() back into the 2 lists of dependencies in build.gradle. These are deprecated and were removed by default in a recent React Native update, but seem to be required for this version of google-webrtc to resolve.

I would add the specific packages from jCenter so no other conflicts can occur because jCenter does not allow any updates anymore:

jcenter() {
    content {
        includeModule("org.webrtc", "google-webrtc")
        includeModule("com.getkeepsafe.relinker", "relinker")
    }
}

Also it's not only google-webrtc but relinker as well, which is a dependency of com.twilio:video-android That one should be resolved when video-android in this project is updated.

Maybe an idea to update the example app and readme with this because could not find any other release of google-webrtc on mavenCentral etc.......

This is working ATM, using jcenter only for google-webrtc, relinker did the trick

@neilyoung
Copy link

This is working ATM, using jcenter only for google-webrtc, relinker did the trick

No, can't confirm this ATM, unless you are using a different implementation reference:

I'm using this:

`implementation 'org.webrtc:google-webrtc:1.0.+'``

What is your's?

@svkd
Copy link

svkd commented Jan 17, 2022

I am using this(default) implementation 'org.webrtc:google-webrtc:1.0.30039'

@neilyoung
Copy link

'Could not find org.webrtc:google-webrtc:1.0.30039.'

I would suggest to make a clean ONLINE build. You'll see, it doesn't work

@neilyoung
Copy link

BTW: The latest (and last version) is this: https://mvnrepository.com/artifact/org.webrtc/google-webrtc/1.0.32006

@neilyoung
Copy link

To be fair: JCenter is back. But the numerous outages let me have some concerns. At least they promised to keep the service read-only once and forever.

@slycoder
Copy link
Collaborator

Hi all, if anyone wants to submit a PR for a more reliable solution, I'd be happy to push it out with another release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants