wowandy
wowandy

Reputation: 1312

Telegram Bot Web App not working with ReactJS

I'm trying to implement a Web App in my Telegram Bot, but I have a problem.

My web app doesn't work in Telegram, but everything works fine in any browsers. Moreover, everything worked fine when I created the "Hello World" test application, but when I added more functionality, I get a blank page.

I tried debugging in the way described in the documentation, but I found absolutely no errors. I see that the resources are simply loaded and nothing happens further, as if the js is not running at all.

I don't understand the reason at all and where to look for it in my case...

Any help is welcome

enter image description here

Upvotes: 1

Views: 2730

Answers (2)

Tinsae
Tinsae

Reputation: 626

I had a problem where the webpage does not open inside the telegram bot, but opens in browser. And I am able to fix it.

  1. Make sure the web page is served over SSL/TLS. with a name not Ip address.
  2. Make sure you have used your certificate chain instead of just the certificate.

Upvotes: 0

wowandy
wowandy

Reputation: 1312

So, I found the problem.

I generated links with a double slash, for example - https://example.com//some/path. Because of this, the router did not recognize it correctly. In the end, I just corrected the generation of links, and also fixed the router so that it could understand such links.

Upvotes: 2

Related Questions