Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration Tests with TelegramClient are broken #4

Open
LinqLover opened this issue Nov 22, 2020 · 2 comments
Open

Integration Tests with TelegramClient are broken #4

LinqLover opened this issue Nov 22, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@LinqLover
Copy link
Owner

During TelegramIntegrationTest >> createClient, TelegramClient is receiving an authorizationStateLoggingOut event after the authorization was ready. Can we fix this or is it simply not possible to store a tdlib session and reuse it months later? :-(

@LinqLover LinqLover added the bug Something isn't working label Nov 22, 2020
@LinqLover
Copy link
Owner Author

Logs:

[ 2][t 4][1606069711.226559162][TdDb.cpp:315][#1][!Td]  Got PRAGMA user_version = 11
[ 2][t 4][1606069711.237125158][AuthDataShared.cpp:109][#1][!Td]        DcId{2} [auth_key_id:9091155134278351170][state:OK][created_at:1602168447.000000]
[ 2][t 4][1606069711.241549730][SessionMultiProxy.cpp:121][#1][!SessionMultiProxy:2:main]      [session_count:1]
[ 2][t 4][1606069711.242294312][Session.cpp:145][#1][!SessionProxy:2:main]    Generate new session_id 11067612151132936923 for auth key 9091155134278351170 for main DC2
[ 2][t 4][1606069711.299700260][Session.cpp:472][#1][!Session:2:main]   Session closed: [Error : -404 : MTProto error: -404] Session:2:main::Connect::Tcp::[149.154.167.51:443] to DcId{2} from [0.0.0.0:5609]
[ 2][t 4][1606069711.300410748][Session.cpp:494][#1][!Session:2:main]   Use PFS to check main key
[ 2][t 4][1606069712.513947010][SessionProxy.cpp:235][#1][!SessionProxy:2:mainHave tmp_auth_key 8262812101905256133: NoAuth
[ 2][t 4][1606069712.515920401][Session.cpp:1178][#1][!Session:2:main]  Update auth key in session_id 11067612151132936923 to 8262812101905256133
[ 2][t 4][1606069712.558907986][Session.cpp:258][#1][!Session:2:main]   Drop main key because check with temporary key failed
[ 2][t 4][1606069712.559411764][AuthDataShared.cpp:109][#1][!Session:2:main]  DcId{2} [auth_key_id:0][state:Empty][created_at:0.000000]
[ 2][t 4][1606069712.559826136][Td.cpp:3941][#1][!Td]   Lost authorization
[ 1][t 4][1606069712.560431242][Session.cpp:287][#1][!Session:2:main]   BindKey failed: [Error : 400 : ENCRYPTED_MESSAGE_INVALID]
[ 2][t 4][1606069712.561254740][Session.cpp:145][#1][!SessionProxy:2:main]    Generate new session_id 3929779346725212749 for auth key 0 for main DC2
[ 2][t 4][1606069712.561983585][Td.cpp:4234][#1][!Td]   Destroy Td in state 2
[ 2][t 4][1606069712.562384129][Session.cpp:145][#1][!SessionProxy:2:main]    Generate new session_id 12297507062352978207 for auth key 0 for main DC2
[ 2][t 4][1606069712.562830210][Td.cpp:4088][#1][!Td]   Have no request actors
[ 2][t 4][1606069712.563971996][Td.cpp:4009][#1][!Td]   ON_ACTORS_CLOSED
[ 2][t 4][1606069712.581769228][Td.cpp:4066][#1][!Td]   ON_CLOSED

Re-login on a new core instance with #checkAuthenticationCode: for phone number + auth code does not work, no new events will be received:

[ 2][t 4][1606070764.932643652][Session.cpp:472][#2][!Session:1:main]   Session closed: [Error : 0 : Connection closed] Session:1:main::Connect::Tcp::[149.154.175.50:443] to DcId{1} from [0.0.0.0:6245]

@LinqLover
Copy link
Owner Author

Next steps would be:

  • Find out what communication with tdlib happens when logging out completely and logging in again - can we reproduce this in #createClient or will a new authentication code be required then?

For now, I will mark these tests as expected failures temporarily.

LinqLover added a commit that referenced this issue Nov 22, 2020
See #4 for more information.
LinqLover added a commit that referenced this issue Nov 22, 2020
See #4 for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant