[GH-ISSUE #164] No parsed messages in whatsapp version 2.22.7.74 #148

Open
opened 2026-02-25 20:34:45 +03:00 by kerem · 14 comments
Owner

Originally created by @rafaelcsch on GitHub (May 9, 2022).
Original GitHub issue: https://github.com/B16f00t/whapa/issues/164

No parsed messages in whatsapp version 2.22.7.74 since there is no more "messages" table.

Originally created by @rafaelcsch on GitHub (May 9, 2022). Original GitHub issue: https://github.com/B16f00t/whapa/issues/164 No parsed messages in whatsapp version 2.22.7.74 since there is no more "messages" table.
Author
Owner

@karanrajpal14 commented on GitHub (May 29, 2022):

Yeah I've been facing this issue as well. Not sure what's the best way to deal with this.

<!-- gh-comment-id:1140538327 --> @karanrajpal14 commented on GitHub (May 29, 2022): Yeah I've been facing this issue as well. Not sure what's the best way to deal with this.
Author
Owner

@B16f00t commented on GitHub (May 29, 2022):

yes, now the information is in the message table, when I have some time I will update it

<!-- gh-comment-id:1140538988 --> @B16f00t commented on GitHub (May 29, 2022): yes, now the information is in the message table, when I have some time I will update it
Author
Owner

@apremi commented on GitHub (Jul 11, 2022):

+1

<!-- gh-comment-id:1179944982 --> @apremi commented on GitHub (Jul 11, 2022): +1
Author
Owner

@vb0 commented on GitHub (Jul 27, 2022):

+1
This is breaking completely all parsing for data coming from new (and as time goes by not so new) versions of Whatsapp.

<!-- gh-comment-id:1196644254 --> @vb0 commented on GitHub (Jul 27, 2022): +1 This is breaking completely all parsing for data coming from new (and as time goes by not so new) versions of Whatsapp.
Author
Owner

@apremi commented on GitHub (Jul 27, 2022):

I fixed the issue on another parser. I can help. I will try to update the solution here in the evening after work.

<!-- gh-comment-id:1197130395 --> @apremi commented on GitHub (Jul 27, 2022): I fixed the issue on another parser. I can help. I will try to update the solution here in the evening after work.
Author
Owner

@nufrankz commented on GitHub (Aug 12, 2022):

I fixed the issue on another parser. I can help. I will try to update the solution here in the evening after work.

Thanks, we'll patiently wait for it 😬

<!-- gh-comment-id:1213303059 --> @nufrankz commented on GitHub (Aug 12, 2022): > I fixed the issue on another parser. I can help. I will try to update the solution here in the evening after work. Thanks, we'll patiently wait for it 😬
Author
Owner

@B16f00t commented on GitHub (Aug 12, 2022):

If you have any updates you can make a pull request.

<!-- gh-comment-id:1213334605 --> @B16f00t commented on GitHub (Aug 12, 2022): If you have any updates you can make a pull request.
Author
Owner

@stevanuscolonne commented on GitHub (Sep 9, 2022):

Any update on this?

<!-- gh-comment-id:1242236448 --> @stevanuscolonne commented on GitHub (Sep 9, 2022): Any update on this?
Author
Owner

@ghost commented on GitHub (Sep 22, 2022):

any update?

<!-- gh-comment-id:1254681976 --> @ghost commented on GitHub (Sep 22, 2022): any update?
Author
Owner

@ChristianMarchiori commented on GitHub (Sep 30, 2022):

this may help https://thebinaryhick.blog/2022/06/09/new-msgstore-who-dis-a-look-at-an-updated-whatsapp-on-android/

<!-- gh-comment-id:1263974228 --> @ChristianMarchiori commented on GitHub (Sep 30, 2022): this may help https://thebinaryhick.blog/2022/06/09/new-msgstore-who-dis-a-look-at-an-updated-whatsapp-on-android/
Author
Owner

@ChristianMarchiori commented on GitHub (Sep 30, 2022):

I fixed the issue on another parser. I can help. I will try to update the solution here in the evening after work.

On which parser did u fix it?

<!-- gh-comment-id:1264033391 --> @ChristianMarchiori commented on GitHub (Sep 30, 2022): > I fixed the issue on another parser. I can help. I will try to update the solution here in the evening after work. On which parser did u fix it?
Author
Owner

@aadionizio commented on GitHub (Oct 19, 2022):

+1 This is breaking completely all parsing for data coming from new (and as time goes by not so new) versions of Whatsapp.

Thanks @vb0 (solution link)
With that I managed to get whapa to work, at least partially. It now shows a lot of errors, but at least produces a report.
There are some problems with whatsapp media not being linked, but hope this helps.
Use a sqlite editor and run this queries on whatsapp database:

DROP TABLE IF EXISTS messages_quotes;
CREATE TABLE IF NOT EXISTS messages_quotes AS 
SELECT message_quoted.message_row_id AS _id,
        message_quoted.chat_row_id,
        message_quoted.parent_message_chat_row_id,
        message_quoted.from_me AS key_from_me,
        message_quoted.sender_jid_row_id,
        message_quoted.key_id,
        message_quoted.timestamp,
        message_quoted.message_type AS media_wa_type,
        message_quoted.text_data AS data,
        message_quoted.payment_transaction_id,
        message_quoted.lookup_tables,
        message_quoted.origin,
        receipts.key_remote_jid,
        message.text_data AS data,
        message.status,
        NULL AS needs_push,
        message_media.message_url AS media_url,
        message_media.mime_type AS media_mime_type,
        message_media.file_size AS media_size,
        message_media.media_name,
        message_media.media_caption,
        message_media.file_hash AS media_hash,
        message_media.media_duration,
        message_location.latitude,
        message_location.longitude,
        message_media.file_path AS thumb_image,
        receipts.remote_resource,
        message.received_timestamp,
        NULL AS send_timestamp,
        message.receipt_server_timestamp,
        receipts.receipt_device_timestamp,
        receipts.read_device_timestamp,
        receipts.played_device_timestamp,
        message_thumbnail.thumbnail AS raw_data,
        message.recipient_count,
        message.participant_hash,
        message.starred,
        message._id AS quoted_row_id,
        NULL AS mentioned_jids,
        NULL AS multicast_id,
        NULL AS edit_version,
        message_media.enc_file_hash AS media_enc_hash,
        message.origination_flags AS forwarded,
        NULL AS preview_type,
        NULL AS send_count,
        message_future.future_message_type,
        message.message_add_on_flags
FROM message_quoted
    LEFT JOIN message ON message_quoted.message_row_id = message._id
    LEFT JOIN receipts ON message.key_id = receipts.key_id
    LEFT JOIN message_media ON message_quoted.message_row_id = message_media.message_row_id
    LEFT JOIN message_location ON message_quoted.message_row_id = message_location.message_row_id
    LEFT JOIN message_thumbnail ON message_quoted.message_row_id = message_thumbnail.message_row_id
    LEFT JOIN message_future ON message_quoted.message_row_id = message_future.message_row_id;

DROP TABLE IF EXISTS messages_links;
CREATE TABLE IF NOT EXISTS messages_links AS
SELECT message_link._id,
        message_link.chat_row_id,
        message_link.message_row_id,
        message_link.link_index,
        receipts.key_remote_jid
FROM message_link
    LEFT JOIN message ON message_link.message_row_id = message._id
    LEFT JOIN receipts ON message.key_id = receipts.key_id;

DROP TABLE IF EXISTS messages;
CREATE TABLE IF NOT EXISTS messages AS
SELECT message._id,
       jid.raw_string  AS key_remote_jid,
       message.from_me AS key_from_me,
       message.key_id,
       message.status,
       NULL AS needs_push,
       message.text_data AS data,
       message.timestamp,
       message_media.message_url AS media_url,
       message_media.mime_type AS media_mime_type,
       message.message_type AS media_wa_type,
       message_media.file_size AS media_size,
       message_media.media_name,
       message_media.media_caption,
       message_media.file_hash AS media_hash,
       message_media.media_duration,
       message.origin,
       message_location.latitude,
       message_location.longitude,
       message_media.file_path AS thumb_image,
       receipts.remote_resource,
       message.received_timestamp,
       NULL AS send_timestamp,
       message.receipt_server_timestamp,
       receipts.receipt_device_timestamp,
       receipts.read_device_timestamp,
       receipts.played_device_timestamp,
       message_thumbnail.thumbnail AS raw_data,
       message.recipient_count,
       message.participant_hash,
       message.starred,
       message._id AS quoted_row_id,
       NULL AS mentioned_jids,
       NULL AS multicast_id,
       NULL AS edit_version,
       message_media.enc_file_hash AS media_enc_hash,
       NULL AS payment_transaction_id,
       message.origination_flags AS forwarded,
       NULL AS preview_type,
       NULL AS send_count,
       message.lookup_tables,
       message_future.future_message_type,
       message.message_add_on_flags
FROM message
        LEFT JOIN message_media ON message._id = message_media.message_row_id
        LEFT JOIN message_location ON message._id = message_location.message_row_id
        LEFT JOIN message_thumbnail ON message._id = message_thumbnail.message_row_id
        LEFT JOIN message_future ON message._id = message_future.message_row_id
        LEFT JOIN receipts ON message.key_id = receipts.key_id
        LEFT JOIN chat ON message.chat_row_id = chat._id
        LEFT JOIN jid ON chat.jid_row_id = jid._id;

EDIT: there's also a problem with group chats

<!-- gh-comment-id:1284626181 --> @aadionizio commented on GitHub (Oct 19, 2022): > +1 This is breaking completely all parsing for data coming from new (and as time goes by not so new) versions of Whatsapp. Thanks @vb0 (solution [link](https://github.com/andreas-mausch/whatsapp-viewer/issues/151#issuecomment-1229244368)) With that I managed to get whapa to work, at least partially. It now shows a lot of errors, but at least produces a report. There are some problems with whatsapp media not being linked, but hope this helps. Use a sqlite editor and run this queries on whatsapp database: ``` DROP TABLE IF EXISTS messages_quotes; CREATE TABLE IF NOT EXISTS messages_quotes AS SELECT message_quoted.message_row_id AS _id, message_quoted.chat_row_id, message_quoted.parent_message_chat_row_id, message_quoted.from_me AS key_from_me, message_quoted.sender_jid_row_id, message_quoted.key_id, message_quoted.timestamp, message_quoted.message_type AS media_wa_type, message_quoted.text_data AS data, message_quoted.payment_transaction_id, message_quoted.lookup_tables, message_quoted.origin, receipts.key_remote_jid, message.text_data AS data, message.status, NULL AS needs_push, message_media.message_url AS media_url, message_media.mime_type AS media_mime_type, message_media.file_size AS media_size, message_media.media_name, message_media.media_caption, message_media.file_hash AS media_hash, message_media.media_duration, message_location.latitude, message_location.longitude, message_media.file_path AS thumb_image, receipts.remote_resource, message.received_timestamp, NULL AS send_timestamp, message.receipt_server_timestamp, receipts.receipt_device_timestamp, receipts.read_device_timestamp, receipts.played_device_timestamp, message_thumbnail.thumbnail AS raw_data, message.recipient_count, message.participant_hash, message.starred, message._id AS quoted_row_id, NULL AS mentioned_jids, NULL AS multicast_id, NULL AS edit_version, message_media.enc_file_hash AS media_enc_hash, message.origination_flags AS forwarded, NULL AS preview_type, NULL AS send_count, message_future.future_message_type, message.message_add_on_flags FROM message_quoted LEFT JOIN message ON message_quoted.message_row_id = message._id LEFT JOIN receipts ON message.key_id = receipts.key_id LEFT JOIN message_media ON message_quoted.message_row_id = message_media.message_row_id LEFT JOIN message_location ON message_quoted.message_row_id = message_location.message_row_id LEFT JOIN message_thumbnail ON message_quoted.message_row_id = message_thumbnail.message_row_id LEFT JOIN message_future ON message_quoted.message_row_id = message_future.message_row_id; DROP TABLE IF EXISTS messages_links; CREATE TABLE IF NOT EXISTS messages_links AS SELECT message_link._id, message_link.chat_row_id, message_link.message_row_id, message_link.link_index, receipts.key_remote_jid FROM message_link LEFT JOIN message ON message_link.message_row_id = message._id LEFT JOIN receipts ON message.key_id = receipts.key_id; DROP TABLE IF EXISTS messages; CREATE TABLE IF NOT EXISTS messages AS SELECT message._id, jid.raw_string AS key_remote_jid, message.from_me AS key_from_me, message.key_id, message.status, NULL AS needs_push, message.text_data AS data, message.timestamp, message_media.message_url AS media_url, message_media.mime_type AS media_mime_type, message.message_type AS media_wa_type, message_media.file_size AS media_size, message_media.media_name, message_media.media_caption, message_media.file_hash AS media_hash, message_media.media_duration, message.origin, message_location.latitude, message_location.longitude, message_media.file_path AS thumb_image, receipts.remote_resource, message.received_timestamp, NULL AS send_timestamp, message.receipt_server_timestamp, receipts.receipt_device_timestamp, receipts.read_device_timestamp, receipts.played_device_timestamp, message_thumbnail.thumbnail AS raw_data, message.recipient_count, message.participant_hash, message.starred, message._id AS quoted_row_id, NULL AS mentioned_jids, NULL AS multicast_id, NULL AS edit_version, message_media.enc_file_hash AS media_enc_hash, NULL AS payment_transaction_id, message.origination_flags AS forwarded, NULL AS preview_type, NULL AS send_count, message.lookup_tables, message_future.future_message_type, message.message_add_on_flags FROM message LEFT JOIN message_media ON message._id = message_media.message_row_id LEFT JOIN message_location ON message._id = message_location.message_row_id LEFT JOIN message_thumbnail ON message._id = message_thumbnail.message_row_id LEFT JOIN message_future ON message._id = message_future.message_row_id LEFT JOIN receipts ON message.key_id = receipts.key_id LEFT JOIN chat ON message.chat_row_id = chat._id LEFT JOIN jid ON chat.jid_row_id = jid._id; ``` EDIT: there's also a problem with group chats
Author
Owner

@formalist commented on GitHub (Jan 6, 2023):

SELECT message_quoted.message_row_id AS _id,
        message_quoted.chat_row_id,
   [...]
        NULL AS edit_version,

The field edit_version was used for deleted messages, to indicate if 'deleted for me' (=5) or 'deleted for all (=7).

Here you are forcing NULL... I know this is a workaround, but does anyone know where this information is located, in the new database schema?

<!-- gh-comment-id:1374267253 --> @formalist commented on GitHub (Jan 6, 2023): > ``` > SELECT message_quoted.message_row_id AS _id, > message_quoted.chat_row_id, > [...] > NULL AS edit_version, > ``` The field **edit_version** was used for deleted messages, to indicate if 'deleted for me' (=5) or 'deleted for all (=7). Here you are forcing NULL... I know this is a workaround, but does anyone know where this information is located, in the new database schema?
Author
Owner

@nkovacne commented on GitHub (May 14, 2023):

Is this going to be solved at some point?

<!-- gh-comment-id:1546851586 --> @nkovacne commented on GitHub (May 14, 2023): Is this going to be solved at some point?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whapa#148
No description provided.