最近搜索


没有最近搜索

Errors when the Internet is weak in Unity SDK



已于 2024年6月25日 发布

Hello guys!

We have integrated Zendesk SDK in our Unity project, and then we started to get errors if we tried to close the Zendesk popup with a weak Internet connection while running ZendeskSdk.Instance.Messaging.ShowMessagingAsync(). It looks like we need to pass a CancellationToken to the function arguments to force the coroutines to terminate.

 

[ZendeskLog]: Conversation Fields have been successfully set

 

[ZendeskLog]: [RTC] [WebSocket] Opened...

 

[ZendeskLog]: [RTC] ***************** CONNECTED

 

[ZendeskLog]: [RTC] [WebSocket] Message sending...

 

[ZendeskLog]: [RTC] [WebSocket] Message sent...

 

[ZendeskLog]: [RTC] [WebSocket] message receiving...

 

[ZendeskLog]: [RTC] [WebSocket] message received...

 

[ZendeskLog]: [RTC] [WebSocket] Message sending...

 

[ZendeskLog]: [RTC] [WebSocket] Message sent...

 

[ZendeskLog]: [RTC] [WebSocket] Message sending...

 

[ZendeskLog]: [RTC] [WebSocket] Message sent...

 

Exception: [ZendeskException] Object reference not set to an instance of an object.

 at UnityEngine.RectTransform.get_sizeDelta () [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.UI.MessagingLayoutController.get_MaxWidth () [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.UI.Messaging.MessageHistoryContextManager.TryGetLayoutDataAtIndex (System.Int32 messageIndex, Zendesk.Runtime.Messaging.LayoutData& layoutData) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.UI.Messaging.MessageHistoryContextManager.InitializeWithObservableMessageList () [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.UI.Messaging.ObservableList`1[T].InitializeWith (System.Collections.Generic.List`1[T] items) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.UI.Messaging.ContextAdapter.InitializeWithMessages (System.Collections.Generic.List`1[T] messages) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.UI.Scripts.ZMConversationViewController.Initialise (Zendesk.Runtime.UI.Scripts.ConversationScreenState state) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.Messaging.MessagingKit.RetrieveConversation () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.Messaging.MessagingKit.RetrieveMostRecentConversationForCurrentUser () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.Messaging.MessagingKit.ProcessUserAction[T] (System.Func`1[TResult] action) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.Messaging.MessagingKit.<RetrieveMostRecentConversationForCurrentUser>b__53_0 () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.API.ZendeskMessagingApi.GetConversation (System.String conversationId) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.MessagingCore.RestClient.Client.RestClient.PerformRequest[T] (Zendesk.MessagingCore.RestClient.Client.IRestRequest requestBuilder) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Th<truncated>

Zendesk.Runtime.UI.Scripts.<Initialise>d__12:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.Runtime.Messaging.<RetrieveConversation>d__52:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.Runtime.Messaging.<RetrieveMostRecentConversationForCurrentUser>d__53:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.Runtime.Messaging.<ProcessUserAction>d__45`1:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.Runtime.Messaging.<<RetrieveMostRecentConversationForCurrentUser>b__53_0>d:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.Runtime.API.<GetConversation>d__13:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.MessagingCore.RestClient.Client.<PerformRequest>d__4`1:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.Runtime.RestClient.<SendRequestAsync>d__3:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(Task`1)

Zendesk.Runtime.RestClient.<SendRequest>d__4:MoveNext()

UnityEngine.UnitySynchronizationContext:Exec()

 

Exception: [ZendeskException] Object reference not set to an instance of an object.

 at UnityEngine.MonoBehaviour.StartCoroutine (System.Collections.IEnumerator routine) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.UI.Scripts.ZMConversationViewController.Initialise (Zendesk.Runtime.UI.Scripts.ConversationScreenState state) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.Messaging.MessagingKit.RetrieveConversation () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.Messaging.MessagingKit.RetrieveMostRecentConversationForCurrentUser () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.Messaging.MessagingKit.ProcessUserAction[T] (System.Func`1[TResult] action) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.Messaging.MessagingKit.<RetrieveMostRecentConversationForCurrentUser>b__53_0 () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.API.ZendeskMessagingApi.GetConversation (System.String conversationId) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.MessagingCore.RestClient.Client.RestClient.PerformRequest[T] (Zendesk.MessagingCore.RestClient.Client.IRestRequest requestBuilder) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult (TResult result) [0x00000] in <00000000000000000000000000000000>:0 

 at Zendesk.Runtime.RestClient.UnityWebRequestWrapper.SendRequestAsync (Zendesk.MessagingCore.RestClient.Client.IRestRequest request) [0x00000] in <00000000000000000000000000000000>:0 

 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyn<truncated>

Zendesk.Runtime.Messaging.<ShowMessagingAsync>d__9:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetException(Exception)

Zendesk.Runtime.UI.Scripts.<Initialise>d__12:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.Runtime.Messaging.<RetrieveConversation>d__52:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.Runtime.Messaging.<RetrieveMostRecentConversationForCurrentUser>d__53:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.Runtime.Messaging.<ProcessUserAction>d__45`1:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.Runtime.Messaging.<<RetrieveMostRecentConversationForCurrentUser>b__53_0>d:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.Runtime.API.<GetConversation>d__13:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.MessagingCore.RestClient.Client.<PerformRequest>d__4`1:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(TResult)

Zendesk.Runtime.RestClient.<SendRequestAsync>d__3:MoveNext()

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(Task`1)

Zendesk.Runtime.RestClient.<SendRequest>d__4:MoveNext()

UnityEngine.UnitySynchronizationContext:Exec()

 

[ZendeskLog]: [RTC] [WebSocket] message receiving...

 

[ZendeskLog]: [RTC] [WebSocket] message received...

 

[ZendeskLog]: [RTC] Subscribed

 

[ZendeskLog]: [RTC] [WebSocket] message receiving...

 

[ZendeskLog]: [RTC] [WebSocket] message received...

 

[ZendeskLog]: Activity not supported yet

 


1

4

4 条评论

Can someone tell me how to solve this problem?

0


Can someone tell me how to solve this problem?

0


Bump.

0


image avatar

Anastasiya Kastsiushkina

Zendesk Product Manager

Hey Bogdan Bobkov and Appsyoulove Support,

I've just created a support ticket on your behalf and forwarded it to the appropriate team. 

Thanks for reporting the problem!

Best,
Anastasiya

0


请先登录再写评论。

找不到所需的内容?

新建帖子