Closed tlbvkhamzin closed 6 days ago
You probably forgot to initialize the SDK.
https://docs.telegram-mini-apps.com/packages/telegram-apps-sdk/2-x/initializing
Hi @heyqbnk. I'm doing the following on the app start:
import { init } from '@telegram-apps/sdk-react';
// ...
init();
// ...
Without the initialization, it indeed didn't work on any device. But like the above it works well on iOS for example, and breaks on macOS.
Let me create a minimal reproducible case and share it with you.
Sorry, you were right. I was only initializing the app for mobile devices.
Telegram Application
Telegram for macOS
Describe the Bug
Whenever I complete a TG Stars payment, I receive a following error:
I am testing that on the MacOS, and indeed
TelegramGameProxy
seems not to have been defined in TG for MacOS:To Reproduce
This snippet works well on mobile, but fails on macOS:
Expected Behavior
Payment notification shouldn't throw an error