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

Crash when deleting/disabling user from MongoDB dashboard #7399

Closed
zcohan opened this issue Aug 17, 2021 · 2 comments
Closed

Crash when deleting/disabling user from MongoDB dashboard #7399

zcohan opened this issue Aug 17, 2021 · 2 comments
Assignees

Comments

@zcohan
Copy link

zcohan commented Aug 17, 2021

Goals

When deleting or disabling a signed-in user from the MongoDB Realm dashboard, my application crashes

Expected Results

I'm not sure what the correct way for handling a user being deleted is, but perhaps there's a notification of some kind? Certainly not a hard crash.

Actual Results

  • Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*

  • -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'

    • First throw call stack:
      (
      0 CoreFoundation 0x00007fff206d387b __exceptionPreprocess + 242
      1 libobjc.A.dylib 0x00007fff2040bd92 objc_exception_throw + 48
      2 CoreFoundation 0x00007fff207892ea _CFThrowFormattedException + 202
      3 CoreFoundation 0x00007fff20794dd1 -[__NSPlaceholderDictionary initWithCapacity:].cold.1 + 0
      4 CoreFoundation 0x00007fff205e2ecd -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 251
      5 CoreFoundation 0x00007fff205e2db8 ﹍[NSDictionary dictionaryWithObjects:forKeys:count:]﹍ 49
      6 Realm 0x0000000104dc1b7f _ZNSt3__110__function6__funcIZ77-[RLMSyncConfiguration initWithUser:partitionValue:customFileURL:stopPolicy:]E3$0NS_9allocatorIS2_EEFvNS_10shared_ptrIN5realm11SyncSessionEEENS6_9SyncErrorEEEclEOS8_OS9 + 987
      7 Realm 0x00000001051b3761 _ZNSt3__110__function6__funcIZN5realm11SyncSession14handle_refreshENS_10shared_ptrIS3_EEE3$0NS_9allocatorIS6_EEFvNS2_4util8OptionalINS2_3app8AppErrorEEEEEclEOSD + 1073
      8 Realm 0x00000001051bfc1f _ZNSt3__110__function6__funcIZN5realm8SyncUser19refresh_custom_dataENS_8functionIFvNS2_4util8OptionalINS2_3app8AppErrorEEEEEEE3$8NS_9allocatorISC_EESA_EclEOS9 + 223
      9 Realm 0x0000000105193863 _ZNSt3__110__function6__funcIZN5realm3app3App20refresh_access_tokenENS_10shared_ptrINS2_8SyncUserEEENS_8functionIFvNS2_4util8OptionalINS3_8AppErrorEEEEEEE4$22NS_9allocatorISF_EEFvNS3_8ResponseEEEclEOSI + 99
      10 Realm 0x0000000104c92575 ___ZN12_GLOBAL__N_121CocoaNetworkTransport22send_request_to_serverEN5realm3app7RequestENSt3__18functionIFvNS2_8ResponseEEEE_block_invoke + 508
      11 Realm 0x0000000104cc1e33 -[RLMSessionDelegate URLSession:task:didCompleteWithError:] + 398
      12 CFNetwork 0x00007fff24aa27e3 CFHTTPCookieStorageUnscheduleFromRunLoop + 161136
      13 libclang_rt.tsan_osx_dynamic.dylib 0x0000000103bbb5ac _ZN6__tsanL24invoke_and_release_blockEPv + 12
      14 libclang_rt.tsan_osx_dynamic.dylib 0x0000000103bbb302 _ZN6__tsanL22dispatch_callback_wrapEPv + 306
      15 libdispatch.dylib 0x0000000106f45264 _dispatch_client_callout + 8
      16 libdispatch.dylib 0x0000000106f4c7e7 _dispatch_lane_serial_drain + 776
      17 libdispatch.dylib 0x0000000106f4d6ec _dispatch_lane_invoke + 490
      18 libdispatch.dylib 0x0000000106f5b2c4 _dispatch_workloop_worker_thread + 1660
      19 libsystem_pthread.dylib 0x0000000106fe9b0d _pthread_wqthread + 314
      20 libsystem_pthread.dylib 0x0000000106fe8ae3 start_wqthread + 15
      )
      libc++abi: terminating with uncaught exception of type NSException
    • Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
      terminating with uncaught exception of type NSException

Steps for others to Reproduce

Sign-in using email/password authentication, observe an object in Realm, and then disable the user from the MongoDB dashboard or revoke their sessions.

Realm framework version:
10.10.0

Xcode version:
Version 12.5.1 (12E507)

iOS/OSX version:
macOS 11.4 (20F71)

@dianaafanador3
Copy link
Contributor

HI @zcohan thanks for informing this issue. We'll try to take a look at this and reproduce this issue, surely we don't want any app to crash in any particular use case.

dianaafanador3 added a commit that referenced this issue Aug 24, 2021
… user is disabled/deleted from MongoDB Realm dashboard (#7399)
dianaafanador3 added a commit that referenced this issue Aug 26, 2021
… user is disabled/deleted from MongoDB Realm dashboard (#7399)
dianaafanador3 added a commit that referenced this issue Sep 2, 2021
… user is disabled/deleted from MongoDB Realm dashboard (#7399)
dianaafanador3 added a commit that referenced this issue Sep 7, 2021
… user is disabled/deleted from MongoDB Realm dashboard (#7399)
dianaafanador3 added a commit that referenced this issue Sep 7, 2021
… user is disabled/deleted from MongoDB Realm dashboard (#7399)
dianaafanador3 added a commit that referenced this issue Sep 9, 2021
… user is disabled/deleted from MongoDB Realm dashboard (#7399)
@sync-by-unito
Copy link

sync-by-unito bot commented Sep 12, 2021

➤ Diana Maria Perez Afanador commented:

v10.15.0

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