question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Realm.clearTestState() assertion

See original GitHub issue

In 2.0.0-rc13, When I use Realm.clearTestState after setting up a global notifier listener, I am getting this:

../public/src/object-store/src/sync/sync_manager.cpp:220: [realm-core-3.2.1] Assertion failed: no_active_sessions
0   realm.node                          0x0000000119abca88 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 40
1   realm.node                          0x0000000119abce15 _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 517
2   realm.node                          0x00000001198c4fdc _ZN5realm11SyncManager17reset_for_testingEv + 420
3   realm.node                          0x00000001197c4b67 _ZN5realm2js16clear_test_stateEv + 87
4   realm.node                          0x0000000119808ce2 _ZN5realm2js4wrapIXadL_ZNS0_10RealmClassINS_4node5TypesEE16clear_test_stateEPN2v87IsolateENS6_5LocalINS6_6ObjectEEENS0_9ArgumentsIS4_EERNS0_11ReturnValueIS4_EEEEEEvRKNS6_20FunctionCallbackInfoINS6_5ValueEEE + 206
5   node                                0x00000001003432ef _ZN2v88internal25FunctionCallbackArguments4CallEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEE + 1199
6   node                                0x00000001003d4f59 _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperEPNS0_7IsolateENS1_16BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE3EEE + 3880
7   node                                0x0000000100432287 _ZN2v88internalL26Builtin_Impl_HandleApiCallENS0_12_GLOBAL__N_116BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE3EEEPNS0_7IsolateE + 327
8   node                                0x00000001003f06a0 _ZN2v88internalL21Builtin_HandleApiCallEiPPNS0_6ObjectEPNS0_7IsolateE + 866
9   ???                                 0x000038a939e092a7 0x0 + 62299471647399
10  ???                                 0x000038a93ad67172 0x0 + 62299487760754

To reproduce this, check out realm/ros@89dffdcc8dc8f10ea034313acb14bff9fb2b782f and run npm install; npm run test

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
coderscode2commented, Sep 26, 2019

Never mind. Adding following worked. Wrapped inside try catch

try { Realm.clearTestState(); } catch (ex) {}

0reactions
knethcommented, Sep 27, 2019

@coderscode2 What error message did you get?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding assertions – Hacking with Swift+
The simplest possible assertion is simply assert() , which takes a condition to check and a message to print if that check fails....
Read more >
Untitled
... cause deadlock - Ticket #256 - debug build assertion in ACL_EvalDestroy() ... in nsupdate if 'realm' was used multiple times (#1034824) -...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found