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

Expo app crashes on startup when realm is used #5690

Closed
njmulsqb opened this issue Apr 3, 2023 · 8 comments
Closed

Expo app crashes on startup when realm is used #5690

njmulsqb opened this issue Apr 3, 2023 · 8 comments

Comments

@njmulsqb
Copy link

njmulsqb commented Apr 3, 2023

How frequently does the bug occur?

Always

Description

Hi,

I am trying to use realm in my expo app, purpose is to sync with atlas in future and make app offline first, but whenever I write code to fetch the some data from DB, the app crashes on startup without giving any error in CLI, flipper does show null pointer reference exception though.
The code I am using:

const app = Realm.App.getApp(process.env.REALM_APP_ID);


async function getUserByEmail(email) {
      console.log(app);
  const credentials = Realm.Credentials.anonymous();
  try {
    const user = await app.logIn(credentials);

    const realm = await Realm.open({
      schema: [User.schema],
      sync: {
        user: user,
        partitionValue: `email=${email}`,

      },
    });
    const userData = realm.objects("Users").filtered(`email = "${email}"`)[0];
    return userData;
  } catch (error) {
    console.error("Failed to log in", error);
  }
}This is getting really annoying as I just cant call Realm, even `console.log` statement is not executing. How can I fix it?

Stacktrace & log output

{code:shell}
Ignored the notification for the crash
{notificationID: "19", callstack: "Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10 in tid 18446 (mqt_js), pid 18367 (ninegap.payqual)


Build fingerprint: 'google/sdk_gphone64_arm64/emu64a:UpsideDownCake/UPP2.230217.004/9663077:userdebug/dev-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2023-04-03 21:34:57.715127998+0500
Process uptime: 5s
Cmdline: com.ninegap.payqual
pid: 18367, tid: 18446, name: mqt_js >>> com.ninegap.payqual <<<
uid: 10169
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000010
Cause: null pointer dereference
x0 b400007650010db0 x1 b4000075fffdf250 x2 0000000000000050 x3 0000000000000003
x4 0000007513e4ffa0 x5 00000000004a2b92 x6 0000000000000010 x7 7f7f7f7f7f7f7f7f
x8 0000000000000000 x9 000000751cc98514 x10 0000000000000024 x11 fffffffffffffffd
x12 0000007513e500c0 x13 000000000000001b x14 0000007513e513b8 x15 000005823fddc828
x16 0000000000000001 x17 00000078772ead64 x18 0000007513aca000 x19 b40000762ffe0238
x20 0000007296d0a5d1 x21 0000007513e59000 x22 b40000774004fae0 x23 0000000000000003
x24 0000007513e51ac0 x25 b40000774004fa30 x26 0000007513e51e28 x27 0000007868a70850
x28 0000007513e518a0 x29 0000007513e51800
lr 000000751cc98540 sp 0000007513e517f0 pc 0000007521db38ec pst 0000000060001000
backtrace:
#00 pc 00000000000718ec /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes.so (BuildId: 016799ffb75bf3e796697529927ab930c4fb7909)
#1 pc 00000000003de53c /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes_executor.so (facebook::jsi::RuntimeDecorator<facebook::jsi::Runtime, facebook::jsi::Runtime>::truncate(facebook::jsi::BigInt const&)+40) (BuildId: 053c82a073c7e5cf)
#2 pc 000000000022c818 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/librealm.so (Java_io_realm_react_RealmReactModule_install+108) (BuildId: 97b169818fa936908a76a08918e870d196f3f806)
#3 pc 0000000000339fb4 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#4 pc 000000000032356c /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+556) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#5 pc 00000000002a1b60 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+144) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#6 pc 00000000005a0798 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1072) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#7 pc 00000000004c9884 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp(art::interpreter::SwitchImplContext*)+848) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#8 pc 000000000033c5d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#9 pc 0000000000126648 [anon:dalvik-classes2.dex extracted in memory from /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/base.apk!classes2.dex] (io.realm.react.RealmReactModule.+0)
#10 pc 000000000034d2c4 /apex/com.android.art/lib64/libart.so (art::interpreter::ExecuteSwitch(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.__uniq.112435418011751916792819755956732575238)+64) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#11 pc 000000000034cf68 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.2558608864111702944)+224) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#12 pc 000000000034c338 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+100) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#13 pc 00000000005a0798 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1072) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#14 pc 00000000004c9884 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp(art::interpreter::SwitchImplContext*)+848) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#15 pc 000000000033c5d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#16 pc 0000000000126780 [anon:dalvik-classes2.dex extracted in memory from /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/base.apk!classes2.dex] (io.realm.react.RealmReactPackage.getModule+0)
#17 pc 000000000034d2c4 /apex/com.android.art/lib64/libart.so (art::interpreter::ExecuteSwitch(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.__uniq.112435418011751916792819755956732575238)+64) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#18 pc 000000000034cf68 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.2558608864111702944)+224) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#19 pc 000000000034c338 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+100) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#20 pc 00000000005a0798 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1072) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#21 pc 00000000004c9884 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp(art::interpreter::SwitchImplContext*)+848) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#22 pc 000000000033c5d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#23 pc 00000000003bdf70 [anon:dalvik-classes.dex extracted in memory from /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/base.apk] (com.facebook.react.TurboReactPackage$ModuleHolderProvider.get+0)
#24 pc 000000000034d2c4 /apex/com.android.art/lib64/libart.so (art::interpreter::ExecuteSwitch(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.__uniq.112435418011751916792819755956732575238)+64) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#25 pc 000000000034cf68 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.2558608864111702944)+224) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#26 pc 000000000034c338 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+100) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#27 pc 00000000005a0798 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1072) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#28 pc 00000000004c9884 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp(art::interpreter::SwitchImplContext*)+848) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#29 pc 000000000033c5d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#30 pc 00000000003bdf98 [anon:dalvik-classes.dex extracted in memory from /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/base.apk] (com.facebook.react.TurboReactPackage$ModuleHolderProvider.get+0)
#31 pc 000000000034d2c4 /apex/com.android.art/lib64/libart.so (art::interpreter::ExecuteSwitch(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.__uniq.112435418011751916792819755956732575238)+64) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#32 pc 000000000034cf68 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.2558608864111702944)+224) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#33 pc 000000000034c338 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+100) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#34 pc 00000000005a0798 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1072) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#35 pc 00000000004c9884 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp(art::interpreter::SwitchImplContext*)+848) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#36 pc 000000000033c5d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#37 pc 00000000003ca6dc [anon:dalvik-classes.dex extracted in memory from /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/base.apk] (com.facebook.react.bridge.ModuleHolder.create+0)
#38 pc 000000000034d2c4 /apex/com.android.art/lib64/libart.so (art::interpreter::ExecuteSwitch(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.__uniq.112435418011751916792819755956732575238)+64) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#39 pc 000000000034cf68 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.2558608864111702944)+224) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#40 pc 000000000034c338 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+100) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#41 pc 00000000005a0798 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1072) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#42 pc 00000000004c9884 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp(art::interpreter::SwitchImplContext*)+848) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#43 pc 000000000033c5d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#44 pc 00000000003ca878 [anon:dalvik-classes.dex extracted in memory from /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/base.apk] (com.facebook.react.bridge.ModuleHolder.getModule+0)
#45 pc 000000000034d2c4 /apex/com.android.art/lib64/libart.so (art::interpreter::ExecuteSwitch(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.__uniq.112435418011751916792819755956732575238)+64) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#46 pc 000000000034cf68 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.2558608864111702944)+224) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#47 pc 000000000034c338 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+100) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#48 pc 00000000005a0798 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1072) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#49 pc 00000000004c9884 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp(art::interpreter::SwitchImplContext*)+848) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#50 pc 000000000033c5d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#51 pc 00000000003c8be8 [anon:dalvik-classes.dex extracted in memory from /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/base.apk] (com.facebook.react.bridge.JavaModuleWrapper.findMethods+0)
#52 pc 000000000034d2c4 /apex/com.android.art/lib64/libart.so (art::interpreter::ExecuteSwitch(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.__uniq.112435418011751916792819755956732575238)+64) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#53 pc 000000000034cf68 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.2558608864111702944)+224) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#54 pc 000000000034c338 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+100) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#55 pc 00000000005a0798 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1072) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#56 pc 00000000004c9884 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp(art::interpreter::SwitchImplContext*)+848) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#57 pc 000000000033c5d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#58 pc 00000000003c8b5c [anon:dalvik-classes.dex extracted in memory from /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/base.apk] (com.facebook.react.bridge.JavaModuleWrapper.getMethodDescriptors+0)
#59 pc 000000000034d2c4 /apex/com.android.art/lib64/libart.so (art::interpreter::ExecuteSwitch(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.__uniq.112435418011751916792819755956732575238)+64) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#60 pc 000000000034cf68 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.2558608864111702944)+224) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#61 pc 000000000031fcb0 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+960) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#62 pc 000000000033a108 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#63 pc 000000000032356c /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+556) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#64 pc 00000000003a59ec /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithVarArgsart::ArtMethod*(art::ScopedObjectAccessAlreadyRunnable const&, _jobject**, art::ArtMethod**, std::__va_list)+1100) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#65 pc 000000000048d1f4 /apex/com.android.art/lib64/libart.so (art::JNI::CallObjectMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::___va_list)+136) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#66 pc 000000000034e560 /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, std::_______va__list, art::Primitive::Type, art::InvokeType) (.__uniq.99033978352804627313491551960229047428)+352) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#67 pc 000000000034e3d8 /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallObjectMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::___va_list) (.__uniq.99033978352804627313491551960229047428.llvm.2238404560522432993)+72) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#68 pc 0000000000215420 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (_JNIEnv::CallObjectMethod(_jobject*, _jmethodID*, ...)+188) (BuildId: bbb324ec0fb48f1f)
#69 pc 0000000000215228 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (facebook::jni::JMethod<facebook::jni::detail::JTypeFor<facebook::jni::JList<facebook::jni::detail::JTypeFor<facebook::react::JMethodDescriptor, facebook::jni::JObject, void>::_javaobject*>, facebook::jni::JCollection<facebook::jni::detail::JTypeFor<facebook::react::JMethodDescriptor, facebook::jni::JObject, void>::_javaobject*>, void>::_javaobject* ()>::operator()(facebook::jni::alias_ref<_jobject*>) const+92) (BuildId: bbb324ec0fb48f1f)
#70 pc 0000000000213884 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (facebook::react::JavaModuleWrapper::getMethodDescriptors()+212) (BuildId: bbb324ec0fb48f1f)
#71 pc 00000000002132b4 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (facebook::react::JavaNativeModule::getMethods()+104) (BuildId: bbb324ec0fb48f1f)
#72 pc 0000000000289a0c /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (facebook::react::ModuleRegistry::getConfig(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&)+1044) (BuildId: bbb324ec0fb48f1f)
#73 pc 00000000003f0da8 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes_executor.so (facebook::react::JSINativeModules::createModule(facebook::jsi::Runtime&, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&)+256) (BuildId: 053c82a073c7e5cf)
#74 pc 00000000003f0b68 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes_executor.so (facebook::react::JSINativeModules::getModule(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)+296) (BuildId: 053c82a073c7e5cf)
#75 pc 00000000003edd88 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes_executor.so (facebook::react::JSIExecutor::NativeModuleProxy::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)+276) (BuildId: 053c82a073c7e5cf)
#76 pc 00000000003e27f4 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes_executor.so (facebook::jsi::DecoratedHostObject::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)+88) (BuildId: 053c82a073c7e5cf)
#77 pc 000000000007ade0 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes.so (BuildId: 016799ffb75bf3e796697529927ab930c4fb7909)
#78 pc 00000000000bfd74 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes.so (BuildId: 016799ffb75bf3e796697529927ab930c4fb7909)
#79 pc 00000000000a7668 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes.so (BuildId: 016799ffb75bf3e796697529927ab930c4fb7909)
#80 pc 00000000000a48ec /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes.so (BuildId: 016799ffb75bf3e796697529927ab930c4fb7909)
#81 pc 00000000000e79f4 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes.so (BuildId: 016799ffb75bf3e796697529927ab930c4fb7909)
#82 pc 000000000006f314 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes.so (BuildId: 016799ffb75bf3e796697529927ab930c4fb7909)
#83 pc 000000000006f164 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes.so (facebook::hermes::HermesRuntime::evaluateJavaScriptWithSourceMap(std::__ndk1::shared_ptr<facebook::jsi::Buffer const> const&, std::__ndk1::shared_ptr<facebook::jsi::Buffer const> const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&)+100) (BuildId: 016799ffb75bf3e796697529927ab930c4fb7909)
#84 pc 0000000000070828 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes.so (BuildId: 016799ffb75bf3e796697529927ab930c4fb7909)
#85 pc 00000000003e0738 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes_executor.so (facebook::jsi::RuntimeDecorator<facebook::jsi::Runtime, facebook::jsi::Runtime>::evaluateJavaScript(std::__ndk1::shared_ptr<facebook::jsi::Buffer const> const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&)+60) (BuildId: 053c82a073c7e5cf)
#86 pc 00000000003dd898 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes_executor.so (BuildId: 053c82a073c7e5cf)
#87 pc 00000000003ea75c /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes_executor.so (facebook::react::JSIExecutor::loadBundle(std::__ndk1::unique_ptr<facebook::react::JSBigString const, std::__ndk1::default_delete<facebook::react::JSBigString const> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator >)+336) (BuildId: 053c82a073c7e5cf)
#88 pc 000000000029a6f0 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#89 pc 000000000029a5b0 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#90 pc 000000000029a548 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#91 pc 000000000029a508 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#92 pc 0000000000299218 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#93 pc 00000000002a69c4 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#94 pc 00000000002a6924 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (std::__ndk1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const+60) (BuildId: bbb324ec0fb48f1f)
#95 pc 00000000002a68d8 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#96 pc 00000000002a6860 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#97 pc 00000000002a6814 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#98 pc 00000000002a67ec /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#99 pc 00000000002a5564 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#100 pc 00000000003d726c /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes_executor.so (BuildId: 053c82a073c7e5cf)
#101 pc 00000000003d7228 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libhermes_executor.so (std::__ndk1::function<void ()>::operator()() const+20) (BuildId: 053c82a073c7e5cf)
#102 pc 0000000000208e20 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#103 pc 0000000000208d9c /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#104 pc 0000000000208d50 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#105 pc 0000000000208d28 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#106 pc 0000000000207b60 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libreactnativejni.so (BuildId: bbb324ec0fb48f1f)
#107 pc 0000000000015e84 /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libfbjni.so (facebook::jni::detail::MethodWrapper<void (facebook::jni::JNativeRunnable::)(), &(facebook::jni::JNativeRunnable::run()), facebook::jni::JNativeRunnable, void>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject>)+32) (BuildId: 27496b9e5551bff5c79496b936b663bf8868c68b)
#108 pc 0000000000015dfc /data/app/~~vygQ_4IqgMWJ6yhBzc7Awg==/com.ninegap.payqual-FH2PKyu5KcSov9dSjxHfMw==/lib/arm64/libfbjni.so (facebook::jni::detail::FunctionWrapper<void ()(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject>), facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject*, void>::call(_JNIEnv*, _jobject**, void (**)(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject*>))+60) (BuildId: 27496b9e5551bff5c79496b936b663bf8868c68b)
#109 pc 0000000000339fb4 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#110 pc 000000000032356c /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+556) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#111 pc 00000000002a1b60 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+144) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#112 pc 00000000005a0798 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1072) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#113 pc 00000000004c9884 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp(art::interpreter::SwitchImplContext*)+848) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#114 pc 000000000033c5d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#115 pc 00000000001ceee8 /system/framework/framework.jar (android.os.Handler.handleCallback+0)
#116 pc 000000000034d2c4 /apex/com.android.art/lib64/libart.so (art::interpreter::ExecuteSwitch(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.__uniq.112435418011751916792819755956732575238)+64) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#117 pc 000000000034cf68 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.2558608864111702944)+224) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#118 pc 000000000034c338 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+100) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#119 pc 00000000005a0798 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, bool, art::JValue*)+1072) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#120 pc 00000000004c9884 /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp(art::interpreter::SwitchImplContext*)+848) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#121 pc 000000000033c5d8 /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#122 pc 00000000001ced30 /system/framework/framework.jar (android.os.Handler.dispatchMessage+0)
#123 pc 000000000034d2c4 /apex/com.android.art/lib64/libart.so (art::interpreter::ExecuteSwitch(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.__uniq.112435418011751916792819755956732575238)+64) (BuildId: c047e27e2dcc76674c9edad3f19dcbd0)
#124 pc 000000000034cf68 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238.llvm.2558608864111702944)+224) (BuildId: c047e27e2dcc7667

@takameyer
Copy link
Contributor

@njmulsqb Thanks for reporting. One thing that sticks out to me right away is how you are initializing your Realm.App. Try replacing the following:

const app = Realm.App.getApp(process.env.REALM_APP_ID); // <-- Replace this
const app = new Realm.App({id: process.env.REALM_APP_ID}); // <-- With this

getApp will return null if new Realm.App was never called.

Also, can you track down what exact line of code is causing your crash?

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Apr 4, 2023
@njmulsqb
Copy link
Author

njmulsqb commented Apr 4, 2023

@takameyer,
I have replaced the code as you mentioned and tried to console.log(app) to see what is it returning, so it returned {} empty object.
It is to be noted that I can see some connection logs being established on the realm app

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Apr 4, 2023
@takameyer
Copy link
Contributor

takameyer commented Apr 4, 2023

@njmulsqb It is expected for the app to return a log an empty object. Under the hood it is a c++ object and we haven't enumerated any visible properties.
Is the login part working? I also suggest implementing the error callback on your sync configuration:

      schema: [User.schema],
      sync: {
        user: user,
        partitionValue: `email=${email}`,
        error: (session, error) => console.log(error)
      },
    });

@njmulsqb
Copy link
Author

njmulsqb commented Apr 4, 2023

@takameyer
I just rebuilt the app and now it is not crashing but realm.objects is returning empty object whereas the remote collection does contain the data

@takameyer
Copy link
Contributor

@njmulsqb That's great that it's not crashing. It could be the partitionValue not lining up correctly. I would recommend not using partition based sync, but instead set up flexible sync. Here is the documentation:
https://www.mongodb.com/docs/realm/sdk/node/examples/flexible-sync/
I'm closing the issue for now, since the crash is gone.

@sync-by-unito sync-by-unito bot removed the Needs-Attention Reporter has responded. Review comment. label Apr 4, 2023
@njmulsqb
Copy link
Author

njmulsqb commented Apr 4, 2023

@takameyer,

Thank you, I switched to flexible sync and the issue is same with it, this is the code

const app = new Realm.App({id:process.env.REALM_APP_ID});


async function getUserByEmail(email) {
  const credentials = Realm.Credentials.anonymous();
  try {
    const user = await app.logIn(credentials);

    const realm = await Realm.open({
      schema: [User.schema],
      sync: {
        user,
        flexible: true,
      },
    });
    //const userData = realm.objects("Users")?.filtered(`email = "${email}"`)[0];
    const userData = realm.objects("Users")
    return userData;
  } catch (error) {
    console.error("Failed to log in", error);
  }
}

[] is being returned

@takameyer
Copy link
Contributor

takameyer commented Apr 4, 2023

@njmulsqb You will need to setup a subscription to what data you want to read. See bootstrap the realm with initial subscriptions. You can either use the initialSubscription property to do this on the sync configuration, or use realm.subscriptions.update to set the subscription after opening realm

@njmulsqb
Copy link
Author

njmulsqb commented Apr 4, 2023

@takameyer,
I have tried setting up initialSubscription with

async function getUserByEmail(email) {
  const credentials = Realm.Credentials.anonymous();
  try {
    const user = await app.logIn(credentials);

    const realm = await Realm.open({
      schema: [User.schema],
      sync: {
        user,
        flexible: true,
        newRealmFileBehavior: { type: "openImmediately" },
        existingRealmFileBehavior: { type: "openImmediately" },
        error: (error) => {
          console.error("A sync error occurred:", error);
        },
         initialSubscriptions: {
          update: (subs, realm) => {
            subs.add(realm.objects("users").filtered(`email == "${email}"`));
           },
         },
      },
    });
    
    console.log(`Realm app connected: ${app.currentUser != null}`);
    const userData = realm.objects("users")
    const specificUser = userData.filtered('email == "najamulsaqib@tutamail.com"')
    console.log('subscriptions:',JSON.parse(JSON.stringify(realm.subscriptions.state)))
    return specificUser;
  } catch (error) {
    console.error("Failed to log in", error);
  }
}

but it doesnt work and still returns empty array. P.s. the subscription state which is being printed out is pending
With other method,

async function getUserByEmail(email) {
  const credentials = Realm.Credentials.anonymous();
  try {
    const user = await app.logIn(credentials);

    const realm = await Realm.open({
      schema: [User.schema],
      sync: {
        user,
        flexible: true,
        newRealmFileBehavior: { type: "openImmediately" },
        existingRealmFileBehavior: { type: "openImmediately" },
        error: (error) => {
          console.error("A sync error occurred:", error);
        },
        // initialSubscriptions: {
        //   update: (subs, realm) => {
        //     subs.add(realm.objects("users").filtered(`email == "${email}"`));
        //   },
        // },
      },
    });
    
    console.log(`Realm app connected: ${app.currentUser != null}`);

    //const userData = realm.objects("Users")?.filtered(`email = "${email}"`)[0];
    const userData = realm.objects("users")
    const specificUser = userData.filtered('email == "najamulsaqib@tutamail.com"')
    await realm.subscriptions.update((mutableSubs) => {
      console.log('adding subs')
      mutableSubs.add(specificUser,{name:"specificUserSubscription"})
    });
    console.log('subscriptions:',JSON.parse(JSON.stringify(realm.subscriptions.state)))
    return userData;
  } catch (error) {
    console.error("Failed to log in", error);
  }
}

The app gets stuck on mutableSubs.add line and does not execute rest of the code

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
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