[Android] App crashes with C++ exception when starting react-native in an existing app
03-17 01:02:33.391 3057-3057/? A/DEBUG: Abort message: 'Assert (/Users/mkonicek/code/react-native/ReactAndroid/src/main/jni/first-party/jni/fbjni/Exceptions.cpp:86): localUnknownCppExceptionClass'
- react-native v0.19.0
- node v5.7.0
- platform: Android
- OS: Mac OS X 10.11.2
The same bug was reported last year but it was closed due to lack of inactivity on the ticket https://github.com/facebook/react-native/issues/4253
@facebook-github-bot stack-overflow
Hey @andreipt and thanks for posting this! @gre tells me this issue looks like a question that would be best asked on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. Will close this as this is really a question that should be asked on SO.
When does this happen? Can you share some code that reproduces this?
Hi @mkonicek It seems that this issue was caused by some misconfigurations in the proguard file, but after this was fixed another bug surfaced that seems to be related to using multidex in the app where I am trying to integrate react-native. There is already a ticket logged for this bug https://github.com/facebook/react-native/issues/5645 where I added more details abut my case. Please let me know if multidex support needs to be added on the react-native side or can be actually fixed from inside the app that uses it. Thanks!
For anyone else running into this issue with existing android apps, make sure you add the react native proguard rules to your existing app if using proguard. I also got this same error message, and it was tough to track down to a proguard issue.