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

Session not confirmed cause restart docker container #58

Open
Maverick1983 opened this issue Feb 28, 2021 · 8 comments
Open

Session not confirmed cause restart docker container #58

Maverick1983 opened this issue Feb 28, 2021 · 8 comments

Comments

@Maverick1983
Copy link

I test add session without confirm with Telegram's code.

Docker container crash and restarted always. This is the error

`Number of sessions: 2.
Authorizing session: users/rob
Do you want to login as user or bot (u/b)? Enter your phone number:
Fatal error: Uncaught Error: Resource has already been freed in /app-host-link/vendor/amphp/byte-stream/lib/ResourceInputStream.php:250
Stack trace:
#0 /app-host-link/vendor/danog/madelineproto/src/danog/MadelineProto/Magic.php(420): Amp\ByteStream\ResourceInputStream->unreference()
#1 /app-host-link/vendor/danog/madelineproto/src/danog/MadelineProto/Exception.php(102): danog\MadelineProto\Magic::shutdown(1)
#2 [internal function]: danog\MadelineProto\Exception::exceptionHandler(Object(danog\MadelineProto\RPCErrorException))
#3 {main}
thrown in /app-host-link/vendor/amphp/byte-stream/lib/ResourceInputStream.php on line 250

Fatal error: Uncaught Error: Resource has already been freed in /app-host-link/vendor/amphp/byte-stream/lib/ResourceInputStream.php:250
Stack trace:
#0 /app-host-link/vendor/danog/madelineproto/src/danog/MadelineProto/Magic.php(420): Amp\ByteStream\ResourceInputStream->unreference()
#1 /app-host-link/vendor/danog/madelineproto/src/danog/MadelineProto/Shutdown.php(55): danog\MadelineProto\Magic::shutdown(0)
#2 [internal function]: danog\MadelineProto\Shutdown::shutdown()
#3 {main}
thrown in /app-host-link/vendor/amphp/byte-stream/lib/ResourceInputStream.php on line 250`

@xtrime-ru
Copy link
Owner

Hi! If you have invalid session, you can just remove its files from /session folder.

@Maverick1983
Copy link
Author

Maverick1983 commented Mar 1, 2021 via email

@xtrime-ru
Copy link
Owner

How I can check for invalid sessions?

If error occures right after this message, than this is invalid session:

Authorizing session: users/rob

@Maverick1983
Copy link
Author

Maverick1983 commented Mar 1, 2021 via email

@xtrime-ru
Copy link
Owner

xtrime-ru commented Mar 1, 2021

Telegram client (madelineProto) don't have any tools to validate sessions. So only way to check it - try to start.
In case of any fatal errors container will restart.

Only way to fix corrupted session is to recreate it.

Are you able to create valid session, or all your sessions become invalid?

@xtrime-ru
Copy link
Owner

Corrupted session is very rare case. My sessions works fine for over 3 years. So validation tool has very limited apply.

@Maverick1983
Copy link
Author

Maverick1983 commented Mar 2, 2021 via email

@Maverick1983
Copy link
Author

Corrupted session is very rare case. My sessions works fine for over 3 years. So validation tool has very limited apply.

The problem was after login and never send validation code or delete session from app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Maverick1983 @xtrime-ru and others