thedemons / opentele

A Python Telegram API Library for converting between tdata and telethon sessions, with built-in official Telegram APIs.
https://opentele.readthedocs.io/
MIT License
306 stars 99 forks source link

TDataReadMapDataFailed: Unknown key type in encrypted map: 25 [ Called by BaseObject.MapData.read() ] #120

Open VectorASD opened 5 months ago

VectorASD commented 5 months ago

Describe the bug Parsing the innards of TDesktop revealed that there is one single account, but its isLoaded = false. Digging deeper, it turned out that the error TDataReadMapDataFailed: Unknown key type in encrypted map: 25 [ Called by BaseObject.MapData.read() ] inside the readMapWith function of the accaunt class.

Expected behavior TDesktop ended without exceptions.

Screenshots Screenshot_115 Screenshot_116

Additional context Telegram Desktop is working, so the 25-type key is not a lie.

VectorASD commented 5 months ago

Found a solution: https://github.com/telegramdesktop/tdesktop/blob/6c0ea0eb9f666fce471ed32efe0e83d9c62aba48/Telegram/SourceFiles/storage/storage_account.cpp#L94-L96 Here you can also find out how telegram reads record data