Question Error with Xamarin Forms iOS release build

DaveJonker

New member
Joined
Jul 6, 2021
Messages
3
Programming Experience
10+
I'm developing an app with Xamarin Forms for Android and iOS.

The Android version is in the store and is working fine.

The iOS version however works perfectly in debug mode, but whenever I install the app in release mode on a device, it crashes immediately.

I'm not getting much info when it crashes, but this is what I'm able to log:

CallContext.LogicalGetData (System.String )
System.Diagnostics
CorrelationManager.get_ActivityId ()
Microsoft.Azure.Cosmos.ActivityScope
Microsoft.Azure.Cosmos.ActivityScope..ctor (System.Guid activityId) <0x106c6d570 + 0x0002f> in <908f52fa2d71491f9d0af93469cedaec#571c84de367aff99c9a9dd63a567fef4>:0
Microsoft.Azure.Cosmos
ClientContextCore.RunWithDiagnosticsHelperAsync[TResult] (Microsoft.Azure.Cosmos.Tracing.ITrace trace, System.Func`2[T,TResult] task)
Microsoft.Azure.Cosmos
ClientContextCore.OperationHelperWithRootTraceAsync[TResult] (System.String operationName, Microsoft.Azure.Cosmos.RequestOptions requestOptions, System.Func`2[T,TResult] task, Microsoft.Azure.Cosmos.Tracing.TraceComponent traceComponent, Microsoft.Azure.Cosmos.Tracing.TraceLevel traceLevel)
*AppName*.Services
LiveDataStoreGameType.GetAll_AzureAsync (System.Boolean forceRefresh, *AppName*.Shared.enCulture culture)

Does anyone have any idea what to do or what this is? It's almost as if the app isn't able to download anything (but I know for a fact that it has a connection).

Any help is appreciated!
 

DaveJonker

New member
Joined
Jul 6, 2021
Messages
3
Programming Experience
10+
Unfortunately there is no other crash log. The first page in the app is a "sync" page. On Android this page syncs the data ok and it takes a couple of minutes. On iOS however, the page shows and then immediately goes to the next page.

Then the app crashes, so my guess is that the app is unable to fetch any data.
 

NoUserHere

Well-known member
Joined
Sep 5, 2018
Messages
2,138
Programming Experience
10+
Apply some error logging until you can narrow the issue. Without seen the code, it's hard to say. It doesn't really matter if Android works, and iOS does not. Because they both depend on entirely different API's. Error logging is currently your best bet. Have you run it through emulation to replicate the issue? That can be done while the debugger is still attached.
 

DaveJonker

New member
Joined
Jul 6, 2021
Messages
3
Programming Experience
10+
Hi,
Sorry for the late response...

I can narrow it down to the Azure Cosmos DB package. Everytime I want some data from Azure Cosmos the app doesn't do what it's suppose to. But it is really hard to get more exception data; the app crashes before it can be send. And debugging in release mode doesn't seem to work either.

I did manage to get this error from the app:

C#:
CallContext.LogicalGetData (System.String)
System.NotSupportedException: Linked Away
-----------------------------------------
System.Runtime.Remoting.Messaging
CallContext.LogicalGetData (System.String )
System.Diagnostics
CorrelationManager.get_ActivityId ()
Microsoft.Azure.Cosmos.ActivityScope
Microsoft.Azure.Cosmos.ActivityScope..ctor (System.Guid activityId) <0x106c6d570 + 0x0002f> in <908f52fa2d71491f9d0af93469cedaec#571c84de367aff99c9a9dd63a567fef4>:0
Microsoft.Azure.Cosmos
ClientContextCore.RunWithDiagnosticsHelperAsync[TResult] (Microsoft.Azure.Cosmos.Tracing.ITrace trace, System.Func`2[T,TResult] task)
Microsoft.Azure.Cosmos
ClientContextCore.OperationHelperWithRootTraceAsync[TResult] (System.String operationName, Microsoft.Azure.Cosmos.RequestOptions requestOptions, System.Func`2[T,TResult] task, Microsoft.Azure.Cosmos.Tracing.TraceComponent traceComponent, Microsoft.Azure.Cosmos.Tracing.TraceLevel traceLevel)
ProjectName.Services
LiveDataStoreGameType.GetAll_AzureAsync (System.Boolean forceRefresh, ProjectName.Shared.enCulture culture)

Does this mean anything to you?
 
Top Bottom