{"action":"closed","issue":{"url":"https://api.github.com/repos/mgp25/Chat-API/issues/1958","repository_url":"https://api.github.com/repos/mgp25/Chat-API","labels_url":"https://api.github.com/repos/mgp25/Chat-API/issues/1958/labels{/name}","comments_url":"https://api.github.com/repos/mgp25/Chat-API/issues/1958/comments","events_url":"https://api.github.com/repos/mgp25/Chat-API/issues/1958/events","html_url":"https://github.com/mgp25/Chat-API/issues/1958","id":157878046,"number":1958,"title":"Encryption not working on PHP7 (bad mac)? ","user":{"login":"Lorempn2","id":16525400,"avatar_url":"https://avatars.githubusercontent.com/u/16525400?v=3","gravatar_id":"","url":"https://api.github.com/users/Lorempn2","html_url":"https://github.com/Lorempn2","followers_url":"https://api.github.com/users/Lorempn2/followers","following_url":"https://api.github.com/users/Lorempn2/following{/other_user}","gists_url":"https://api.github.com/users/Lorempn2/gists{/gist_id}","starred_url":"https://api.github.com/users/Lorempn2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lorempn2/subscriptions","organizations_url":"https://api.github.com/users/Lorempn2/orgs","repos_url":"https://api.github.com/users/Lorempn2/repos","events_url":"https://api.github.com/users/Lorempn2/events{/privacy}","received_events_url":"https://api.github.com/users/Lorempn2/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-01T10:53:11Z","updated_at":"2016-06-01T11:39:01Z","closed_at":"2016-06-01T11:39:01Z","body":"Hi,\r\n\r\nCurrently I am trying to set up the Chat API on a server running on PHP7. I noticed that `php-protobuf` is not ready for PHP7 so I checked their issues and found a pull-request (https://github.com/allegro/php-protobuf/pull/63) ready for PHP7, the installation was indeed successful so all the modules are installed (also visible when running php -m).\r\n\r\nWhen I try to actually run the script, inbound/outbound messages are not delivered (only one mark), while media works perfectly.\r\n\r\nThe error I keep getting is bad mac. Removing axl db is not helping and I've already tried multiple numbers.\r\n\r\nLog: \r\n\r\n```xml\r\ntx  <stream:features></stream:features>\r\n\r\ntx  <auth user=\"xxxx\" mechanism=\"WAUTH-2\">acececee33313634363234383534359f1a406c3279175bd64894151443cd2463a719bf31343634373735353837</auth>\r\n\r\nrx  <from s.whatsapp.net=\"\"></from>\r\n\r\nrx  <stream:features></stream:features>\r\n\r\nrx  <challenge>4d038c79df409a9e6bf0148f9ec715af6cbbd650</challenge>\r\n\r\ntx  <response>af88defe898d95240af8c773349fc4ee173bf1cbb600ff0c50620362880ecdb7559544f521a7fcb1f08c4216d45c60ccb62ed3bd6fe2cff5036b1aac08d57d35104aecb0506473552115d0e5c7</response>\r\n\r\nrx  <success t=\"1464775587\" props=\"5\" kind=\"free\" status=\"active\" creation=\"1464182420\" expiration=\"4444444444\">826358e3ff240654fb7b5203c1bcd19fe75f305b</success>\r\n\r\ntx  <presence name=\"\" type=\"available\"></presence>\r\n\r\ntx  <iq id=\"01\" xmlns=\"jabber:iq:privacy\" type=\"get\">\r\ntx    <query>\r\ntx      <list name=\"default\"></list>\r\ntx    </query>\r\ntx  </iq>\r\n\r\ntx  <iq id=\"02\" xmlns=\"urn:xmpp:whatsapp:push\" type=\"get\" to=\"s.whatsapp.net\">\r\ntx    <config></config>\r\ntx  </iq>\r\n\r\ntx  <presence type=\"inactive\"></presence>\r\n\r\nrx  <ib from=\"s.whatsapp.net\">\r\nrx    <offline count=\"0\"></offline>\r\nrx  </ib>\r\n\r\nrx  <presence from=\"xx@s.whatsapp.net\"></presence>\r\n\r\nrx  <presence from=\"xx@s.whatsapp.net\"></presence>\r\n\r\nrx  <presence from=\"xx@s.whatsapp.net\" type=\"unavailable\"></presence>\r\n\r\nrx  <iq from=\"xx@s.whatsapp.net\" type=\"error\" id=\"1\">\r\nrx    <error code=\"404\" text=\"item-not-found\"></error>\r\nrx  </iq>\r\n\r\nrx  <iq from=\"s.whatsapp.net\" type=\"result\" id=\"02\">\r\nrx    <config platform=\"gcm\" id=\"O3lVb_iNkoe:APA91bJoNfLIjFrP9TJd2YGRZ8nU5yOtaDn41LH9ahGf5OmEDQ2IrMp4FkElRY5UlEATdg_8AArL-IuTUzJ5AzZEZ_Ie0iPArZU_QFpgrgLQEwm_k_VwGiK0kd03jFE2rhUIV1kTzvoT\"></config>\r\nrx  </iq>\r\n\r\nrx  <message from=\"xx@s.whatsapp.net\" type=\"text\" id=\"438EF0FBA482EA2740\" t=\"1464775592\" notify=\"Marcel\">\r\nrx    <enc v=\"1\" type=\"pkmsg\">3308d9f9fe01122105255dafda1e713608e96a2eda9a1b75567351a6fe4a28c30763acbffc433434431a21050d73ce03d2c6f368ff6236b95ff1444f1f34dd1bc67497c11f59b7576058c4442242330a21050619425161ec9deee3c0ada6ec64c90bf924d4ea07c02a52a8208de761d5a333100218002210893592cae834033fff8ef5e015ab07ef4f6f06266335ec6428f10330c3f403</enc>\r\nrx  </message>\r\n\r\ntx  <ack to=\"xx@s.whatsapp.net\" class=\"message\" id=\"438EF0FBA482EA2740\" t=\"1464775592\"></ack>\r\n\r\n-> Decrypted Message: Bad Mac!\r\nBad Mac!\r\nNo valid sessions - /home/xx/Whatsapp/libaxolotl-php/SessionCipher.php - 194Message 438EF0FBA482EA2740 could not be decrypted, sending retry.\r\n\r\ntx  <receipt id=\"438EF0FBA482EA2740\" to=\"xx@s.whatsapp.net\" type=\"retry\" t=\"1464775592\">\r\ntx    <retry v=\"1\" count=\"1\" id=\"438EF0FBA482EA2740\" t=\"1464775592\"></retry>\r\ntx    <registration>106b344b</registration>\r\ntx  </receipt>\r\n\r\nrx  <ack from=\"xx@s.whatsapp.net\" class=\"receipt\" type=\"retry\" id=\"438EF0FBA482EA2740\"></ack>\r\n\r\nrx  <message from=\"xx@s.whatsapp.net\" type=\"text\" id=\"438EF0FBA482EA2740\" t=\"1464775593\" notify=\"Marcel\">\r\nrx    <enc v=\"1\" type=\"pkmsg\" count=\"1\">3308ab9ea20612210548642e781cbee71fd28d32839d26a90e6d8b2936e40ee046faa2252f77c05e581a21050d73ce03d2c6f368ff6236b95ff1444f1f34dd1bc67497c11f59b7576058c4442242330a2105fbeeca6daacab3ac0df72fcb969d41f3389b494e4a29c1a45a1aa1bf6834cb6d1000180022109cf993fd678cc5254daf79e340afe661a63caeeda0536f6428f10330858602</enc>\r\nrx  </message>\r\n\r\ntx  <ack to=\"xx@s.whatsapp.net\" class=\"message\" id=\"438EF0FBA482EA2740\" t=\"1464775593\"></ack>\r\n\r\n\r\n-> Decrypted Message: SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: sessions.recipient_id - /home/xx/Whatsapp/SqliteAxolotlStore.php - 484Message 438EF0FBA482EA2740 could not be decrypted, sending retry.\r\n\r\ntx  <receipt id=\"438EF0FBA482EA2740\" to=\"xx@s.whatsapp.net\" type=\"retry\" t=\"1464775593\">\r\ntx    <retry v=\"1\" count=\"1\" id=\"438EF0FBA482EA2740\" t=\"1464775593\"></retry>\r\ntx    <registration>106b344b</registration>\r\ntx  </receipt>\r\n\r\nrx  <ack from=\"xx@s.whatsapp.net\" class=\"receipt\" type=\"retry\" id=\"438EF0FBA482EA2740\"></ack>\r\n\r\nrx  <message from=\"xx@s.whatsapp.net\" type=\"text\" id=\"438EF0FBA482EA2740\" t=\"1464775593\" notify=\"xx\">\r\nrx    <enc v=\"1\" type=\"pkmsg\" count=\"1\">3308ab9ea20612210548642e781cbee71fd28d32839d26a90e6d8b2936e40ee046faa2252f77c05e581a21050d73ce03d2c6f368ff6236b95ff1444f1f34dd1bc67497c11f59b7576058c4442242330a2105fbeeca6daacab3ac0df72fcb969d41f3389b494e4a29c1a45a1aa1bf6834cb6d10011800221072f45cb0ca215377b488db75ee671721fa387ab6c661bd3f28f10330858602</enc>\r\nrx  </message>\r\n\r\ntx  <ack to=\"xx@s.whatsapp.net\" class=\"message\" id=\"438EF0FBA482EA2740\" t=\"1464775593\"></ack>\r\n\r\n-> Decrypted Message: SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: sessions.recipient_id - /home/xx/Whatsapp/SqliteAxolotlStore.php - 484Message 438EF0FBA482EA2740 could not be decrypted, sending retry.\r\n\r\ntx  <iq id=\"03\" to=\"s.whatsapp.net\" type=\"set\" xmlns=\"encrypt\">\r\ntx    <identity>87defe99cab4b7615845faa093f41102d5d639bad2f7098da7a174dd6a897a3b</identity>\r\ntx    <registration>05ca3fb7</registration>\r\ntx    <type>05</type>\r\ntx    <list>```"}}
{"actor":{"display_login":"mgp25"}}