Closed gre closed 4 years ago
not sure what happened with npm permissions but that's been fixed now :)
Any updates on this issue? :(
I'm getting this error:
Exception '-[RCTCxxBridge jsContextRef]: unrecognized selector sent to instance 0x141e74b60' was thrown from JS thread
Whenever there's a call to <Surface></Surface>
Would definitely like some pointers. Would like to utilize THREE.js in RN without Expo, but I'm unable to get RN WebGL to work
@illestrater - you can install this on any react-native app: https://github.com/expo/expo/blob/master/packages/expo-gl/README.md
as @gre mentioned in the op:
I think ideally we need to make this project just consume an embedded version of Expo's GLView, especially now that expo offers a way to get an independent library out of the box.
@brentvatne expo-gl depends on react-native-unimodules, but https://github.com/unimodules/react-native-unimodules react-native-unimodules are not compatible with React Native 0.60.x yet.
@ashusaini - it should work on android if you use jetifier. I have no issue using it on ios with 0.60
Hi @brentvatne
I tried running a fresh project with :
react-native 0.60.5 expo-gl 6.0.0 react-native-unimodules, 0.5.4 expo-gl-cpp 6.0.0
but i was unable to run it on ios and android.
If you have an example project then please share with us !!
UPDATE I was able to run it successfully on ios, but on android I am having build errors
Just wondering if anyone know what the latest setup (RN version, gradle version, and NDK version) to get the library up and running. Any example project would be extremely helpful.
Thanks, @brentvatne it's working with both ios and android. with the following configs.
android: buildToolsVersion = "28.0.3" gradle:3.4.1
enableHermes: false,
React Native: "expo-camera": "^7.0.0", "expo-gl": "^6.0.0", "expo-gl-cpp": "^7.0.0", "expo-image-picker": "^7.0.0", "expo-location": "^7.0.0", "gl-react": "^3.17.2", "gl-react-expo": "^3.17.2", "gl-react-native": "^3.17.2", "react": "16.9.0", "react-native": "0.61.1", "react-native-unimodules": "^0.7.0-rc.1",
Build success on arm64-v8a @ react-native 0.61.5 when making those changes, but still app crash on runtime.
node_modules/react-native-webgl/android/src/main/jni/Application.mk:
3 APP_ABI := armeabi-v7a arm64-v8a #<--adding arm64-v8a
10 APP_STL := c++_shared #<--change it to c++_shared if the library is installed though npm
20 #NDK_TOOLCHAIN_VERSION := 4.9 #<---removing line 20 if the library is installed though npm
node_modules/react-native-webgl/android/build.gradle:
3 repositories {
4 google() //<--adding google()
5 jcenter()
6 }
101 file('src/main/jni') //all start with file
102 file('../cpp')
103 file("$buildDir/exgl/all")
124 exclude '**/libc++_shared.so' //<--change it to libc++_shared.so if the library is installed though npm
137 abiFilters "armeabi-v7a", "arm64-v8a" //<--adding arm64-v8a
node_modules/react-native-webgl/cpp/JSUtils.h:
10 #include <stdint.h> //<--adding this line
If the error message libc++_shared.so is duplicated shwon, on app/build.gradle:
android {
packagingOptions {
pickFirst '**/libc++_shared.so'
}
}
Environment:
macOS 10.15.2 Android Studio 3.5 react-native 0.61.5 Nodejs v10.16.0 clang version 11.0.0 Testing Device: Samsung Galaxy C7
Error Message:
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xee0f0434 in tid 16493 (mqt_js), pid 16138
The error MAY BE caused by 64bit pointer pointed to error address while running on 32bit code????? I am not familiar with 32bit/64bit C++ code, anyone know?
no longer works on RN 0.60
project ownership issues
long term vision
I think ideally we need to make this project just consume an embedded version of Expo's GLView, especially now that expo offers a way to get an independent library out of the box.
We need someone to dig how easy it is to get this done and we could just wrap it in this library. The main pain point i can see is if we want to keep the support of things like Camera stream.