React-native-webrtc: get "Failed to create EGL context: 0x3003" on android

Created on 4 Dec 2017  路  4Comments  路  Source: react-native-webrtc/react-native-webrtc

Hi,

import { RTCPeerConnection, RTCMediaStream, RTCIceCandidate, RTCSessionDescription, RTCView, MediaStreamTrack, getUserMedia, } from 'react-native-webrtc';
I added above code to App.js and double pressed R in andorid simulator. Then the error occurred:

Failed to create EGL context: 0x3003 createEglContext EglBase14.java:260 <init> EglBase14.java:58 create EglBase.java:86 create EglBase.java:97 setVideoHwAccelerationOptions PeerConnectionFactory.java:182 <init> WebRTCModule.java:68 createNativeModules WebRTCModulePackage.java:23 processPackage NativeModuleRegistryBuilder.java:106 processPackage ReactInstanceManager.java:1191 processPackages ReactInstanceManager.java:1161 createReactContext ReactInstanceManager.java:1094 access$800 ReactInstanceManager.java:112 run ReactInstanceManager.java:922 run Thread.java:761

  • React Native version: 0.50.4
  • Plugin version: 1.58.3
  • OS: Android
  • OS version: 7.1.0

All 4 comments

0x3003 is EGL_BAD_ALLOC.

This is known. There is a global EGL context, which we'll leak if you reload the app bundle in debug mode. This does not happen in release mode, since this context will be alive for the lifetime of the application.

I have solved this issue by following these steps -
Step -1 :
Uninstall the current version of react-native-webrtc
Step -2 :

cd android && ./gradlew clean
cd ..

Then install again react-native-webrtc version 1.54.7

npm install --save [email protected]

Step -3:

Omit @override from this location "/node_modules/react-native-webrtc/android/src/main/java/com/oney/WebRTCModule/WebRTCModulePackage.java"
Line Number - 27

In "/home/rakin/mobile_apps/voiceapp/node_modules/react-native-webrtc/RTCView.js" file replace Line number -8 with "import PropTypes from "prop-types"

Removing current version and upgrade with latest also doesn't work in our case
issue is same as before no changes in my case for flutter webrtc

Was this page helpful?
0 / 5 - 0 ratings