blackuy/react-native-twilio-video-webrtc

Play Store Vulnerability Error

Closed this issue · 5 comments

In the past 24 hours we've had this error show up regarding the WebRTC version:

Screenshot 2022-10-20 at 15.18.12.png

Any one else receiving this error?

Steps to reproduce

Submit V2.1.0 Android app

Yep, sent our app this morning and received the same error.

Same error here.

Same here. I have checked and checked.

It seems that the WebRTC team stopped publishing official binaries. One of the bullets in the article mentions this:

Note that pre-built WebRTC binaries have been deprecated for some time. Developers must build from source to get the latest updates.

If you're OK with using unofficial binaries, this repo has been building and publishing them (among a few others)

The alternative is adjusting react-native-twilio-video-webrtc to build the binaries from source, however one easy solution is to just use one of these published builds.

You can use patch package to accomplish this.

  1. Setup patch package per its instructions
  2. In your project, open node_modules/react-native-twilio-video-webrtc/android/build.gradle
  3. Replace
    implementation 'org.webrtc:google-webrtc:1.0.30039'
    with
    implementation 'com.dafruits:webrtc:106.0.0'
    (or whatever other published binary you like)
  4. In your base directory execute npx patch-package react-native-twilio-video-webrtc to apply the patch in the future as well
  5. Rebuild your Android app and test it

Google no longer is mad about the bad WebRTC Version used in my app.

This also fixed a few other Android-specific problems I was facing while using this library.

Hope this helps somebody :)