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

WalletConnectModal.InitializeAsync() does not return #222

Open
BoysheO opened this issue Dec 13, 2024 · 4 comments
Open

WalletConnectModal.InitializeAsync() does not return #222

BoysheO opened this issue Dec 13, 2024 · 4 comments
Assignees

Comments

@BoysheO
Copy link
Contributor

BoysheO commented Dec 13, 2024

I encountered a troublesome bug..Here is the log for reference:

TimeoutException: socket stalled
      WalletConnectSharp.Common.Utils.Extensions.WithTimeout (System.Threading.Tasks.Task task, System.TimeSpan timeout, System.String message) (at <00000000000000000000000000000000>:0)
      System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0)
      System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () (at <00000000000000000000000000000000>:0)
      UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <00000000000000000000000000000000>:0)
      UnityEngine.UnitySynchronizationContext.Exec () (at <00000000000000000000000000000000>:0)
      --- End of stack trace from previous location where exception was thrown ---
      WalletConnectSharp.Core.Controllers.Relayer+<>c__DisplayClass87_0.<TransportOpen>g__Task2|4 () (at <00000000000000000000000000000000>:0)
      System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0)
      System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () (at <00000000000000000000000000000000>:0)
      System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) (at <00000000000000000000000000000000>:0)
      System.Threading.Tasks.Task.FinishContinuations () (at <00000000000000000000000000000000>:0)
      System.Threading.Tasks.Task.TrySetException (System.Object exceptionObject) (at <00000000000000000000000000000000>:0)
      System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException (System.Exception exception) (at <00000000000000000000000000000000>:0)
      WalletConnectSharp.Common.Utils.Extensions.WithTimeout (System.Threading.Tasks.Task task, System.TimeSpan timeout, System.String message) (at <00000000000000000000000000000000>:0)
      System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0)
      System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () (at <00000000000000000000000000000000>:0)
      UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <00000000000000000000000000000000>:0)
      UnityEngine.UnitySynchronizationContext.Exec () (at <00000000000000000000000000000000>:0)
      --- End of stack trace from previous location where exception was thrown ---
      System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <00000000000000000000000000000000>:0)
      UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <00000000000000000000000000000000>:0)
      UnityEngine.UnitySynchronizationContext.Exec () (at <00000000000000000000000000000000>:0)

When it occurred,WalletConnectModal.InitializeAsync() neither returns nor throws any exceptions.However, I need WalletConnectModal to be ready for use before our game starts.I also noticed that the timeout exception usually occurs on iOS.
Here are two questions I need help with:

1.Please provide a way to determine whether WalletConnectModal.InitializeAsync() is in progress, successful, or not, so I can offer a retry button to users promptly.
2.Why does it occur so frequently on iOS? Are we doing something incorrectly?

Copy link

linear bot commented Dec 13, 2024

@BoysheO
Copy link
Contributor Author

BoysheO commented Dec 17, 2024

We have received an increasing number of reports from Android users experiencing issues connecting to the wallet. Initially, we thought this issue was more prevalent on iOS, but it may simply be that iOS users are more proactive in providing feedback. Please provide a solution as soon as possible, as this has already caused some disruption to our business.

@0xFirekeeper
Copy link
Member

Hi @BoysheO according to WalletConnectUnity issues, the PR adding a connection timeout was their response, so I've set it to 180s on our end. Please see if this is resolved in https://github.com/thirdweb-dev/unity/releases/tag/v5.12.2

Further I'd recommend using your own project id from WalletConnect, you can edit Assets/Thirdweb/Plugins/WalletConnectUnity/Resources/WalletConnectProjectConfig.asset to do so.

@BoysheO
Copy link
Contributor Author

BoysheO commented Dec 17, 2024

The point is that WalletConnectModal.InitializeAsync() neither returns a value nor throws any exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants