SDK icon indicating copy to clipboard operation
SDK copied to clipboard

In browser, twa.showPopup does not work. It throw error '[Telegram.WebApp] Method showPopup is not supported in version 6.0'

Open KyoungWan opened this issue 1 year ago • 1 comments

Problem situation

  • twa.showConfirm does not work in chrome environment.

Details

  • This does not happen when testing in a TMA environment using ngrok, but it does happen when testing in chrome.

  • Probably because there is no initData in chrome, I am using the default version of 6.0, which is listed on https://telegram.org/js/telegram-web-app.js, and various twa functions are not available in that version, so the error occurs.

  • However, twa.openLink works fine in chrome. twa.showConfirm gives the following error. [Telegram.WebApp] Method showPopup is not supported in version 6.0

Question

  1. why does twa.openLink work in chrome environment but twa.showConfirm doesn't work?
  2. If I want to make twa's methods work in chrome environment, is there anything else I need to do besides installing and using the ‘@twa-dev/sdk’ library?

KyoungWan avatar Dec 19 '24 11:12 KyoungWan

What type of Telegram client do you use?

ArthurStam avatar Jan 04 '25 21:01 ArthurStam