alik0211 / mtproto-core

Telegram API JS (MTProto) client library for Node.js and browser
https://mtproto-core.js.org
GNU General Public License v3.0
630 stars 113 forks source link

Error "UDPATE_APP_TO_LOGIN" #218

Closed smit-superhipz closed 2 years ago

smit-superhipz commented 2 years ago

I meet the error "UPDATE_APP_TO_LOGIN" when try to login through API. Is this an library error or telegram had new update so library cannot handle

ghost commented 2 years ago

I also encountered the same problem, and there is no official explanation。

smit-superhipz commented 2 years ago

Yeah let's wait for creator to fix this

pogudin-sergey commented 2 years ago

I also encountered the same problem on getCode

arthot commented 2 years ago

According to Telegram,

Telegram has started enforcing the use of 64-bit identifiers for users and chats, and the current stable version of the library does not support them yet. If you try to login, you may see UPDATE_APP_TO_LOGIN error.

It means this library must implement support of 131 layer (current is 121)

kamil996 commented 2 years ago

Fingers crossed for fast fix by @alik0211. Youre the man!

smit-superhipz commented 2 years ago

I dont know how to implement other layer. Can you help me

smit-superhipz commented 2 years ago

Wow i fixed this by change the layer from 121 to 133. Thank you so much @alik0211

ember999 commented 2 years ago

Wow i fixed this by change the layer from 121 to 133. Thank you so much @alik0211

How to do?

antonmelbardis commented 2 years ago

yeah, why was this closed without a PR ?

hudijani commented 2 years ago

image

pogudin-sergey commented 2 years ago

And replace /scheme/api.json new version from https://core.telegram.org/api/layers#layer-133

pogudin-sergey commented 2 years ago

Repeat after me https://github.com/pogudin-sergey/mtproto-core/commit/e4a563ac83e50c233efd4c6eb315e218009cbe9f

yennmorrigan commented 2 years ago

Changing the layer from 121 to 133 or 131 did not help, the following error occurs Not found predicate with id: 3600285445 (node:12564) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '_' of undefined at RPC.handleDecryptedMessage (E:\projects\work\node\freestuff\node_modules\@mtproto\core\src\rpc\index.js:549:26) at RPC.handleEncryptedMessage (E:\projects\work\node\freestuff\node_modules\@mtproto\core\src\rpc\index.js:451:10) at processTicksAndRejections (internal/process/task_queues.js:95:5)

tuannfq commented 2 years ago

Changing the layer from 121 to 133 or 131 did not help, the following error occurs Not found predicate with id: 3600285445 (node:12564) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '_' of undefined at RPC.handleDecryptedMessage (E:\projects\work\node\freestuff\node_modules@mtproto\core\src\rpc\index.js:549:26) at RPC.handleEncryptedMessage (E:\projects\work\node\freestuff\node_modules@mtproto\core\src\rpc\index.js:451:10) at processTicksAndRejections (internal/process/task_queues.js:95:5)

you also need to update json file in /scheme/api.json. Quickly you can add dependency from this repo https://github.com/pogudin-sergey/mtproto-core

smit-superhipz commented 2 years ago

I dont have Scheme folder so i create it and copy paste api.json file and it still works. Thank you @tuannfq

smit-superhipz commented 2 years ago

yeah, why was this closed without a PR ?

Sorry this is my first time using git to open an issue

ember999 commented 2 years ago

image

I tried the above solution, but there was still no solution

pogudin-sergey commented 2 years ago

PR for update layer & fix this problem: https://github.com/alik0211/mtproto-core/pull/219

alik0211 commented 2 years ago

Fixed in version 6.1.0 - https://t.me/mtproto_core/31