从Xamarin.Forms iOS应用程序连接到Cosmos DB数据库时遇到问题。我位于加拿大西部,我正在测试当世界各地的用户使用我的应用程序时会发生什么。我原来的数据库位于美国西部数据中心,使用该位置时我可以毫无问题地登录我的应用程序。我添加了France(中央)作为读取位置,并进行了手动故障转移以使其也成为主要写入位置。现在,当我在iOS上登录我的应用程序时,它崩溃了(有时是在连接到数据库之后,有时是在连接时)。这仅在物理设备上发生,模拟器似乎可以正常运行,在Android设备上的安装也可以正常运行。
我还对所有方法调用进行了异常处理,但是没有处理异常,而是使应用崩溃了。
我正在使用Microsoft.Azure.DocumentDB.Core Nuget软件包的1.9.1版本。我尝试升级到2.0.0预览版,但这没有帮助。我还创建了一个新的数据库,并发出了使用多主机预览功能的请求,以便可以测试是否有多个写主机,看看是否可以解决问题。
在将符号加载到App Center时遇到了一些问题,但这是到目前为止我在崩溃中所能找到的:
- libsystem_kernel.dylib __pthread_kill
- libsystem_c.dylib中止
- Forms.Mobile.iOS log_callback(char const *,char const *,char const *,int,void *)runtime.m:1211
- Forms.Mobile.iOS monoeg_g_logv goutput.c:115
- Forms.Mobile.iOS monoeg_assertion_message goutput.c:135
- Forms.Mobile.iOS get_this_async_id debugger-agent.c:4831
- Forms.Mobile.iOS ss_start调试器-agent.c:5709
- Forms.Mobile.iOS process_breakpoint debugger-agent.c:5097
- Forms.Mobile.iOS debugger_agent_breakpoint_from_context debugger-agent.c:5465
- Forms.Mobile.iOS sdb_breakpoint_trampoline
- Forms.Mobile.iOS Forms_Mobile_ViewModels_LoginViewModel__Verifyd__64_MoveNext(c:\ code \ Forms \ Forms.Mobile \ Forms.Mobile \ Forms.Mobile \ ViewModels \ LoginViewModel.cs:228)
- Forms.Mobile.iOS System_Runtime_CompilerServices_AsyncMethodBuilderCore_MoveNextRunner_InvokeMoveNext_object
- Forms.Mobile.iOS System_Threading_ExecutionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool
- Forms.Mobile.iOS System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool
- Forms.Mobile.iOS System_Runtime_CompilerServices_AsyncMethodBuilderCore_MoveNextRunner_Run
- Forms.Mobile.iOS System_Threading_Tasks_AwaitTaskContinuation_InvokeAction_object
- Forms.Mobile.iOS System_Threading_Tasks_AwaitTaskContinuation_RunCallback_System_Threading_ContextCallback_object_System_Threading_Tasks_Task _
- Forms.Mobile.iOS System_Threading_Tasks_SynchronizationContextAwaitTaskContinuation_Run_System_Threading_Tasks_Task_bool
- Forms.Mobile.iOS System_Threading_Tasks_Task_FinishContinuations
- Forms.Mobile.iOS System_Threading_Tasks_Task_FinishStageThree
- Forms.Mobile.iOS System_Threading_Tasks_Task_1_System_Threading_Tasks_VoidTaskResult_TrySetResult_System_Threading_Tasks_VoidTaskResult
- Forms.Mobile.iOS System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_System_Threading_Tasks_VoidTaskResult_SetResult_System_Threading_Tasks_VoidTaskResult
- Forms.Mobile.iOS System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_System_Threading_Tasks_VoidTaskResult_SetResult_System_Threading_Tasks_Task_1_System_Threading_Tasks_VoidTaskResult
- Forms.Mobile.iOS System_Runtime_CompilerServices_AsyncTaskMethodBuilder_SetResult
- Forms.Mobile.iOS Forms_Common_Services_DbService__Connectd__17_MoveNext(c:\ code \ Forms \ Forms.Formon.Services \ DbService.cs:108)
- Forms.Mobile.iOS System_Runtime_CompilerServices_AsyncMethodBuilderCore_MoveNextRunner_InvokeMoveNext_object
- Forms.Mobile.iOS System_Threading_ExecutionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool
- Forms.Mobile.iOS System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool
- Forms.Mobile.iOS System_Runtime_CompilerServices_AsyncMethodBuilderCore_MoveNextRunner_Run
- Forms.Mobile.iOS System_Threading_Tasks_SynchronizationContextAwaitTaskContinuation__c ___ cctorb__7_0_object
- Forms.Mobile.iOS UIKitSynchronizationContext.cs:24
- Forms.Mobile.iOS NSAction.cs:125
- Forms.Mobile.iOS wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
- Forms.Mobile.iOS mono_jit_runtime_invoke mini-runtime.c:2782
- Forms.Mobile.iOS mono_runtime_invoke_checked object.c:2887
- Forms.Mobile.iOS mono_runtime_invoke object.c:2941
- Forms.Mobile.iOS native_to_managed_trampoline_3(objc_object *,objc_selector *,_MonoMethod **,unsigned int)注册器.m:100
- Forms.Mobile.iOS-[__ MonoMac_NSAsyncActionDispatcher xamarinApplySelector] registrar.m:11088
- 基金会__NSThreadPerformPerform
- CoreFoundation CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
- CoreFoundation __CFRunLoopDoSource0
- CoreFoundation __CFRunLoopDoSources0
- CoreFoundation __CFRunLoopRun
- CoreFoundation CFRunLoopRunSpecific
- GraphicsServices GSEventRunModal
- UIKit UIApplicationMain
- Forms.Mobile.iOS wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string ___ intptr_intptr
- Forms.Mobile.iOS UIApplication.cs:79
- Forms.Mobile.iOS UIApplication.cs:63
- Forms.Mobile.iOS Forms_Mobile_iOS_Application_Main_string__(c:\ code \ Forms \ Forms.Mobile \ Forms.Mobile \ Forms.Mobile.iOS \ Main.cs:17)
- Forms.Mobile.iOS wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
- Forms.Mobile.iOS mono_jit_runtime_invoke mini-runtime.c:2782
- Forms.Mobile.iOS mono_runtime_invoke_checked object.c:2887
- Forms.Mobile.iOS mono_runtime_exec_main_checked object.c:4784
- Forms.Mobile.iOS mono_jit_exec驱动程序.g.c:1210
- Forms.Mobile.iOS xamarin_main monotouch-main.m:485
- Forms.Mobile.iOS main main.m:228
- libdyld.dylib开始
感谢您提供的任何帮助或建议,
格雷格