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

Connecting to Metamask doesn't work for most of the people #243

Open
ammarvohra opened this issue Aug 30, 2024 · 24 comments
Open

Connecting to Metamask doesn't work for most of the people #243

ammarvohra opened this issue Aug 30, 2024 · 24 comments

Comments

@ammarvohra
Copy link

@skibitsky
Describe the bug
WalletConnect model view open up, click on MetaMask and sometimes the popup is blank and sometime user doesn't get connect popup on MetaMask and when they get, sometimes they are not redirected back to the game.
This happens with lot of phone models and that is serious issue we got right now on our plate. Please help me resolve this issue

Expected behavior
Expected to connect with the wallet

Screenshots
Skype_Picture_2024_08_30T10_55_03_145Z

Environment

  • OS: Windows
  • Unity version 2022.3.20
  • WalletConnectUnity Modal v1.1.11

Is this happening in Unity Editor or on a player like Android, iOS, Windows?
We just have Android version right now and it's happening in that

Wallets used for testing
MetaMask

Additional context
Bug report from Crashlytics:

       Fatal Exception: java.lang.Exception: AggregateException : One or more errors occurred. (Unable to connect to the remote server)
       at System.Threading.Tasks.Task.ThrowIfExceptional(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task`1[TResult].GetResultCore(System.Threading.Tasks.Task`1[TResult])
       at WalletConnectSharp.Common.Utils.Extensions.WithTimeout[T](WalletConnectSharp.Common.Utils.Extensions)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task`1[TResult].TrySetResult(System.Threading.Tasks.Task`1[TResult])
       at System.Threading.Tasks.TaskFactory+CompleteOnInvokePromise.Invoke(System.Threading.Tasks.TaskFactory+CompleteOnInvokePromise)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Core.Controllers.Relayer.Request[T,TR](WalletConnectSharp.Core.Controllers.Relayer)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Network.JsonRpcProvider.Request[T,TR](WalletConnectSharp.Network.JsonRpcProvider)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Network.JsonRpcProvider.Connect(WalletConnectSharp.Network.JsonRpcProvider)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.ThreadPoolWorkQueue.Dispatch(System.Threading.ThreadPoolWorkQueue)
       at WalletConnectSharp.Core.Controllers.Subscriber.RpcBatchSubscribe(WalletConnectSharp.Core.Controllers.Subscriber)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Common.Utils.Extensions.WithTimeout[T](WalletConnectSharp.Common.Utils.Extensions)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task`1[TResult].TrySetResult(System.Threading.Tasks.Task`1[TResult])
       at System.Threading.Tasks.TaskFactory+CompleteOnInvokePromise.Invoke(System.Threading.Tasks.TaskFactory+CompleteOnInvokePromise)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Core.Controllers.Relayer.Request[T,TR](WalletConnectSharp.Core.Controllers.Relayer)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Network.JsonRpcProvider.Request[T,TR](WalletConnectSharp.Network.JsonRpcProvider)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Network.JsonRpcProvider.Connect(WalletConnectSharp.Network.JsonRpcProvider)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.ThreadPoolWorkQueue.Dispatch(System.Threading.ThreadPoolWorkQueue)
       at WalletConnectSharp.Core.Controllers.Subscriber.BatchSubscribe(WalletConnectSharp.Core.Controllers.Subscriber)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Core.Controllers.Subscriber.RpcBatchSubscribe(WalletConnectSharp.Core.Controllers.Subscriber)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Common.Utils.Extensions.WithTimeout[T](WalletConnectSharp.Common.Utils.Extensions)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task`1[TResult].TrySetResult(System.Threading.Tasks.Task`1[TResult])
       at System.Threading.Tasks.TaskFactory+CompleteOnInvokePromise.Invoke(System.Threading.Tasks.TaskFactory+CompleteOnInvokePromise)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Core.Controllers.Relayer.Request[T,TR](WalletConnectSharp.Core.Controllers.Relayer)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Network.JsonRpcProvider.Request[T,TR](WalletConnectSharp.Network.JsonRpcProvider)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Network.JsonRpcProvider.Connect(WalletConnectSharp.Network.JsonRpcProvider)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.ThreadPoolWorkQueue.Dispatch(System.Threading.ThreadPoolWorkQueue)
       at WalletConnectSharp.Core.Controllers.Subscriber.CheckPending(WalletConnectSharp.Core.Controllers.Subscriber)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Core.Controllers.Subscriber.BatchSubscribe(WalletConnectSharp.Core.Controllers.Subscriber)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Core.Controllers.Subscriber.RpcBatchSubscribe(WalletConnectSharp.Core.Controllers.Subscriber)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Common.Utils.Extensions.WithTimeout[T](WalletConnectSharp.Common.Utils.Extensions)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task`1[TResult].TrySetResult(System.Threading.Tasks.Task`1[TResult])
       at System.Threading.Tasks.TaskFactory+CompleteOnInvokePromise.Invoke(System.Threading.Tasks.TaskFactory+CompleteOnInvokePromise)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Core.Controllers.Relayer.Request[T,TR](WalletConnectSharp.Core.Controllers.Relayer)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Network.JsonRpcProvider.Request[T,TR](WalletConnectSharp.Network.JsonRpcProvider)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.Finish(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task.TrySetException(System.Threading.Tasks.Task)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Network.JsonRpcProvider.Connect(WalletConnectSharp.Network.JsonRpcProvider)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Threading.ThreadPoolWorkQueue.Dispatch(System.Threading.ThreadPoolWorkQueue)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_1(System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Threading.ThreadPoolWorkQueue.Dispatch(System.Threading.ThreadPoolWorkQueue)
@skibitsky
Copy link
Member

Hello,

Does this issue occur only on Android device, or does it also happen in the Editor? If it does happen in the Editor, have you noticed whether the target platform in the build settings affects it (e.g. can you reproduce the issue if the target platform is set to Windows)?

@ammarvohra
Copy link
Author

No I've not faced this issue on Unity Editor, this happens on Android devices only.

@skibitsky
Copy link
Member

Do you use any proxy or VPN on Android?

Could you please also try changing the relay url in the WalletConnectProjectConfig scriptable asset from wss://relay.walletconnect.com to wss://relay.walletconnect.org? The former one isn't accessible in some regions.

@ammarvohra
Copy link
Author

I am not sure with the VPN because I cannot connect with all of my users, and do you think that changing the relay url will solve the problem?

@skibitsky
Copy link
Member

I am not sure with the VPN because I cannot connect with all of my users, and do you think that changing the relay url will solve the problem?

That error message is pretty vague. It's possible that the issue is caused by poor connection on the client side. But I still recommend you to update the url because wss://relay.walletconnect.org can be accessed from restricted areas, such as the PRC. We now use it as the default relay url, but if you imported the SDK into the project a while ago, you may still be using the old url.

@skibitsky
Copy link
Member

skibitsky commented Aug 30, 2024

@ammarvohra is it possible to identify when approximately did start receiving reports of Fatal Exception: java.lang.Exception: AggregateException : One or more errors occurred. (Unable to connect to the remote server)?

What Android versions are affected? Phone models?

@ammarvohra
Copy link
Author

ammarvohra commented Aug 31, 2024

@skibitsky Numbers of models are affected, I am sharing the screenshots:

WalletConnect
WalletConnect2
WalletConnect3
WalletConnect4

@ammarvohra
Copy link
Author

@skibitsky Even after changing the Relay url, they can't see the popup where redirect happens

PFA
vlcsnap-2024-09-01-22h20m53s971

@ammarvohra
Copy link
Author

@skibitsky do you know why this issue is happening?

@ammarvohra
Copy link
Author

Walletconnect.mp4

@skibitsky
Copy link
Member

I've been trying to reproduce the issue across different Android versions by simulating poor network conditions, but so far, I've had no success. It's possible that the issue is caused by another dependency. Do you use NativeWebSocket directly or is it integrated through any third-party dependency in your project?

Another possibility is that this could be a Unity bug. Although it's unlikely to solve the issue, it could be worth trying the classic Unity troubleshooting steps: deleting the Library folder and making a clean Android build.

@ammarvohra
Copy link
Author

No I don't use NativeWebSocket neither directly nor with 3rd party plugins. Apart from WalletConnect I am using, ReadyPlayerMe and Nethereum packages.
Though I'll give it a try to create a clean build.

@skibitsky
Copy link
Member

@ammarvohra could you please also try setting Internet Access to Require in the Player settings for Android?

@ammarvohra
Copy link
Author

@skibitsky
If you want to try with our game, this is the game link: https://play.google.com/store/apps/details?id=com.gami.knockoutwars
Use ALPHA as invite code that will let you get registered.

@ammarvohra
Copy link
Author

@skibitsky We have that as Required field, though I'll double check that one

@skibitsky
Copy link
Member

Thank you for providing the link 🙏

I've tested your game on both physical and virtual Android devices with various OS versions and network conditions, but so far, I haven't been able to reproduce the issue.

Do the users experiencing this issue happen to share the same location?

@ammarvohra
Copy link
Author

I haven't checked the user location yet will do it tomorrow, but one of our community member reported this issue first from Nigeria, I'll check other locations too and will update you.

@ammarvohra
Copy link
Author

@skibitsky I've checked the backend data and the Countries that are replicating this issues are Nigeria, Egypt and Indonesia (major issues from Nigeria), if you could rectify the problem and solution that would be great.

Also on a quick note that I tried giving Nigerian person a build with Metamask sdk, and that worked fine for them.

@ammarvohra
Copy link
Author

@skibitsky Clean build doesn't resolved the issue either, but when they connect VPN to different location they were able to go through next screen and they are redirected to the Metamask.

So is there any other solution that can helps us to resolve this issue? We need to start the campaign, marketing, etc as we are on final phase to release this game to public, so if you could help us figure this out it would be a great help.
Thanks.

@skibitsky
Copy link
Member

@ammarvohra I opened a PR that replaces NativeWebSocket with another library. Could you please try installing com.walletconnect.core from that branch? One way to do that is to place com.walletconnect.core folder into Packages directory in your Unity project.

@ammarvohra
Copy link
Author

ammarvohra commented Sep 4, 2024

@skibitsky Sure, I'll do that and will update you.

Thanks

@ammarvohra
Copy link
Author

@skibitsky that also worked with VPN not without it

@skibitsky
Copy link
Member

@ammarvohra, it's probably the network issue on the user side.

@ammarvohra
Copy link
Author

ammarvohra commented Sep 5, 2024

@skibitsky But the VPN thing works well for them, and it's about most of the people in Nigeria

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

No branches or pull requests

2 participants