Skip to content

Web - the TDLib stops working after the initial sign-in (Repro included) #3351

@kubk

Description

@kubk

Hi, thank you for implementing this library! I am looking forward to use it on Web but stumbled upon the issue: sign in works correctly and after that I am able to fetch the info about the current user or fetch my chats. But if I refresh the page, the Telegram API stops working and I get the following error: [NotificationManager. cpp: 4006][NotificationManager] Check ' running get_difference_' failed

The issue can be reproduced here: https://github.com/kubk/tdlib-refresh-bug (no bundlers, no frameworks, single demo.html file)

What I noticed:

  • The issue can be seen on different TDLib versions. The tdlib in the repo above is up to date and built from sources today. I also faced the same issue with 1.8.40 from @dibgram.
  • I see the same issue on Mac and Linux, and in Chrome and Safari.
  • I get this issue when I use a bundler with React and when I use plain JS with no bundlers.

Steps to reproduce:

  • Clone the repo, install dependencies via npm install and run the project using npm run serve . Open http://localhost:5177/demo
  • Sign in using your phone number
  • After successful login, click on the get me button. It will show your username via alert
  • Refresh the page. Sign in is no longer needed (because TDLib cached auth data?) and there is an error in the console. The get me button no longer works. If the issue is not reproduced, try refreshing the page a couple of times.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions