danog / MadelineProto

Async PHP client API for the telegram MTProto protocol
https://docs.madelineproto.xyz
GNU Affero General Public License v3.0
2.85k stars 660 forks source link

PHP Fatal error: Uncaught danog\MadelineProto\TL\Exception: Missing required parameter #184

Closed ali-imanpour closed 7 years ago

ali-imanpour commented 7 years ago

I get this error, sometimes start the app.

PHP Fatal error:  Uncaught danog\MadelineProto\TL\Exception: Missing required parameter
TL Trace:

While serializing:      messages.getDialogs['offset_date']
CallHandler.php(70):    serialize_method("messages.getDialogs",{"_":"MadelineProto.dialogParams","limit":0,"offset_date":null,"offset_id":null,"offset_peer":null,"count":292})
DialogHandler.php(28):  method_call("messages.getDialogs",{"_":"MadelineProto.dialogParams","limit":0,"offset_date":null,"offset_id":null,"offset_peer":null,"count":292},{"datacenter":4,"FloodWaitLimit":100})
MTProto.php(365):       get_dialogs(false)
PlaceHolder.php(30):    __wakeup()
__wakeup()
app2.php(28):           deserialize("session.madeline")
danog commented 7 years ago

Recreate the session, this is a bug with PHP's serialization

tommasozzo commented 7 years ago

I've the similar problem: [2017-09-05 15:36:51] local.ERROR: \danog\MadelineProto\Exception: The session is corrupted! in C:\progettiAITO\autobot\autobot\vendor\danog\madelineproto\src\danog\MadelineProto\MTProto.php:612 TL Trace:

MTProto.php(327): reset_session() PlaceHolder.php(30): wakeup() wakeup()

Zelyutin commented 7 years ago

Have problem like that: Fatal error: Uncaught danog\MadelineProto\TL\Exception: You didn't provide a valid string TL Trace:

While serializing: auth.sendCode['phone_number'] CallHandler.php(70): serialize_method("auth.sendCode",{"phone_number":false,"sms_type":5,"api_id":100000,"api_hash":"100000c6f5af835284373cba094f5ad9","lang_code":"en"}) Login.php(80): method_call("auth.sendCode",{"phone_number":false,"sms_type":5,"api_id":100000,"api_hash":"100000c6f5af835284373cba094f5ad9","lang_code":"en"},{"datacenter":2}) APIFactory.php(135): phone_login(false) testing.php(59): __call("phone_login",[false])

thrown in C:\OpenServer\OSPanel\domains\tl.ru\src\danog\MadelineProto\TL\TL.php on line 298

danog commented 7 years ago

@Zelyutin You simply did not provide a phone number

testing.php(59): __call("phone_login",[false])

Zelyutin commented 7 years ago

@danog I see, thanks Trying to go further

danog commented 7 years ago

The MTPROTO_NUMBER in .env does not do anything anymore, the only way to provide it is by inputting when prompted while running tests/testing.php

amir61v commented 6 years ago

Please help me with this error. I'm totally new to Linux. Thanks PHP Fatal error: Uncaught \danog\MadelineProto\Exception: Curl error: Protocol "https" not supported or disabled in libcurl in phar:///root/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/MyTelegramOrgWrapper.php:47 Revision: 96f943f78e0f6b6fa019d426ef4eba429ed50133 TL Trace (YOU ABSOLUTELY MUST READ THE TEXT BELOW):

ApiStart.php(47): construct("00989124456398") API.php(86): api_start() Serializable.php(34): __magic_construct("proxy.madeline") mtproxyd(31): construct("proxy.madeline") thrown in phar:///root/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/MyTelegramOrgWrapper.php on line 47

danog commented 6 years ago

Take a look at https://docs.madelineproto.xyz/docs/REQUIREMENTS.html

amir61v commented 6 years ago

Didn't work.. :((( apt-get update E: Malformed line 1 in source list /etc/apt/sources.list.d/php.list (dist parse) E: The list of sources could not be read. root@host:~# apt-get install php7.2 php7.2-dev php7.2-fpm php7.2-curl php7.2-xml php7.2-zip php7.2-gmp php7.2-cli php7.2-mbstring git -y Reading package lists... Error! E: Malformed line 1 in source list /etc/apt/sources.list.d/php.list (dist parse) E: The list of sources could not be read. E: The package lists or status file could not be parsed or opened.

danog commented 6 years ago

Make sure the php repo was added properly, check the php apt source file.

amir61v commented 6 years ago

yes it's ok

amir61v commented 6 years ago

help me please

danog commented 6 years ago

As I already said, make sure the php repo was added properly, check the php apt source file.

amir61v commented 6 years ago

no it's not ok? I'm driving crazy

amir61v commented 6 years ago

can i give my server's access to you so you can take a look at it?

amir61v commented 6 years ago

SOLVED. it was because of curl. i had to remove it and install it with --ssl. but now telegram is giving error.