Open bchevalier opened 4 months ago
Same issue here
same issue in Nextjs
The same
Did you get any solution? I am facing same issue.
@abhiyana
One possible way to catch it is by using the javascript unhandledrejection
event and identifying the ton connect sdk error:
function isTonConnectSdkError(error: Error | string) {
const tonConnectError = 'TON_CONNECT_SDK';
if (typeof error === 'string') {
return error.includes(tonConnectError);
}
return error.message?.includes(tonConnectError);
}
window.addEventListener('unhandledrejection', function (rejection: PromiseRejectionEvent) {
// handle rejection
if (isTonConnectSdkError(rejection.reason)) {
// ignore TonConnect sdk errors, they are handlded by sentry
return;
}
});
It's not ideal though because it does not prevent third party dependencies from catching those unhandled promise errors as well (such as analytics or error aggregation components).
Hi everyone,
I’m using the tonconnect/ui-react package to trigger wallet connections in my project. The wallet connection is established successfully, but after 5 to 10 minutes, I start seeing the following error:
[TON_CONNECT_SDK_ERROR] TonConnectError Operation aborted Error: Operation aborted at abortController.signal.addEventListener.once (http://localhost:3000/static/js/bundle.js:64575:14) at signal.addEventListener.once (http://localhost:3000/static/js/bundle.js:64414:108) ...
Initially, everything works fine, but after some time, this error pops up. It seems to be related to the connection aborting after a certain amount of inactivity.
Has anyone encountered this issue or knows what could be causing the connection to abort after a delay? Please any one help me to resolve this?
the same
same thing i want to implement cannot catch TonConnectUIProvider errors.....
The same
the same
same issue
i have same issue
I solved that problem.
I solved that problem.
Would you share the step's you taken for solving this issue?
@uintptrs
import { TonConnectUIProvider } from '@tonconnect/ui-react';
==================================================
And create tonconnect-manifest.json in the "public" folder.
Structure of tonconnect-manifest.json
{
"url": "your site url",
"name": "name",
"iconUrl": "iconUrl"
}
Your Question
My application is triggering tons of
TON_CONNECT_SDK_ERROR
errors with the messageOperation aborted
. However, those are all uncaught promise exceptions. How can I catch them to handle them properly?Here is the code of the application, note that I am handling errors in the status change:
Context
No response
What have you tried so far?
No response
Relevant Code or Commands
No response
Documentation Check