danog / MadelineProto

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

igbinary_serialize returned as member variable from __sleep() but does not exist in SessionPaths #1391

Closed manuelcoders closed 1 year ago

manuelcoders commented 1 year ago

SessionPaths: Waiting for exclusive lock of /var/www/test.com/wp-content/plugins/scaper-offers/session.madeline/safe.php.lock... SessionPaths: Got exclusive lock of /var/www/test.com/wp-content/plugins/scaper-offers/session.madeline/safe.php.lock... Exception: igbinary_serialize(): &quot;broadcastId&quot; returned as member variable from __sleep() but does not exist in SessionPaths.php:143 [27-Aug-2023 18:34:00 UTC] PHP Fatal error: Uncaught \danog\MadelineProto\Exception: igbinary_serialize(): &quot;broadcastId&quot; returned as member variable from __sleep() but does not exist in /var/www/test.com/wp-content/plugins/scaper-offers/vendor/danog/madelineproto/src/SessionPaths.php:143 Revision: 8.0.0-beta144 TL Trace: <br> exceptionErrorHandler()<br> SessionPaths.php(143): igbinary_serialize()<br> APIWrapper.php(107): serialize()<br> MTProto.php(469): serialize()<br> Shutdown.php(75): serializeAll()<br> Shutdown.php(86): shutdown()<br> danog\MadelineProto\{closure}() thrown in /var/www/test.com/wp-content/plugins/scaper-offers/vendor/danog/madelineproto/src/SessionPaths.php on line 143

PHP 8.1.22

I have this error when trying to install. Right after entering the API keys taken from mytelegram. Am I doing something wrong?

danog commented 1 year ago

Make sure you've updated to the latest beta144

manuelcoders commented 1 year ago

yes beta144 updated 15 minutes ago. Before I had a very old version, it seems to me beta80 and I had no problems.. Do I have any configuration problems? I also tried with php8.2 for testing but it gives me the same error.

danog commented 1 year ago

I suggest recreating the session, old sessions are not compatible anymore I'm afraid

manuelcoders commented 1 year ago

I have already deleted the session, the problem is that while I try to create it it gives me this error and it doesn't create it for me. Are there any known incompatibilities? Can you tell me what I can try to do to understand where this errroe comes from:

igbinary_serialize(): "broadcastId" returned as member variable from __sleep() but does not exist in SessionPaths.php:143

Thank you

manuelcoders commented 1 year ago

I generated the session via a local php, I shot it on the server and it works. I really didn't understand why it doesn't work directly from the server but I'm happy like this, I tried it for more than 4 hours! Thank you very much for your work, it's very useful me for MadelineProto!

danog commented 1 year ago

Probably a restart of the IPC server was required with $MadelineProto->restart(); or $MadelineProto->logout();....