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

WebSocketException: Unable to connect to the remote server - Android #19

Open
LukaszwBeamable opened this issue Nov 21, 2024 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@LukaszwBeamable
Copy link

LukaszwBeamable commented Nov 21, 2024

Hi i tried to build Unity project with Reown for Android and i'm blocked with WebSocketException issue, which occures after i chose wallet type from modal view (ofc. appKit initialization was sucesfull without any error etc.).

Fun fact: for webgl everyting is fine, i can connect without anny errors etc - all reown features works as expected.

Logs:
reown_android_logs.txt
Screens:
Screenshot_20241121-111712
Screenshot_20241121-111717

Do i need to add any extra Android Manifest setup to make it works, or problem is related to something completely different?

My Unity version is 2022.3.50f1

@skibitsky
Copy link
Member

Hello @LukaszwBeamable,

Have you verified any domain at cloud.reown.com? Do you experience issues only on Android device, or also in the Unity Editor with Android set as the target platform?

@LukaszwBeamable
Copy link
Author

@skibitsky Yes i have domain verifired, and i added Android Package Name in Reown Dashboard. In the Unity Editor with Android set as the target platform i can see fully initialized modals but i can only copy a link, hovewer i have an Argument Exception error with empty url when i try to do this:

image

@skibitsky
Copy link
Member

Thanks, this will be fixed in the next release today or tomorrow. Temporary workaround: remove domain verification in the cloud. Apologies for the inconvenience 🙏

@skibitsky skibitsky self-assigned this Nov 21, 2024
@skibitsky skibitsky added the bug Something isn't working label Nov 21, 2024
@skibitsky
Copy link
Member

Hello @LukaszwBeamable,

A potential solution was implemented in version 1.1.0. Could you please update to this version and verify whether the issue still occurs?

@talha-trili
Copy link

Hi @skibitsky, 1.1.0 gives the below error. Probably a forgotten namespace.
image

@skibitsky
Copy link
Member

Could you please try v1.1.1?

@talha-trili
Copy link

So that issue is gone but now i get 2 new ones unfortunately.
My dependencies

"dependencies"    : {
	"com.unity.nuget.newtonsoft-json": "3.2.1",
	"com.nethereum.unity"            : "4.26.0",
	"com.reown.core"                 : "1.1.0",
	"com.reown.core.crypto"          : "1.1.0",
	"com.reown.core.common"          : "1.1.0",
	"com.reown.core.network"         : "1.1.0",
	"com.reown.core.storage"         : "1.1.0",
	"com.reown.sign"                 : "1.1.0",
	"com.reown.sign.unity"           : "1.1.0",
	"com.reown.sign.nethereum"       : "1.1.0",
	"com.reown.sign.nethereum.unity" : "1.1.0",
	"com.reown.appkit.unity"         : "1.1.1"
  },

And it doesnt matter if i update all dependencies to 1.1.1

If i switch back to 1.0.1 it works so below versions are fine.

"dependencies"    : {
	"com.unity.nuget.newtonsoft-json": "3.2.1",
	"com.nethereum.unity"            : "4.26.0",
	"com.reown.core"                 : "1.1.0",
	"com.reown.core.crypto"          : "1.1.0",
	"com.reown.core.common"          : "1.1.0",
	"com.reown.core.network"         : "1.1.0",
	"com.reown.core.storage"         : "1.1.0",
	"com.reown.sign"                 : "1.1.0",
	"com.reown.sign.unity"           : "1.1.0",
	"com.reown.sign.nethereum"       : "1.1.0",
	"com.reown.sign.nethereum.unity" : "1.1.0",
	"com.reown.appkit.unity"         : "1.0.1"
  },

Error screenshots.
image
image

@skibitsky
Copy link
Member

The com.reown.unity.dependencies package is missing from your list of dependencies. Previously, there was an issue with the OpenUPM CLI that prevented all dependency packages from being installed. However, this issue was resolved a few months ago, as far as I recall.

Could you please try to update OpenUPM CLI and reinstall AppKit package?

npm i -g openupm-cli@latest
openupm remove com.reown.appkit.unity
openupm add com.reown.appkit.unity

If it doesn't help, you can try to install missing dependency manually?

openupm add com.reown.unity.dependencies

@talha-trili
Copy link

talha-trili commented Nov 25, 2024

@skibitsky , are you sure com.reown.unity.dependencies version 1.1.1 is available through openupm ? Or does it need time 🤔

I can see that the latest version is 1.1.0

EDIT:
Ah i see that build for 1.1.1 failed
https://openupm.com/packages/com.reown.unity.dependencies/?subPage=pipelines

@LukaszwBeamable
Copy link
Author

LukaszwBeamable commented Nov 25, 2024

@skibitsky Unfortunately looks like that updating SDK to 1.1.1 breaks previously working feature on WebGL (for Browser & Unity Editor too). In editor QR code and link are not generated at all (previously it worked), and in bowser i have js errors:

Editror:
image

Bowser:
image

@skibitsky
Copy link
Member

@LukaszwBeamable that was my mistake, sorry 🙏

I pushed a fix for com.reown.unity.dependencies and it's now available on OpenUPM.

Could you please share you project id so I could look deeper into your issue?

@LukaszwBeamable
Copy link
Author

@LukaszwBeamable that was my mistake, sorry 🙏

I pushed a fix for com.reown.unity.dependencies and it's now available on OpenUPM.

Could you please share you project id so I could look deeper into your issue?

27b6287f691898e2dd836dace4909784

@skibitsky
Copy link
Member

Indeed, there is an issue with AppKit in the Unity Editor when the target platform is set to WebGL. I’ll address this in the next patch. As a temporary workaround, you can switch to another platform to use AppKit in the Editor.

Regarding WebGL in the browser, I’ve been unable to reproduce the issue so far. Could you please describe the exact steps you followed and specify which wallet you used to connect? If you are using a browser extension, kindly include the browser name as well 🙏

@skibitsky
Copy link
Member

Hey @LukaszwBeamable,

Could you please confirm if the issue was fixed for you in v1.1.2?

@RambunctiousCookie
Copy link

RambunctiousCookie commented Dec 3, 2024

Hi, I am on 1.1.2 and the _connectionProposal.Uri never resolves. Platform is on Android (Unity native client).

I think my dependencies are correct?
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

I can connect to wallet apps when using the Reown.Customization.Unity example in the reown-dotnet folder, but otherwise there is no way to connect

@skibitsky
Copy link
Member

Hey @RambunctiousCookie,

Could you please open a new issue and include your code snippet and project id?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants