Code Monkey home page Code Monkey logo

Comments (6)

Shyri avatar Shyri commented on May 21, 2024

I'm having the same problem here. Did you manage to solve it?

from telegram.

longhillroad avatar longhillroad commented on May 21, 2024

No. not yet. Based on our two inputs, this could be a regression bug in the main branch. I tried to build other branches like 1.3, 1.2. However, I did not get those builds work, always complains about gradle version or 'default' not found. Did you try to build 1.3 or 1.2?

I registered my own API_ID and API_HASH from telegram app admin url. Replaced them in ApiConfig.java. No help at all. From telegram registration page, I also got a public key and server ip address for my app usage. However, I did not find right places to put those 2 values. I did a search and found the existing main code is using the same IP address already.

The issue is MTProto authSendCode() method never gets a return based on my rough debug log filtering. Can you do some debugging and share what you find?

from telegram.

Shyri avatar Shyri commented on May 21, 2024

I've tried to build branches 1.3 and 1.2 but those seem to use an older version of mtproto library which does not contain some classes or something. I've tried with dev branch which needs also some changes in order to work with last mtproto and tlcore libs (mainly TLByte class which seems that it wasn't present in some older versions), it builds but ends up with the same problem. Everything I do is a little bit messy because I'm using eclipse and I have to do some changes in order to import it as a project (feeling a bit lazy to move to Android Studio and get used to it yet :P)

So far what I can tell reading the logs is that at some point it throws these exceptions during the app boot:

java.lang.SecurityException
at org.telegram.mtproto.transport.TransportPool.decrypt(TransportPool.java:148)
at org.telegram.mtproto.transport.TransportTcpPool$TcpListener.onRawMessage(TransportTcpPool.java:322)
at org.telegram.mtproto.transport.TcpContext.onMessage(TcpContext.java:167)
at org.telegram.mtproto.transport.TcpContext.access$15(TcpContext.java:162)
at org.telegram.mtproto.transport.TcpContext$ReaderThread.run(TcpContext.java:320)
Breaking context

And:

Sync failure: sendLog
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at org.telegram.android.core.background.sync.BaseSync.performSync(BaseSync.java:180)
at org.telegram.android.core.background.sync.BaseSync$SyncHandler.handleMessage(BaseSync.java:265)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: org.telegram.api.engine.TimeoutException
at org.telegram.api.engine.TelegramApi.doRpcCall(TelegramApi.java:369)
at org.telegram.api.engine.TelegramApi.doRpcCallNonAuth(TelegramApi.java:428)
at org.telegram.api.engine.TelegramApi.doRpcCallNonAuth(TelegramApi.java:420)
at org.telegram.android.core.background.sync.BackgroundSync.sendLog(BackgroundSync.java:337)
... 7 more

An then at some point it logs this message which makes me think that indeed there must be something wrong with mtproto:

Auth key invalidated: AUTH_KEY_UNREGISTERED.

from telegram.

longhillroad avatar longhillroad commented on May 21, 2024

I stuck on a similar error message like "W/T|MT|MTProto#1001īš• Auth key invalidated" (I did not see the AUTH_KEY_UNREGISTERED string though. Maybe I missed it)

Maybe we have to understand how MTProto works to make it work. Since we have the source code of the MTProto, in theory, is it enough for us to fix the problem if ex3ndr is too busy with other things?

from telegram.

Shyri avatar Shyri commented on May 21, 2024

I think it is the same error, in my case at the first tries I had the same error message as yours "W/T|MT|MTProto#1001īš• Auth key invalidated". The I pulled the last commit of mtproto library (from 10 days ago). As you can see: telegram-s/telegram-mt-old@4a1e6fd at line 342 of MTProto.java he included the errorTag in the log so maybe thats why.

After trying all branches again. I downloaded the relese source code (https://github.com/ex3ndr/telegram/releases) and rolledback mtproto to version commited on Mar 14, 2014 with no luck.

I'm gonna study mtproto lib and seek if there is an error actually. According to Telegram API Docs (https://core.telegram.org/api/errors) AUTH_KEY_UNREGISTERED means "The key is not registered in the system". If I cannot find something in several hours maybe I try rolling back versions of mtproto in conjuntion with master, dev and release versions till I find some combination that works. Will post everything i find out later

from telegram.

longhillroad avatar longhillroad commented on May 21, 2024

Shyri, sounds good. I know one engineer who is trying to learn Android will dig more on this in the following days. Will see.

from telegram.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.