Uploaded image for project: 'Realm Core'
  1. Realm Core
  2. RCORE-1672

The app crashed due to an error in the serverless function

      SDK and version

      SDK : Realm swift
      Version: 10.40.0

      Observations

      • How frequent do the crash occur?
        Everytime there is an error in the backend the app crash even after proper error handling on both ends, which does not happen in android sdk and should not happen
      • Does it happen in production or during dev/test?
        every environment
      • Can the crash be reproduced by you?
        yes
      • Can you provide instructions for how we can reproduce it?
        mark some field as required in the schema and then call a function from the ios sdk, function that will insert a document (do not pass the required field) to the collection the client app crashes

      Crash log / stacktrace

      <!-- The full stack trace. -->

      [realm-core-13.13.0] Assertion failed: ErrorCodes::error_categories(code).test(ErrorCategory::runtime_error)
      0 Gopalganj 0x00000001038c7b44 ZN5realm4utilL18terminate_internalERNSt3_118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
      1 Gopalganj 0x00000001038c7b24 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 308
      2 Gopalganj 0x00000001038c79f0 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 0
      3 Gopalganj 0x000000010317fc50 ZN5realm12RuntimeErrorC2ENS_10ErrorCodes5ErrorENSt3_117basic_string_viewIcNS3_11char_traitsIcEEEE + 196
      4 Gopalganj 0x00000001034967fc ZN5realm3app8AppErrorC2ENS_10ErrorCodes5ErrorENSt3_112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESA_NS4_8optionalIiEE + 184
      5 Gopalganj 0x0000000103496ad0 ZN5realm3app8AppErrorC1ENS_10ErrorCodes5ErrorENSt3_112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESA_NS4_8optionalIiEE + 44
      6 Gopalganj 0x000000010348140c _ZN5realm3app8AppUtils16check_for_errorsERKNS0_8ResponseE + 1024
      7 Gopalganj 0x000000010347c86c ZZN5realm3app3App24do_authenticated_requestEONS0_7RequestERKNSt3110shared_ptrINS_8SyncUserEEEONS_4util14UniqueFunctionIFvRKNS0_8ResponseEEEEEN4$_10clESE + 44
      8 Gopalganj 0x000000010347c77c ZN5realm4util14UniqueFunctionIFvRKNS_3app8ResponseEEE12SpecificImplIZNS2_3App24do_authenticated_requestEONS2_7RequestERKNSt3110shared_ptrINS_8SyncUserEEEOS7_E4$_10E4callES5 + 36
      9 Gopalganj 0x00000001034589f0 ZNK5realm4util14UniqueFunctionIFvRKNS_3app8ResponseEEEclES5

      • 108
        10 Gopalganj 0x0000000103458604 _ZN5realm3app3App33handle_possible_redirect_responseEONS0_7RequestERKNS0_8ResponseEONS_4util14UniqueFunctionIFvS6_EEE + 124
        11 Gopalganj 0x000000010347be70 ZZZN5realm3app3App26update_metadata_and_resendEONS0_7RequestEONS_4util14UniqueFunctionIFvRKNS0_8ResponseEEEERKNSt318optionalINSC_12basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEEEEEN3$_8clERKNSD_IS6_EEENUlS3_S8_E_clES3_S8 + 56
        12 Gopalganj 0x000000010347bd68 ZN5realm4util14UniqueFunctionIFvONS_3app7RequestERKNS2_8ResponseEEE12SpecificImplIZZNS2_3App26update_metadata_and_resendES4_ONS1_IFvS7_EEERKNSt318optionalINSF_12basic_stringIcNSF_11char_traitsIcEENSF_9allocatorIcEEEEEEEN3$_8clERKNSG_IS5_EEEUlS4_S7_E_E4callES4_S7 + 44
        13 Gopalganj 0x0000000103463788 ZNK5realm4util14UniqueFunctionIFvONS_3app7RequestERKNS2_8ResponseEEEclES4_S7 + 116
        14 Gopalganj 0x0000000103463708 ZZN5realm3app23GenericNetworkTransport22send_request_to_serverEONS0_7RequestEONS_4util14UniqueFunctionIFvS3_RKNS0_8ResponseEEEEENKUlS8_E_clES8 + 52
        15 Gopalganj 0x0000000103463638 ZN5realm4util14UniqueFunctionIFvRKNS_3app8ResponseEEE12SpecificImplIZNS2_23GenericNetworkTransport22send_request_to_serverEONS2_7RequestEONS1_IFvSB_S5_EEEEUlS5_E_E4callES5 + 36
        16 Gopalganj 0x0000000102c6ad34 ZNK5realm4util14UniqueFunctionIFvRKNS_3app8ResponseEEEclES5 + 108
        17 Gopalganj 0x0000000102c6a8d8 __ZN12_GLOBAL_N_121CocoaNetworkTransport22send_request_to_serverERKN5realm3app7RequestEONS1_4util14UniqueFunctionIFvRKNS2_8ResponseEEEE_block_invoke + 568
        18 Gopalganj 0x0000000102d1b2c8 -[RLMSessionDelegate URLSession:task:didCompleteWithError:] + 616
        19 CFNetwork 0x00000001cbadd47c CFURLRequestCopyHTTPRequestMethod + 2272
        20 libdispatch.dylib 0x000000010721053c _dispatch_call_block_and_release + 32
        21 libdispatch.dylib 0x0000000107211ff0 _dispatch_client_callout + 20
        22 libdispatch.dylib 0x000000010721a0a0 _dispatch_lane_serial_drain + 988
        23 libdispatch.dylib 0x000000010721adfc _dispatch_lane_invoke + 472
        24 libdispatch.dylib 0x0000000107227cac _dispatch_workloop_worker_thread + 740
        25 libsystem_pthread.dylib 0x0000000218bb0df8 _pthread_wqthread + 288
        26 libsystem_pthread.dylib 0x0000000218bb0b98 start_wqthread + 8
        !!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose2023-06-29 17:50:34.730343+0530 Gopalganj[11720:3614622] /Users/deepanshu/Library/Developer/Xcode/DerivedData/Gopalganj-cbkmoqlopfdyaugehidvfcgpuame/SourcePackages/checkouts/realm-core/src/realm/exceptions.cpp:104: [realm-core-13.13.0] Assertion failed: ErrorCodes::error_categories(code).test(ErrorCategory::runtime_error)
        0 Gopalganj 0x00000001038c7b44 ZN5realm4utilL18terminate_internalERNSt3_118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
        1 Gopalganj 0x00000001038c7b24 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 308
        2 Gopalganj 0x00000001038c79f0 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 0
        3 Gopalganj 0x000000010317fc50 ZN5realm12RuntimeErrorC2ENS_10ErrorCodes5ErrorENSt3_117basic_string_viewIcNS3_11char_traitsIcEEEE + 196
        4 Gopalganj 0x00000001034967fc ZN5realm3app8AppErrorC2ENS_10ErrorCodes5ErrorENSt3_112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESA_NS4_8optionalIiEE + 184
        5 Gopalganj 0x0000000103496ad0 ZN5realm3app8AppErrorC1ENS_10ErrorCodes5ErrorENSt3_112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESA_NS4_8optionalIiEE + 44
        6 Gopalganj 0x000000010348140c _ZN5realm3app8AppUtils16check_for_errorsERKNS0_8ResponseE + 1024
        7 Gopalganj 0x000000010347c86c ZZN5realm3app3App24do_authenticated_requestEONS0_7RequestERKNSt3110shared_ptrINS_8SyncUserEEEONS_4util14UniqueFunctionIFvRKNS0_8ResponseEEEEEN4$_10clESE + 44
        8 Gopalganj 0x000000010347c77c ZN5realm4util14UniqueFunctionIFvRKNS_3app8ResponseEEE12SpecificImplIZNS2_3App24do_authenticated_requestEONS2_7RequestERKNSt3110shared_ptrINS_8SyncUserEEEOS7_E4$_10E4callES5 + 36
        9 Gopalganj 0x00000001034589f0 ZNK5realm4util14UniqueFunctionIFvRKNS_3app8ResponseEEEclES5 + 108
        10 Gopalganj 0x0000000103458604 _ZN5realm3app3App33handle_possible_redirect_responseEONS0_7RequestERKNS0_8ResponseEONS_4util14UniqueFunctionIFvS6_EEE + 124
        11 Gopalganj 0x000000010347be70 ZZZN5realm3app3App26update_metadata_and_resendEONS0_7RequestEONS_4util14UniqueFunctionIFvRKNS0_8ResponseEEEERKNSt318optionalINSC_12basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEEEEEN3$_8clERKNSD_IS6_EEENUlS3_S8_E_clES3_S8 + 56
        12 Gopalganj 0x000000010347bd68 ZN5realm4util14UniqueFunctionIFvONS_3app7RequestERKNS2_8ResponseEEE12SpecificImplIZZNS2_3App26update_metadata_and_resendES4_ONS1_IFvS7_EEERKNSt318optionalINSF_12basic_stringIcNSF_11char_traitsIcEENSF_9allocatorIcEEEEEEEN3$_8clERKNSG_IS5_EEEUlS4_S7_E_E4callES4_S7 + 44
        13 Gopalganj 0x0000000103463788 ZNK5realm4util14UniqueFunctionIFvONS_3app7RequestERKNS2_8ResponseEEEclES4_S7 + 116
        14 Gopalganj 0x0000000103463708 ZZN5realm3app23GenericNetworkTransport22send_request_to_serverEONS0_7RequestEONS_4util14UniqueFunctionIFvS3_RKNS0_8ResponseEEEEENKUlS8_E_clES8 + 52
        15 Gopalganj 0x0000000103463638 ZN5realm4util14UniqueFunctionIFvRKNS_3app8ResponseEEE12SpecificImplIZNS2_23GenericNetworkTransport22send_request_to_serverEONS2_7RequestEONS1_IFvSB_S5_EEEEUlS5_E_E4callES5 + 36
        16 Gopalganj 0x0000000102c6ad34 ZNK5realm4util14UniqueFunctionIFvRKNS_3app8ResponseEEEclES5 + 108
        17 Gopalganj 0x0000000102c6a8d8 __ZN12_GLOBAL_N_121CocoaNetworkTransport22send_request_to_serverERKN5realm3app7RequestEONS1_4util14UniqueFunctionIFvRKNS2_8ResponseEEEE_block_invoke + 568
        18 Gopalganj 0x0000000102d1b2c8 -[RLMSessionDelegate URLSession:task:didCompleteWithError:] + 616
        19 CFNetwork 0x00000001cbadd47c CFURLRequestCopyHTTPRequestMethod + 2272
        20 libdispatch.dylib 0x000000010721053c _dispatch_call_block_and_release + 32
        21 libdispatch.dylib 0x0000000107211ff0 _dispatch_client_callout + 20
        22 libdispatch.dylib 0x000000010721a0a0 _dispatch_lane_serial_drain + 988
        23 libdispatch.dylib 0x000000010721adfc _dispatch_lane_invoke + 472
        24 libdispatch.dylib 0x0000000107227cac _dispatch_workloop_worker_thread + 740
        25 libsystem_pthread.dylib 0x0000000218bb0df8 _pthread_wqthread + 288
        26 libsystem_pthread.dylib 0x0000000218bb0b98 start_wqthread + 8
        !!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose

      Steps & Code to Reproduce

      <!-- What steps/operations resulted in the crash? Please show any relevant code or steps that WE can

      <!-- use to reproduce it. Even better is a full sample project that can reproduce the crash. -->
      <!-- Code and files can be shared privately at help@realm.io if needed. -->

            Assignee:
            michael.wilkersonbarker@mongodb.com Michael Wilkerson-Barker (Inactive)
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: