sdk icon indicating copy to clipboard operation
sdk copied to clipboard

@tonconnect/ui: Can't connect wallet after .disconnect()

Open moltea opened this issue 1 year ago • 7 comments

Describe the bug

Can't reconnect wallet normally after tonConnectUI.disconnect(); (Works great in 2.0.2, doesn't work in latest)

Expected behavior

The wallet connects the first time and transactions are sent successfully.

Current behavior

After steps in "Steps to Reproduce" I get:

solid.js:894 Uncaught (in promise) Error: Unknown error
    at Wt (solid.js:894:10)
    at jt (solid.js:900:9)
    at solid.js:653:5
    at Lt (solid.js:623:18)
    at Ot (solid.js:725:7)
    at Pt (solid.js:823:36)
    at solid.js:792:34
    at Mt (solid.js:741:17)
    at solid.js:792:17
    at Mt (solid.js:742:5)

(tonConnectUI.wallet changes to real wallet, but modal doesn't close, events are not fired, and etc.) The wallet does not connect, the qr code remains. If I scan the qr code a second time, the wallet seems to be linked, but when I try to send the transaction via sendTransaction, it simply does not appear in the wallet (tonkeeper and etc).

Steps to Reproduce

Connected tonkeeper wallet (or any other available wallet) via connectWallet method Used tonConnectUI.disconnect(); Trying to connect wallet again, and scan the qr-code.

Environment

latest tonconnect/ui from unpkg OS: any Browser: any

Additional context

If i call connectWallet(), then i reload the page and call connectWallet() again, then everything will be fine, the wallet will be linked the first time and transactions will be sent.

moltea avatar Jun 04 '24 22:06 moltea

The same thing

nsake avatar Jul 25 '24 16:07 nsake

Looks like I have the same, because I have ton connect ui sdk errors, which I do not know how to handle but the qr code remains and I sometimes see Back to undefined in Wallet app

meri-maki avatar Oct 17 '24 18:10 meri-maki

same

HipsterCat avatar Dec 29 '24 10:12 HipsterCat

same

saymynameplsvip avatar Jan 04 '25 21:01 saymynameplsvip

image

saymynameplsvip avatar Jan 04 '25 21:01 saymynameplsvip

if somebody stucks with such problem in nextjs, just DO NOT USE server redirect.

rashdeva avatar Mar 20 '25 08:03 rashdeva

https://github.com/ton-connect/demo-dapp-with-next you can check our implementation of dapp in next. Reopen issue if you still have this problem

jenshenJ avatar Jul 18 '25 09:07 jenshenJ