Realm exceptions not caught by try-catch on Android. #5846
-
I'm using Realm Just for the sake of testing, I passed an empty object to Realm and wrapped that code in try-catch as shown below. database.beginTransaction();
try {
database.create(User, {}) // This throws exception as we haven't passed an id
database.commitTransaction();
} catch (e) {
database.cancelTransaction();
} This code behaves differently on Android and iOS. On Android, this crashes the app with some errors like On iOS, this doesn't crash the app and the code in the catch block is executed. Is this some kind of known limitation of ReactNative and JSI on Android or am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It turns out to be an issue with the |
Beta Was this translation helpful? Give feedback.
It turns out to be an issue with the
libc++_shared.so
. One of our native dependencies was overriding it which caused Realm to crash.