Open leejw51crypto opened 1 year ago
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
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).
yes, so it's like this
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
Yes, I first call the InitializeWalletConnect. But see this:
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.
yes, it should work. strange
i'll do the same today to reproduce
unreal has special place to save,
it's saved by calling SaveClient
or called OnNewSession, then addtional pairing not necessary.
could you try not to call ConnectWalletConnect,
and like this?
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
i'm checking ConnectWalletConnect now ref: https://github.com/cronos-labs/play-unreal-plugin/issues/301
I'm failing in the callback of InitializeWalletConnect with success == false. With the error we mentioned.
@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
found similar issue: https://github.com/snapview/tokio-tungstenite/issues/231
changed root certificate type ref: https://github.com/cronos-labs/play-cpp-sdk/pull/433
@elai950 could you check one more test?
- open windows terminal
- git clone https://github.com/leejw51crypto/CodingNote.git
- cd CodingNote\test-walletconnect
- run.bat or (cargo run --example web3)
- if qrcode displayed, unreal will also work
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)
thanks, for testing i assume it's by tokio-tungstenite certificate handling https://github.com/cronos-labs/play-cpp-sdk/pull/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
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.
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.
Hey guys, Any news about this issue? still getting the error btw.
Walletconnect 1.0 is about to sunset, @leejw51crypto is working on walletconnect 2.0. You can try once it is ready.
PlayCppSdk InitializeWalletConnect Error: socket error: TLS error: webpki error: UnsupportedCriticalExtension Getting from EnsureSession error: invalid client