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

Problem: initialize error in metaverse demo #298

Open
leejw51crypto opened this issue Apr 7, 2023 · 67 comments
Open

Problem: initialize error in metaverse demo #298

leejw51crypto opened this issue Apr 7, 2023 · 67 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@leejw51crypto
Copy link
Collaborator

PlayCppSdk InitializeWalletConnect Error: socket error: TLS error: webpki error: UnsupportedCriticalExtension
Getting from EnsureSession error: invalid client

@leejw51crypto
Copy link
Collaborator Author

trying to reproduce on windows

@leejw51crypto leejw51crypto added the good first issue Good for newcomers label Apr 7, 2023
@elai950
Copy link

elai950 commented Apr 7, 2023

Just to clarify, I'm getting PlayCppSdk InitializeWalletConnect Error: socket error: TLS error: webpki error: UnsupportedCriticalExtension when I call ConnectWalletConnect function.

And from EnsureSession function the message is: EnsureSession error: invalid client.

All the Erc20 functions in DefiWalletCoreActor works perfectly so I assume that my configurations are correct.

I did some digging and I've found something that might be related.
EnsureSession shows an Invalid client.

I noticed this warning while compiling:

'E:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Marketplace\CronosPlay\Source\ThirdParty\PlayCppSdkLibrary\Lib\Win64\play_cpp_sdk.lib' does not exist
'E:\Program Files\Epic Games\UE_5.1\Engine\Source\Ncrypt.lib' does not exist.
'E:\Program Files\Epic Games\UE_5.1\Engine\Source\userenv.lib' does not exist.
'E:\Program Files\Epic Games\UE_5.1\Engine\Source\bcrypt.lib' does not exist.
'E:\Program Files\Epic Games\UE_5.1\Engine\Source\ntdll.lib' does not exist.
'E:\Program Files\Epic Games\UE_5.1\Engine\Source\Secur32.lib' does not exist.
'E:\Program Files\Epic Games\UE_5.1\Engine\Source\crypt32.lib' does not exist.
'E:\Program Files\Epic Games\UE_5.1\Engine\Source\ws2_32.lib' does not exist.

Check the file PlayCppSdkLibrary.Build.cs.

The first line which is play_cpp_sdk.lib is actually exactly where the address says he isn't (??).
All the rest really don't exist.
Tried to reinstall the plugin but that didn't work.

So in PlayCppSdkLibrary.Build.cs, you have a condition for Win64 platform type, and you're adding those files that one of them I have (but it says I don't) and all the others are missing so maybe that's related to why it isn't working.

@leejw51crypto
Copy link
Collaborator Author

ok, i'll check on windows

@elai950
Copy link

elai950 commented Apr 8, 2023

Opened a new blank project and still had the same Invalid Client error.
Tried with UE 5.0 (using 5.1 as the main version) and installed the plugin fresh and still the same.

Windows 10 64-bit.
I'm trying to debug the code now.
Wish I could help somehow to solve that problem.

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 11, 2023

thanks, i'm checking now.
started for this issue

@damoncro
Copy link
Contributor

damoncro commented Apr 11, 2023

It is working fine in my setting, what chain_id and rpc are you using?
@elai950 @leejw51crypto

@damoncro
Copy link
Contributor

The error was generated by https://briansmith.org/rustdoc/webpki/enum.Error.html#variant.UnsupportedCriticalExtension that possibly originated from tokio-tungstenite, it seems it was generated when you connected to the chain that possibly has compatible issue.

@leejw51crypto
Copy link
Collaborator Author

i tested plugin version in marketplace and metaverse in github
, modified metaverse uproject

{
			"Name": "CronosPlayUnreal",
			"Enabled": true
}

working fine.
can be os issue or visual studio ?
os: windows 11
visual studio: visual studio 2019

@leejw51crypto
Copy link
Collaborator Author

maybe update windows?

@elai950
Copy link

elai950 commented Apr 11, 2023

Windows 10 64 bit up-to-date.
Visual Studio 2022, was compiled successfully.
UE 5.1.1

Rpc: https://evm-dev-t3.cronos.org/
Chain Id: 338

I'm able to get balance and transfer tokens using ERC20 functions so I really can't understand what's the problem with the connect wallet and qr code, the invalid client etc.

Also tested RPC: https://evm-dev.cronos.org/
And Chain Id: 25

Still an Invalid client error and the UnsupportedCriticalExtension one.

@damoncro
Copy link
Contributor

Hi @elai950
To make it simple first, would you able to download the demo project and test with it first?

https://github.com/cronos-labs/play-unreal-demo/releases/download/v0.0.9-alpha/CronosPlayMetaverseDemo.zip

Simply open the uproject then click play.

Would like to know if it is still the same.

@elai950
Copy link

elai950 commented Apr 11, 2023

Hi @elai950
To make it simple first, would you able to download the demo project and test with it first?

https://github.com/cronos-labs/play-unreal-demo/releases/download/v0.0.9-alpha/CronosPlayMetaverseDemo.zip

Simply open the uproject then click play.

Would like to know if it is still the same.

Yea, that's what I did. Still has the same error.
I ran the project and started walking towards the connect widget, the text changed to Scan QR code but no qr has appeared.
If I debug it I get an Invalid Client from the session and UnsupportedCriticalExtension.
I feel like I forgot to do something, besides just installing the plugin from the Epic launcher.

@damoncro
Copy link
Contributor

You can uninstall the plugin installed by marketplace and try again, since the demo already includes the plugin.

@damoncro
Copy link
Contributor

damoncro commented Apr 11, 2023

QR is only generated if the session was created between your machine and walletconnect's server. Try to disable VPN or change another network.

@elai950
Copy link

elai950 commented Apr 11, 2023

Not using VPN.
Using the default windows defender (if it's related somehow).
Can understand what's the problem here.
Tried reinstalling it but had no luck.

@elai950
Copy link

elai950 commented Apr 11, 2023

This is the logs

צילום מסך 2023-04-11 171258
צילום מסך 2023-04-11 171411

@damoncro
Copy link
Contributor

ok, let me double check.

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 12, 2023

i see, i'll check further
maybe we need to upgrade tls module used by play-cpp-sdk?
by some reason, tls certificate from wc 1.0 is not received by our tls module.

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 12, 2023

reproduced by setting time to incorrect one

wallet connect error=socket error: IO error: invalid peer certificate contents: invalid peer certificate: CertNotValidYet

but not the same error

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 12, 2023

i uploaded to test tls
https://github.com/leejw51crypto/play-cpp-sdk/tree/tls

  • install rust
  • install visual studio 2019
  • git clone git@github.com:leejw51crypto/play-cpp-sdk.git
  • git checkout tls
  • cd play-cpp-sdk
  • window_build.bat , ignore cmake errors
  • cd demo\demo\x64\Release
  • demo.exe

if it runs fine, unreal plugin will also work, qrcode will be displayed

@elai950
Copy link

elai950 commented Apr 12, 2023

i uploaded to test tls https://github.com/leejw51crypto/play-cpp-sdk/tree/tls

  • install rust
  • install visual studio 2019
  • git clone git@github.com:leejw51crypto/play-cpp-sdk.git
  • git checkout tls
  • cd play-cpp-sdk
  • window_build.bat , ignore cmake errors
  • cd demo\demo\x64\Release
  • demo.exe

if it runs fine, unreal plugin will also work, qrcode will be displayed

When trying the clone command you wrote here it failed with an error about SSH.
So I cloned it using HTTP but no .exe file was found anywhere (did the build before that).
I had only debug folder in demo/demo/x64/Debug.

@leejw51crypto
Copy link
Collaborator Author

window_build.bat will compile it.
you need cmake, visual studio 2019 installed beforehand.

i'm wondering whether demo.exe runs successfully

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 12, 2023

@elai950 , could you try with ssh first?

git clone https://github.com/leejw51crypto/play-cpp-sdk.git

if that works, we can assume that https working good.

@elai950
Copy link

elai950 commented Apr 12, 2023

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

That's the error when trying to clone using ssh.

@leejw51crypto
Copy link
Collaborator Author

ok, just ssh issue

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 12, 2023

source & setup

compile & run

  • open x64 native tools command prompt for vs 2019 <- to use msbuild
  • go to project folder
  • cd play-cpp-sdk\demo
  • msbuild .\demo.sln -t:rebuild -property:Configuration=Release /p:Platform=x64
  • cd demo\x64\Release (so location is play-cpp-sdk\demo\demo\x64\Release)
  • run demo.exe

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 17, 2023

thanks, i can reduce the problem area
installing windows 10 + visual studo 2022

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 17, 2023

replaced ssh with https, could you retry again?

  • git pull --rebase
  • and same commands
    i'm installing fresh windows 10, check too

Used the Developer Command Prompt v17.5.3 VS 2022 I tried that but the build failed. That's the error and the command (the whole process).

Still, no demo.exe file exists.

C:\play-cpp-sdk\demo>msbuild .\demo.sln -t:rebuild -property:Configuration=Release /p:Platform=x64
MSBuild version 17.5.1+f6fdcf537 for .NET Framework
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 13/04/2023 19:06:53.
Included response file: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\MSBuild.rsp

Project "C:\play-cpp-sdk\demo\demo.sln" on node 1 (rebuild target(s)).
ValidateSolutionConfiguration:
  Building solution configuration "Release|x64".
Project "C:\play-cpp-sdk\demo\demo.sln" (1) is building "C:\play-cpp-sdk\demo\demo\demo.vcxproj" (2) on node 1 (Rebuild
 target(s)).
PrepareForBuild:
  Creating directory "x64\Release\demo.tlog\".
InitializeBuildStatus:
  Creating "x64\Release\demo.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
PreBuildEvent:
  cd ..
  call C:\play-cpp-sdk\demo\pre_build.bat
  :VCEnd
  Submodule 'defi-wallet-core-rs' (git@github.com:crypto-com/defi-wallet-core-rs.git) registered for path 'defi-wallet-
  core-rs'
  Submodule 'demo/third_party/easywsclient' (git@github.com:dhbaird/easywsclient.git) registered for path 'demo/third_p
  arty/easywsclient'
  Submodule 'demo/third_party/json' (git@github.com:nlohmann/json.git) registered for path 'demo/third_party/json'
  Cloning into 'C:/play-cpp-sdk/defi-wallet-core-rs'...
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  fatal: clone of 'git@github.com:crypto-com/defi-wallet-core-rs.git' into submodule path 'C:/play-cpp-sdk/defi-wallet-
  core-rs' failed
  Failed to clone 'defi-wallet-core-rs'. Retry scheduled
  Cloning into 'C:/play-cpp-sdk/demo/third_party/easywsclient'...
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  fatal: clone of 'git@github.com:dhbaird/easywsclient.git' into submodule path 'C:/play-cpp-sdk/demo/third_party/easyw
  sclient' failed
  Failed to clone 'demo/third_party/easywsclient'. Retry scheduled
  Cloning into 'C:/play-cpp-sdk/demo/third_party/json'...
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  fatal: clone of 'git@github.com:nlohmann/json.git' into submodule path 'C:/play-cpp-sdk/demo/third_party/json' failed
  Failed to clone 'demo/third_party/json'. Retry scheduled
  Cloning into 'C:/play-cpp-sdk/defi-wallet-core-rs'...
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  fatal: clone of 'git@github.com:crypto-com/defi-wallet-core-rs.git' into submodule path 'C:/play-cpp-sdk/defi-wallet-
  core-rs' failed
  Failed to clone 'defi-wallet-core-rs' a second time, aborting
  Traceback (most recent call last):
    File "C:\play-cpp-sdk\demo\helper.py", line 218, in <module>
      copy_example_files(".")
    File "C:\play-cpp-sdk\demo\helper.py", line 145, in copy_example_files
      shutil.copy(f, output_path)
    File "C:\Python311\Lib\shutil.py", line 419, in copy
      copyfile(src, dst, follow_symlinks=follow_symlinks)
    File "C:\Python311\Lib\shutil.py", line 256, in copyfile
      with open(src, 'rb') as fsrc:
           ^^^^^^^^^^^^^^^
  FileNotFoundError: [Errno 2] No such file or directory: '../defi-wallet-core-rs/example/cpp-example/chainmain.cc'
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(149,5): e
rror MSB3073: The command "cd .. [C:\play-cpp-sdk\demo\demo\demo.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(149,5): e
rror MSB3073: call C:\play-cpp-sdk\demo\pre_build.bat [C:\play-cpp-sdk\demo\demo\demo.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(149,5): e
rror MSB3073: :VCEnd" exited with code 1. [C:\play-cpp-sdk\demo\demo\demo.vcxproj]
Done Building Project "C:\play-cpp-sdk\demo\demo\demo.vcxproj" (Rebuild target(s)) -- FAILED.

Project "C:\play-cpp-sdk\demo\demo.sln" (1) is building "C:\play-cpp-sdk\demo\demostatic\demostatic.vcxproj" (3) on nod
e 1 (Rebuild target(s)).
PrepareForBuild:
  Creating directory "x64\Release\demostatic.tlog\".
InitializeBuildStatus:
  Creating "x64\Release\demostatic.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
PreBuildEvent:
  cd ..
  call C:\play-cpp-sdk\demo\pre_build.bat
  :VCEnd
  Cloning into 'C:/play-cpp-sdk/defi-wallet-core-rs'...
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  fatal: clone of 'git@github.com:crypto-com/defi-wallet-core-rs.git' into submodule path 'C:/play-cpp-sdk/defi-wallet-
  core-rs' failed
  Failed to clone 'defi-wallet-core-rs'. Retry scheduled
  Cloning into 'C:/play-cpp-sdk/demo/third_party/easywsclient'...
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  fatal: clone of 'git@github.com:dhbaird/easywsclient.git' into submodule path 'C:/play-cpp-sdk/demo/third_party/easyw
  sclient' failed
  Failed to clone 'demo/third_party/easywsclient'. Retry scheduled
  Cloning into 'C:/play-cpp-sdk/demo/third_party/json'...
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  fatal: clone of 'git@github.com:nlohmann/json.git' into submodule path 'C:/play-cpp-sdk/demo/third_party/json' failed
  Failed to clone 'demo/third_party/json'. Retry scheduled
  Cloning into 'C:/play-cpp-sdk/defi-wallet-core-rs'...
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  fatal: clone of 'git@github.com:crypto-com/defi-wallet-core-rs.git' into submodule path 'C:/play-cpp-sdk/defi-wallet-
  core-rs' failed
  Failed to clone 'defi-wallet-core-rs' a second time, aborting
  Traceback (most recent call last):
    File "C:\play-cpp-sdk\demo\helper.py", line 218, in <module>
      copy_example_files(".")
    File "C:\play-cpp-sdk\demo\helper.py", line 145, in copy_example_files
      shutil.copy(f, output_path)
    File "C:\Python311\Lib\shutil.py", line 419, in copy
      copyfile(src, dst, follow_symlinks=follow_symlinks)
    File "C:\Python311\Lib\shutil.py", line 256, in copyfile
      with open(src, 'rb') as fsrc:
           ^^^^^^^^^^^^^^^
  FileNotFoundError: [Errno 2] No such file or directory: '../defi-wallet-core-rs/example/cpp-example/chainmain.cc'
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(149,5): e
rror MSB3073: The command "cd .. [C:\play-cpp-sdk\demo\demostatic\demostatic.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(149,5): e
rror MSB3073: call C:\play-cpp-sdk\demo\pre_build.bat [C:\play-cpp-sdk\demo\demostatic\demostatic.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(149,5): e
rror MSB3073: :VCEnd" exited with code 1. [C:\play-cpp-sdk\demo\demostatic\demostatic.vcxproj]
Done Building Project "C:\play-cpp-sdk\demo\demostatic\demostatic.vcxproj" (Rebuild target(s)) -- FAILED.

Done Building Project "C:\play-cpp-sdk\demo\demo.sln" (rebuild target(s)) -- FAILED.


Build FAILED.

"C:\play-cpp-sdk\demo\demo.sln" (rebuild target) (1) ->
"C:\play-cpp-sdk\demo\demo\demo.vcxproj" (Rebuild target) (2) ->
(PreBuildEvent target) ->
  C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(149,5):
 error MSB3073: The command "cd .. [C:\play-cpp-sdk\demo\demo\demo.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(149,5): e
rror MSB3073: call C:\play-cpp-sdk\demo\pre_build.bat [C:\play-cpp-sdk\demo\demo\demo.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(149,5): e
rror MSB3073: :VCEnd" exited with code 1. [C:\play-cpp-sdk\demo\demo\demo.vcxproj]


"C:\play-cpp-sdk\demo\demo.sln" (rebuild target) (1) ->
"C:\play-cpp-sdk\demo\demostatic\demostatic.vcxproj" (Rebuild target) (3) ->
  C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(149,5):
 error MSB3073: The command "cd .. [C:\play-cpp-sdk\demo\demostatic\demostatic.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(149,5): e
rror MSB3073: call C:\play-cpp-sdk\demo\pre_build.bat [C:\play-cpp-sdk\demo\demostatic\demostatic.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(149,5): e
rror MSB3073: :VCEnd" exited with code 1. [C:\play-cpp-sdk\demo\demostatic\demostatic.vcxproj]

    0 Warning(s)
    2 Error(s)

@leejw51crypto
Copy link
Collaborator Author

reproduced on windows 11, debugging now

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 17, 2023

@elai950 , when calling ConnectWalletConnect,

  • url: set like http://localhost:8080/
  • icon urls: empty or if any, it should be url like "http://..."
    then i think, it will continue

cronos-labs/play-cpp-sdk#426
i will fix this issue~

@elai950
Copy link

elai950 commented Apr 17, 2023

Yea but for this URL I need to run a Hardhat node for example, am I right? And in the URL assign the hardhat port.
Because this doesn't work either, I tried putting http://localhost:8545/ while running hardhat node and same results.

Can I use these settings?
Rpc: https://evm-dev-t3.cronos.org/
Chain Id: 338

@leejw51crypto
Copy link
Collaborator Author

it should work, i'll check further.
it's connected via websocket
http-> ws
https-> wss

@leejw51crypto
Copy link
Collaborator Author

maybe setup like this?
image

@elai950
Copy link

elai950 commented Apr 17, 2023

2023-04-17 20_39_41-Window

Tried that, and also tried running localhost with a hardhat node but same result in all of them.
Every URL combination, every chain id 25 or 338 all was the same error.

Both ConnectWalletConnect and InitializeWalletConnect.

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 17, 2023

how about url like http://localhost:8080/ ?
the same error TLS error: webpki error: UnsupportedCriticalExtension displayed?

i think url is not rpc endpoint, it should be bridge url?

@elai950
Copy link

elai950 commented Apr 17, 2023

Yes, the same results.
Tried both localhost:8545 and 8080.
While running a hardhat node.
Tried to disable the firewall as well thought it might be a reason for that but no.

@leejw51crypto
Copy link
Collaborator Author

how about url as http://127.0.0.1 ?
without port

@leejw51crypto
Copy link
Collaborator Author

image

@elai950
Copy link

elai950 commented Apr 17, 2023

Same results.
Tried just now.
Exactly the same settings.

(CustomEvent) PlayCppSdk InitializeWalletConnect Error: socket error: TLS error: webpki error: UnsupportedCriticalExtension

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 17, 2023

don't call ConnectWalletConnect first.(don't have session info, so empty client, ensure_session fails)

call InitializeWalletConnect first, then check true is displayed.
then connection is ok

because ConnectWalletConnect restores Client, it's different one

@elai950
Copy link

elai950 commented Apr 17, 2023

I did all the tests on both Init and Connect just to be sure.

I think that first, we need to solve the session problem.
Because it won't connect if the session didn't create and the client is invalid (there's an if condition in the code if the client is invalid then throw that error).

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 17, 2023

yes, so it's like this

  • InitializeWalletConnect
  • GetQRCode or string, display
  • EnsureSession
  • Sign

ConnectWalletConnect is for restoring session,(after first pairing, saved to disk?) , maybe you can use later
for ref: https://github.com/cronos-labs/play-cpp-sdk/blob/main/wallet-connect/examples/web3.rs

@elai950
Copy link

elai950 commented Apr 17, 2023

Yes, I first call the InitializeWalletConnect.
But see this:

2023-04-17 21_26_24-Window

The last line, assert. if the client is invalid the whole process fails with that Invalid Client error which resulting UnsupportedCriticalExtension.

I might be wrong I'm not pretending to understand how the whole code works but from my understanding first, the client bug should be resolved.

BTW,
Where's the sessioninfo.json file should be saved? because I can't find he's location to verify that that file was even created.

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 18, 2023

yes, it should work. strange

i'll do the same today to reproduce

  • InitializeWalletConnect
  • ConnectWalletConnect

unreal has special place to save,
it's saved by calling SaveClient or called OnNewSession, then addtional pairing not necessary.

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 18, 2023

could you try not to call ConnectWalletConnect,
and like this?
image

ensure session should be called after websocket is made and active, if not invalid client
initializewalletconnect takes about 2 or 3 seconds in my pc

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 18, 2023

i'm checking ConnectWalletConnect now
ref: #301

@elai950
Copy link

elai950 commented Apr 18, 2023

I'm failing in the callback of InitializeWalletConnect with success == false.
With the error we mentioned.

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 18, 2023

@elai950 could you check one more test?

if above works, very strange, some issues in plugin code
if not working, like tls issue , replace to use native tls

@leejw51crypto
Copy link
Collaborator Author

found similar issue: snapview/tokio-tungstenite#231

@leejw51crypto
Copy link
Collaborator Author

changed root certificate type
ref: cronos-labs/play-cpp-sdk#433

@elai950
Copy link

elai950 commented Apr 20, 2023

@elai950 could you check one more test?

if above works, very strange, some issues in plugin code if not working, like tls issue , replace to use native tls

Tried this, and got the same error:

Error: SocketError(TLS error: webpki error: UnsupportedCriticalExtension

Caused by:
   0: webpki error: UnsupportedCriticalExtension
   1: UnsupportedCriticalExtension

Location:
    C:\CodingNote\test-walletconnect\src\client\socket.rs:337:35)
error: process didn't exit successfully: `target\debug\examples\web3.exe` (exit code: 1)

@leejw51crypto
Copy link
Collaborator Author

leejw51crypto commented Apr 21, 2023

thanks, for testing
i assume it's by tokio-tungstenite certificate handling
cronos-labs/play-cpp-sdk#433

currently, we're using native , which is dependent to user's system setting,
change to webpki (root certificates curated by Mozilla)

after this pr, merged, we will ship to our next plugin release

@elai950
Copy link

elai950 commented Apr 25, 2023

Hey guys,
Just updating don't know if it helps or if you managed to find and solve the problem.
I got a new PC today brand new, with a fresh Windows 11 64-bit.
This problem is still reproduced.

@damoncro
Copy link
Contributor

damoncro commented Apr 26, 2023

I noticed @leejw51crypto posted a new commit on play-cpp-sdk which is the library that used in play-unreal-plugin. I guess, it possibly fixed the issue. But we haven't brought it to play-unreal-unreal, likely be released at next version (v0.0.20-alpha).

Would you @elai950 like to try it out?
Kindly follow the step in https://github.com/cronos-labs/play-cpp-sdk#windows-1

It builds alongs wallet_connect.exe example which initialises the wallet_connect and print the QR code.
Check the CI action here: https://github.com/cronos-labs/play-cpp-sdk/actions/runs/4783717180/jobs/8504308181#step:9:229

Kindly know that please install python and msvc, you can check how we build in CI: https://github.com/cronos-labs/play-cpp-sdk/blob/main/.github/workflows/win-build.yml

Once QR is shown, the problem should be fixed.

@elai950
Copy link

elai950 commented Jun 17, 2023

Hey guys,
Any news about this issue? still getting the error btw.

@damoncro
Copy link
Contributor

Walletconnect 1.0 is about to sunset, @leejw51crypto is working on walletconnect 2.0. You can try once it is ready.

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

No branches or pull requests

3 participants