Closed vaughn-xyz closed 1 week ago
I don't see the init
function usage in your code.
And what the error do you have in console?
my code does not use related methods: web_app_set_bottom_bar_color also reports an error; how to solve this?
@tang123qi I discovered this is called within the init()
or miniApp initialize function.
To fix this for my project I had to wrap the unit call with try/catch
Telegram Application
Other
Describe the Bug
Using the latest
@telegram-apps/sdk-react
when we callinit()
for our Telegram mini-app this causes older/outdated Telegram clients (Web, Mobile) to crash.My suspicion is under the hood of that
init()
call source it must be attempting to set some default functionalities without wrapping those calls in safetytry/catch
or using the appropriateX.isSupported()
calls internally.We are able to fix this by wrapping the
init()
call in atry/catch
as we noticed that this error was still bubbling up even after wrapping our own theme sets intry/catch
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
We can safely call
init()
without having to wrap it in atry/catch