New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodic app crash both on iOS and Android #2196

Open
tomsjansons opened this Issue Jan 7, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@tomsjansons
Copy link

tomsjansons commented Jan 7, 2019

We have an app written in ReactNative that uses a sync realm to sync data to Realm cloud. We are currently still in development so the number of users testing the app on iOS and Android devices is very small. But for both iOS and Android apps periodically crash, seemingly without any trigger. Sometimes it happens 30 seconds after opening, sometimes requires 15 min for the app to be open on screen. We use query-based realms to sync a subset of all data to each device.

For Android it is an SIGABRT error, on iOS it is N5realm2js9ExceptionINS_3jsc5TypesEEE

We are using Bugsnag for error reporting.

Android error info from bugsnag:

/data/app/com.myappnamehere-IxBom2F4BLhQhTf3oEX4uA==/lib/arm/libbugsnag-ndk.so:30318bsg_unwind_stack_libunwind	
/data/app/com.myappnamehere-IxBom2F4BLhQhTf3oEX4uA==/lib/arm/libbugsnag-ndk.so:29214bsg_unwind_stack	
/data/app/com.myappnamehere-IxBom2F4BLhQhTf3oEX4uA==/lib/arm/libbugsnag-ndk.so:28668bsg_handle_signal	
/system/lib/libc.so:1010760xe4563ad4	
/system/lib/libc.so:107900abort	
/data/app/com.myappnamehere-IxBom2F4BLhQhTf3oEX4uA==/lib/arm/librealmreact.so:5827206__gnu_cxx::__verbose_terminate_handler()	
/data/app/com.myappnamehere-IxBom2F4BLhQhTf3oEX4uA==/lib/arm/librealmreact.so:5827206__gnu_cxx::__verbose_terminate_handler()

iOS error details

N5realm2js9ExceptionINS_3jsc5TypesEEEfolly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral(folly::Range<char const*>*)
N5realm2js9ExceptionINS_3jsc5TypesEEE · [object Object]

myappnameherefolly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral(folly::Range<char const*>)	
myappnameherefolly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral(folly::Range<char const>)	
myappnameherefolly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral(folly::Range<char const>)	
myappnameherefolly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral(folly::Range<char const>)	
myappnameherefolly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral(folly::Range<char const>*)	
myappnamehere_mh_execute_header

The biggest problem is that I'm not sure what is causing this as it can't be triggered, it would seem we have to run the app and leave it running and then at some point the app will crash. When it is in foreground, you get the Android message about a crashed app, but I suspect that sometimes it also crashes while in background as I keep getting Bugsnag error reports even when the app shouldn't be running.

Not sure if this is relevant, but we also get errors on NodeJS that is syncing with the same Realm cloud instance. There are two that stand out:
Error · Unhandled Rejection at: [object Promise], reason: AuthError: Could not authenticate: Realm Object Server didn't respond with valid JSON
And
Error · End of input

I suspect both periodically happen when Realm is syncing in the background and might or might not be related to my app crash. For Node I've just written uncoughtException handler and keep the Node process running so it won't crash.

I understand that this is not really a lot to go on, but I'm not sure how to investigate this problem further. Any pointers would be appreciated - debugging/logs/etc, anything that might help.

  • RealmJS Version: 2.18.0
  • React Native: 0.57.3
  • Client OS & Version: iOS and Android

@realm-probot realm-probot bot added the O:User label Jan 7, 2019

@supereffectiveRobot

This comment has been minimized.

Copy link

supereffectiveRobot commented Jan 10, 2019

same error happen to me. but i don't know how to reproduce

@tomsjansons

This comment has been minimized.

Copy link

tomsjansons commented Jan 10, 2019

@supereffectiveRobot i'm told that v2.21.1 might resolve the problem https://github.com/realm/realm-js/releases/tag/v2.21.1
One of the fixes mentioned is: "Fix occasional FATAL ERROR: v8::String::Cast Could not convert to string crashes when reading a property from a Realm object. (#2172, since v2.19.0)"
I've not yet had a chance to upgrade, but I plan to do that in the next couple of days, I will report back if the latest version resolves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment