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

An error occurred while calling method req_pq: Given message id (6346469674134935553) is too new #16

Closed
ajaysharavat opened this issue Oct 28, 2016 · 22 comments

Comments

@ajaysharavat
Copy link

Hi,
I got following error when executing testing.php. Pls let me know whats causing this?

MTProto: Connecting to server...
MTProto: Loading RSA key...
MTProto: Initializing StructTools...
MTProto: Translating tl schemas...
MTProto: Generating permanent authorization key...
AuthKeyHandler: Requesting pq
CallHandler: Getting response (try number 1 for req_pq)...
CallHandler: An error occurred while calling method req_pq: Given message id (6346469667123256321) is too new. in MsgIdHandler on line 26. Recreating connection and retrying to call method...
CallHandler: Getting response (try number 1 for req_pq)...
CallHandler: An error occurred while calling method req_pq: Given message id (6346469668922249217) is too new. in MsgIdHandler on line 26. Recreating connection and retrying to call method...
CallHandler: Getting response (try number 1 for req_pq)...
CallHandler: An error occurred while calling method req_pq: Given message id (6346469670560631809) is too new. in MsgIdHandler on line 26. Recreating connection and retrying to call method...
CallHandler: Getting response (try number 1 for req_pq)...
CallHandler: An error occurred while calling method req_pq: Given message id (6346469672048287745) is too new. in MsgIdHandler on line 26. Recreating connection and retrying to call method...
CallHandler: Getting response (try number 1 for req_pq)...
CallHandler: An error occurred while calling method req_pq: Given message id (6346469674134935553) is too new. in MsgIdHandler on line 26. Recreating connection and retrying to call method...
PHP Fatal error: Uncaught exception 'danog\MadelineProto\MTProtoTools\Exception' with message 'An error occurred while calling method req_pq.' in /var/www/html/telegram/MadelineProto/src/danog/MadelineProto/MTProtoTools/CallHandler.php:69
Stack trace:
#0 /var/www/html/telegram/MadelineProto/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php(50): danog\MadelineProto\MTProtoTools\CallHandler->method_call('req_pq', Array)
#1 /var/www/html/telegram/MadelineProto/src/danog/MadelineProto/MTProto.php(137): danog\MadelineProto\MTProtoTools\AuthKeyHandler->create_auth_key(-1)
#2 /var/www/html/telegram/MadelineProto/src/danog/MadelineProto/API.php(22): danog\MadelineProto\MTProto->__construct(Array)
#3 /var/www/html/telegram/MadelineProto/testing.php(11): danog\MadelineProto\API->__construct(Array)
#4 {main}

thrown in /var/www/html/telegram/MadelineProto/src/danog/MadelineProto/MTProtoTools/CallHandler.php on line 69

@danog
Copy link
Owner

danog commented Oct 28, 2016

Are you sure you're using the latest version of madelineProto?

@ajaysharavat
Copy link
Author

Yes,
I am using the lastest version.

@danog
Copy link
Owner

danog commented Oct 29, 2016

What version of php are you using?

@ajaysharavat
Copy link
Author

PHP 5.6.26

@danog
Copy link
Owner

danog commented Nov 1, 2016

This error is caused by a problem in the msgIdHandler module (the message id generated for some reason is too big, probably the loop that increases the message id to make it bigger than the last one messes up stuff).
As I already wrote, this is a WIP, so stuff doesn't work properly atm.
You can help fix these bugs though by browsing the issues of this project.

@danog
Copy link
Owner

danog commented Nov 18, 2016

Try with the latest release please.
In the meantime I'm closing this.

@danog danog closed this as completed Nov 18, 2016
@danog
Copy link
Owner

danog commented Jun 14, 2017

Fixed 100%

@ablkvo
Copy link

ablkvo commented Oct 18, 2017

Hi danog,
I have the same problem running testing.php
I use php7.0
would you please help me?

Exception: Given message id (6478152482582163457) is too new compared to the max value (6478152262647545856). Consider syncing your date. in MsgIdHandler.php:31
CallHandler: An error getting response of method req_pq: Given message id (6478152482582163457) is too new compared to the max value (6478152262647545856). Consider syncing your date. in MsgIdHandler on line 31. Retrying...
CallHandler: An error getting response of method req_pq: Nothing in the socket! in Connection on line 307. Retrying...
CallHandler: An error getting response of method req_pq: Nothing in the socket! in Connection on line 307. Retrying...
CallHandler: An error getting response of method req_pq: Nothing in the socket! in Connection on line 307. Retrying...
CallHandler: An error getting response of method req_pq: Nothing in the socket! in Connection on line 307. Retrying...
CallHandler: An error getting response of method req_pq: Nothing in the socket! in Connection on line 307. Retrying...
Exception: Couldn't get response in CallHandler.php:174
CallHandler: An error occurred while calling method req_pq: Couldn't get response in CallHandler on line 174. Recreating connection and retrying to call method...
Exception: Given message id (6478152528070437889) is too new compared to the max value (6478152309892186112). Consider syncing your date. in MsgIdHandler.php:31
CallHandler: An error getting response of method req_pq: Given message id (6478152528070437889) is too new compared to the max value (6478152309892186112). Consider syncing your date. in MsgIdHandler on line 31. Retrying...
CallHandler: An error getting response of method req_pq: Nothing in the socket! in Connection on line 307. Retrying...
CallHandler: An error getting response of method req_pq: Nothing in the socket! in Connection on line 307. Retrying...

@wecanco
Copy link
Contributor

wecanco commented Oct 18, 2017

@ablkvo r u install python?

@ablkvo
Copy link

ablkvo commented Oct 18, 2017

My OS is Ubuntu 16.04, so yes It already has been installed.

@danog
Copy link
Owner

danog commented Oct 18, 2017

This is a server issue. Try connecting from another host.

@ablkvo
Copy link

ablkvo commented Oct 18, 2017

I connected from another ISP and got the same result.
could it be something about our country(Iran)?

PHP Fatal error: Uncaught Telegram returned an RPC error: Telegram is having internal issues, please try again later. (RPC_CALL_FAIL), caused by /home/aba/program/MadelineProtoBot/MadelineProto/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php:51

@danog
Copy link
Owner

danog commented Oct 18, 2017

Consider syncing your date:

Exception: Given message id (6478152482582163457) is too new compared to the max value (6478152262647545856). Consider syncing your date. in MsgIdHandler.php:31

@wecanco
Copy link
Contributor

wecanco commented Oct 18, 2017

@ablkvo using madeline in localhost?

@ablkvo
Copy link

ablkvo commented Oct 18, 2017

sorry I just follow the instruction, after installing when I run testing.php this messages come up. I dont now if I'm using madeline in localhost or not.

@danog
Copy link
Owner

danog commented Oct 18, 2017

You should sync your date.

@ablkvo
Copy link

ablkvo commented Oct 18, 2017

how can I do that?

@wecanco
Copy link
Contributor

wecanco commented Oct 18, 2017

@ablkvo see this video : https://t.me/wecangp/137

@danog
Copy link
Owner

danog commented Oct 18, 2017

sudo ntpdate pool.ntp.org

@ablkvo
Copy link

ablkvo commented Oct 18, 2017

It worked!
Thanks a lot.

@takasurazeem
Copy link

I have executed sudo ntpdate pool.ntp.org but I am still getting that consider synching your date error.

@danog
Copy link
Owner

danog commented May 17, 2018

Get a VPS that supports updating the date.

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

5 participants