ton-connect/sdk

[TONCONNECT-UI]: Decryption Error.

KernelPanic0 opened this issue · 19 comments

Describe the bug

Whenever I connect tonkeeper to my site using tonconnect-ui, I get a strange message in the console saying there was a decryption error.

image
image

I have never gotten this issue before, and I cannot even get it to persist on my development environemnt, it only occurs on the production environment. I was thinking it may be an issue with CORS, or how I set up my NGINX webserver, but I am only running a reverse proxy with which the same project was definitely working before.

I installed tonconnect through the CDN and am using the vue ui framework.
image

I've even tried using the cdn to use an earlier version but for some strange reason the issue persists.

image

Expected behavior

On connecting my wallet, the tonconnect button updates to show that I now have a wallet linked.

Current behavior

Upon pressing connect wallet, a new page (tonkeeper) opens up. The manifest shows up correctly, and when clicking connect and going back to to the site tonconnect continues to load and says Continue in Tonkeeper on desktop… When checking the console there is a Uncaught (in promise) Error: Decryption error: message: 52, 126, 208... error with a very large buffer.

Steps to Reproduce

Unsure

Environment

Works fine on the development environment (Windows using npm run serve), breaks on the Ubuntu server (using NGINX with a reverse proxy to the backend to serve the site). Using Firefox but also breaks on Chrome.

Additional context

No response

Describe the bug

Whenever I connect tonkeeper to my site using tonconnect-ui, I get a strange message in the console saying there was a decryption error.

image image

I have never gotten this issue before, and I cannot even get it to persist on my development environemnt, it only occurs on the production environment. I was thinking it may be an issue with CORS, or how I set up my NGINX webserver, but I am only running a reverse proxy with which the same project was definitely working before.

I installed tonconnect through the CDN and am using the vue ui framework. image

I've even tried using the cdn to use an earlier version but for some strange reason the issue persists.

image

Expected behavior

On connecting my wallet, the tonconnect button updates to show that I now have a wallet linked.

Current behavior

Upon pressing connect wallet, a new page (tonkeeper) opens up. The manifest shows up correctly, and when clicking connect and going back to to the site tonconnect continues to load and says Continue in Tonkeeper on desktop… When checking the console there is a Uncaught (in promise) Error: Decryption error: message: 52, 126, 208... error with a very large buffer.

Steps to Reproduce

Unsure

Environment

Works fine on the development environment (Windows using npm run serve), breaks on the Ubuntu server (using NGINX with a reverse proxy to the backend to serve the site). Using Firefox but also breaks on Chrome.

Additional context

No response

same error ! is it fix ?

same error ! is it fix ?

Nope. There is another issue open with over 10 people saying they have the same issue...

same error!

@KernelPanic0 Try https://ui-vue-five.vercel.app

Thank you, this looks like a really nice implementation!

As for the original issue though, I believe it occurs because tonconnect has blocked the domain name from which the requests are coming from. I think they have an automatic system set up for flagging domain names to prevent scams or the tonconnect library being used maliciously. This would explain why it works on my development environment but not on the production environment. That being said, is there any way to get a domain name checked or appealed?

@KernelPanic0 Try https://ui-vue-five.vercel.app

Thank you, this looks like a really nice implementation!

As for the original issue though, I believe it occurs because tonconnect has blocked the domain name from which the requests are coming from. I think they have an automatic system set up for flagging domain names to prevent scams or the tonconnect library being used maliciously. This would explain why it works on my development environment but not on the production environment. That being said, is there any way to get a domain name checked or appealed?

Can you share your code and the domain name with us, if possible?

@itsalimanuel Our domain is having the same issue
The domain is https://dropee.clicker-game.tropee.com
The bot is DropeeBot

The wallet connect was working and suddenly it stopped working on this domain
If we test the same code using another domain we can connect the wallet

Hello, @tropee-moein,

It seems that the issue is related to your website. I suspect there might be a security concern with the website.
If the code works on a different domain, then it's likely a security issue on the current domain.
⛔ If you are using unsecured URLs on your website (images, scripts), that might be affecting the functionality as well.

image

@itsalimanuel The domain was working fine
We got thousands of wallet connected and all of a sudden some days ago it stopped working
All the other domains use the same certificate and point to the same code.
You can test the game in https://t.me/DropeeBot/play

I tried to check your website using the test bot, and I received this message. We need more information to verify your status.

Thanks for checking it mate!
Our game only works with our own bot.
Can you please tell me what information you need?
I also reached out on tg channel @tondev_eng
Cheers

Hi, That is simple to solve and I found the solution.
Build your project and try to run built one, It will fix.

Hello again @itsalimanuel
In the end we decided to migrate to a whole new domain.
Hopefully this time we won't face the same issue.
Thanks for your help again
Cheers

Hello, I hope so .

Good luck 👏

Hi @itsalimanuel
We are back to the same error again 😓
That makes me believe we are being blocked due to the high activity of users connecting their wallet
The new domain is webapp.game.dropee.xyz

Hello @tropee-moein, i see you are using Google Ads! Try disabling it, it might affect the wallet connector.

Hi @itsalimanuel
We don't use google ads
We use google analytics
What I don't understand why would the connector work for 2 3 hours and suddenly stop working? This happened on 2 different domains.
I really believe we are being blocked due to the high volume of wallets connecting in our game.

Interesting, I just noticed it after checking with test tools. I would suggest checking API rate limits, IP blocking, or throttling.

@itsalimanuel We actually have a way to test our code on a different domain and we can connect the wallet.
I believe there is a process in ton connect and ton keeper that blocks specific domains.
And the blocking happens when there are lots of wallets in a short amount of time connect.
And that's what has happened to us.
Nothing to do with ip, nothing to do with domain reputation just simple old automated blocking by ton connect.