Skip to content
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

App keeps crashing on startup #6207

Closed
rodrigobertolottizinsp opened this issue Jan 17, 2023 · 5 comments
Closed

App keeps crashing on startup #6207

rodrigobertolottizinsp opened this issue Jan 17, 2023 · 5 comments

Comments

@rodrigobertolottizinsp
Copy link

rodrigobertolottizinsp commented Jan 17, 2023

Observations

  • How frequent do the crash occur? Sometimes
  • Does it happen in production or during dev/test? Production
  • Can the crash be reproduced by you? No
  • Can you provide instructions for how we can reproduce it? I couldn't reproduce the issue. Users say it keeps happening when trying to open the app.

Crash log / stacktrace

3

please_report_this_issue_in_github_realm_realm_core_v_12_9_0

realm::util::terminate_internal

realm::util::terminate

realm::StringIndex::do_delete

realm::StringIndex::do_delete

realm::StringIndex::do_delete

realm::StringIndex::do_delete


realm::StringIndex::do_delete


realm::StringIndex::do_delete


realm::StringIndex::do_delete


realm::StringIndex::do_delete


realm::StringIndex::do_delete


realm::StringIndex::do_delete


realm::StringIndex::do_delete


realm::StringIndex::do_delete


realm::StringIndex::do_delete


realm::StringIndex::do_delete


realm::StringIndex::do_delete


realm::StringIndex::do_delete


realm::StringIndex::erase


realm::Table::erase_from_search_indexes


realm::ClusterTree::erase


realm::Table::remove_object


realm::js::RealmClass<realm::js::realmjsi::Types>::delete_one


facebook::jsi::Value realm::js::wrap


function.h:505:16

std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()


JSCRuntime.cpp:1173:13

facebook::jsc::JSCRuntime::createFunctionFromHostFunction(facebook::jsi::PropNameID const&, unsigned int, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>)::HostFunctionMetadata::call


JSCRuntime.cpp:1275:14

facebook::jsc::JSCRuntime::call


realm::js::Function<realm::js::realmjsi::Types>::call


realm::js::RealmClass<realm::js::realmjsi::Types>::write


facebook::jsi::Value realm::js::wrap


function.h:505:16

std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()


JSCRuntime.cpp:1173:13

facebook::jsc::JSCRuntime::createFunctionFromHostFunction(facebook::jsi::PropNameID const&, unsigned int, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>)::HostFunctionMetadata::call


JSCRuntime.cpp:1275:14

facebook::jsc::JSCRuntime::call


jsi-inl.h:234:18

facebook::jsi::Value facebook::jsi::Function::call


JSIExecutor.cpp:255:50

facebook::react::JSIExecutor::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, folly::dynamic const&)::$_4::operator()


type_traits:3918:1

decltype 


function.h:505:16

facebook::react::JSIExecutor::callFunction


function.h:505:16
std::__1::__function::__func<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8, std::__1::allocator<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8>, void ()>::operator()()


function.h:505:16

facebook::react::tryAndReturnError


RCTMessageThread.mm:69:20

facebook::react::RCTMessageThread::tryFunc


function.h:505:16
___ZN8facebook5react16RCTMessageThread8runAsyncENSt3__18functionIFvvEEE_block_invoke



RCTCxxBridge.mm:335:12
+[RCTCxxBridge runRunLoop]

This happened to two users today in my react-native app when trying to open the app.

We are using:
"react": "18.1.0",
"react-native": "0.70.5",
"realm": "11.3.0",

I saw that this PR could solve some similar issues, #5993 but that was released on realm version 11.2.0 and we are above that.

@nicola-cab
Copy link
Member

This issue can be closed. It is likely a database corruption. You need to delete the database and upgrade to realm core >= 12.12.

@rodrigobertolottizinsp
Copy link
Author

@nicola-cab Sorry, but im using realm-js version 11.3.0 that uses realm core 13.1.0 and im still facing the issue

@nicola-cab
Copy link
Member

Did you delete the database? Unfortunately, there is no another way around this. Also, can you upload the latest stack trace?
The one uploaded says:
please_report_this_issue_in_github_realm_realm_core_v_12_9_0
Which is showing that you were using core v12.9

@rodrigobertolottizinsp
Copy link
Author

Thanks for thew quick reply.

That stack trace was for the issue we faced yesterday.

That's really weird because we are actually using realm javascript version 11.3.0, if I look into dependencies.list file inside realm file I can see REALM_CORE_VERSION=13.1.0 , so I don't know why the stack trace is printing that message.

@nicola-cab
Copy link
Member

ok, I think you have a problem, you are somehow still using core 12.9. Just be absoultely sure that the stack trace reports something with core >= 12.12 and remember to delete the database, if the file got corrupted, there is no alternative. Unfortunately your data is lost. We will be working on adding some sort of exception to notify if we spot a corrupted realm file, but this is another problem and checking the whole tree is not free.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants