whatsapp-viewer icon indicating copy to clipboard operation
whatsapp-viewer copied to clipboard

Two different errors: older version of WhatsApp Viewer and no such table: chat_list

Open UeliDragutin opened this issue 3 years ago • 47 comments

Using the WhatsApp extractor (YuvrajRaghuvanshiS / WhatsApp-Key-Database-Extractor) which will output some files including the key and msgstore.db.

So, using the version 1.15 to open the msgstore.db, I was greet with the following error message:

It seems like you tried to open an older WhatsApp database. Please try to use an older version of WhatsApp Viewer.

So, I use the version 1.14, which give me the same error as above. This goes the same for 1.13 and 1.12.

Then I decide to try the 1.11 version of Whatsapp viewer and was greet with another error message:

Could not load chat list; SQLite error: 1; no such table: chat_list

This error also appear when I use the version 1.10 and 1.9.

Help needed, thanks.

UeliDragutin avatar May 20 '22 03:05 UeliDragutin

+1

serginator avatar Jun 20 '22 15:06 serginator

Exactly same problem here. Did you resolve it?

Using the WhatsApp extractor (YuvrajRaghuvanshiS / WhatsApp-Key-Database-Extractor) which will output some files including the key and msgstore.db.

So, using the version 1.15 to open the msgstore.db, I was greet with the following error message:

It seems like you tried to open an older WhatsApp database. Please try to use an older version of WhatsApp Viewer.

So, I use the version 1.14, which give me the same error as above. This goes the same for 1.13 and 1.12.

Then I decide to try the 1.11 version of Whatsapp viewer and was greet with another error message:

Could not load chat list; SQLite error: 1; no such table: chat_list

This error also appear when I use the version 1.10 and 1.9.

Help needed, thanks.

ammm84 avatar Jul 04 '22 20:07 ammm84

+1

aReaSa avatar Jul 06 '22 01:07 aReaSa

Hi, I also have the exact same problem. The files were extracted from Encryption 14 but cannot be viewed. With the same error message. I would love for comments .. Thank you very much

AD1977 avatar Jul 20 '22 04:07 AD1977

This issue seems to have been around for 2 months now. Any solution at all please?

WindMaster12 avatar Jul 21 '22 12:07 WindMaster12

same here

Ogradion avatar Jul 25 '22 02:07 Ogradion

Same issue, need help

ayberkjs avatar Jul 26 '22 16:07 ayberkjs

same here

mauro-60 avatar Jul 27 '22 09:07 mauro-60

They changed the tables in recent versions of Whatsapp. whapa breaks for lack of "messages" (it's called "message" now). There's no chat_list either. The only alternative I know of is to use sqlitebrowser but of course it's extremely cumbersome, it's good mostly to confirm you have the right db and all is decrypted well.

Otherwise for decryption https://github.com/ElDavoo/WhatsApp-Crypt14-Crypt15-Decrypter works REALLY well, including for the new E2E encryption (at least for the hexdumped key, not sure how you get that if you set a password instead, anyway for now just use in WA that 64-character encryption key instead of the more comfortable user-defined password). This is huge because it means no more shenanigans with find the key.

vb0 avatar Jul 27 '22 12:07 vb0

I have the same issue

It appears the table scheme has been altered Maybe a solution would be to create a view with te table name in the DB with the used columns

Used Tables:

  • message_thumbnails
  • messages_quotes
  • messages_links
  • messages

messages (_id, key_remote_jid , key_from_me , key_id , status , needs_push , data , timestamp , media_url , media_mime_type , media_wa_type , media_size , media_name , media_caption , media_hash , media_duration , origin , latitude , longitude , thumb_image , remote_resource , received_timestamp , send_timestamp , receipt_server_timestamp , receipt_device_timestamp , read_device_timestamp , played_device_timestamp , raw_data , recipient_count , participant_hash , starred , quoted_row_id , mentioned_jids , multicast_id , edit_version , media_enc_hash , payment_transaction_id , forwarded , preview_type , send_count , lookup_tables , future_message_type , message_add_on_flags) => Is Missing in new database

messages_links (_id, key_remote_jid , message_row_id , link_index ) => Is Missing in new database (partial in table message_link )

messages_quotes (_id , key_remote_jid , key_from_me , key_id , status , needs_push , data , timestamp , media_url , media_mime_type , media_wa_type , media_size , media_name , media_caption , media_hash , media_duration , origin , latitude , longitude , thumb_image , remote_resource , received_timestamp , send_timestamp , receipt_server_timestamp , receipt_device_timestamp , read_device_timestamp , played_device_timestamp , raw_data , recipient_count , participant_hash , starred , quoted_row_id , mentioned_jids , multicast_id , edit_version , media_enc_hash , payment_transaction_id , forwarded , preview_type , send_count , lookup_tables , future_message_type , message_add_on_flags ) => Is Missing in new database

message_thumbnails (thumbnail , timestamp , key_remote_jid , key_from_me , key_id ) => Exists and is identical

ReMiOS avatar Jul 30 '22 17:07 ReMiOS

I have the same issue

It appears the table scheme has been altered Maybe a solution would be to create a view with te table name in the DB with the used columns

Used Tables:

  • message_thumbnails
  • messages_quotes
  • messages_links
  • messages

So hard to do. Being completely a newbie in SQLite, I downloaded DB Browser and I can see the data, tried to renaming table "message" to "messages" without success, I guess I've to do a new View and I'm currently learning to do that.

nufrankz avatar Aug 12 '22 17:08 nufrankz

I've created a workaround for the changed table scheme in the WhatsApp msgstore.db database

A rewrite of the code would be better, hopefully this will help the developers to make the code working again without the need for this workaround.

This file creates the missing tables

  • messages
  • messages_links
  • messages_quotes

Also it adds some indexes to make it load faster

N.B. i could not find the column "quoted_row_id" as in the old version, but referring to "_id" works for finding a column, this statement appears to be very useful SELECT DISTINCT name FROM sqlite_master WHERE sql like '%%'

Just run this executable in the same folder as the msgstore.db file wav_create_table.zip

You can achieve the same result by running the following SQL statements:

CREATE TABLE IF NOT EXISTS messages AS SELECT file_hash,message._id,message.chat_row_id,message.key_id,jid.raw_string AS key_remote_jid,message.from_me AS key_from_me,
message.status,message.text_data AS data,message.timestamp,message_media.message_url AS media_url,message.message_type AS media_wa_type,message_media.file_size 
AS media_size,message_media.mime_type AS media_mime_type,message_media.media_name,message_media.media_caption,message_media.media_duration,message_location.latitude,
message_location.longitude,message_media.file_path AS thumb_image,receipts.remote_resource,message_thumbnail.thumbnail AS raw_data, message._id AS quoted_row_id 
FROM message LEFT JOIN message_media ON message._id = message_media.message_row_id LEFT JOIN chat ON message.chat_row_id = chat._id LEFT JOIN jid ON jid_row_id = jid._id 
LEFT JOIN message_location ON message._id = message_location.message_row_id LEFT JOIN receipts ON message.key_id = receipts.key_id LEFT JOIN message_thumbnail 
ON message._id = message_thumbnail.message_row_id

CREATE TABLE IF NOT EXISTS messages_quotes AS SELECT message_row_id AS _id, chat_row_id, parent_message_chat_row_id, from_me, sender_jid_row_id, key_id, timestamp,message_type,
text_data, payment_transaction_id, lookup_tables, origin FROM message_quoted

CREATE TABLE IF NOT EXISTS messages_links AS SELECT * FROM message_link

CREATE INDEX IF NOT EXISTS messages_chat_id_index ON messages (chat_row_id,_id)

CREATE INDEX IF NOT EXISTS messages_jid_id_index on messages (key_remote_jid, _id)

CREATE INDEX IF NOT EXISTS messages_key_index on messages ( key_remote_jid, key_from_me, key_id )

ReMiOS avatar Aug 27 '22 18:08 ReMiOS

thanks, that's almost working. I ran these sql commands, and tried to use whatsapp-viewer and whapa, both tools failed with the same error: Error: no such column: messages.edit_version

could you have a look what could be wrong?

P.S. you missed ; at the end of each string

blshkv avatar Aug 28 '22 02:08 blshkv

@blshkv for me it works. Thanks @ReMiOS

vb0 avatar Aug 28 '22 08:08 vb0

thanks, that's almost working. I ran these sql commands, and tried to use whatsapp-viewer and whapa, both tools failed with the same error: Error: no such column: messages.edit_version

could you have a look what could be wrong?

P.S. you missed ; at the end of each string

There is no need for ";" if you run don't run the SQL statements at once this way you can see the output for each SQL statement (I use both "SQuirrel" and "DB Browser for SQlite" )

I cannot reproduce your error, what version of WhatsApp Viewer do you use ? Did you also use the attached wav_create_table.exe ?

Maybe this works for you:

DROP TABLE IF EXISTS messages;

CREATE TABLE IF NOT EXISTS messages AS SELECT file_hash,message._id,message.chat_row_id,message.key_id,jid.raw_string AS key_remote_jid,message.from_me AS key_from_me,
message.status,message.text_data AS data,message.timestamp,message_media.message_url AS media_url,message.message_type AS media_wa_type,message_media.file_size 
AS media_size,message_media.mime_type AS media_mime_type,message_media.media_name,message_media.media_caption,message_media.media_duration,message_location.latitude,
message_location.longitude,message_media.file_path AS thumb_image,receipts.remote_resource,message_thumbnail.thumbnail AS raw_data, message._id AS quoted_row_id, NULL AS edit_version 
FROM message LEFT JOIN message_media ON message._id = message_media.message_row_id LEFT JOIN chat ON message.chat_row_id = chat._id LEFT JOIN jid ON jid_row_id = jid._id 
LEFT JOIN message_location ON message._id = message_location.message_row_id LEFT JOIN receipts ON message.key_id = receipts.key_id LEFT JOIN message_thumbnail 
ON message._id = message_thumbnail.message_row_id;

ReMiOS avatar Aug 28 '22 08:08 ReMiOS

Thanks for the updated sql commands! I use linux, didn't run wav_create_table.exe. I use the latest git for each tool, got the following from different tools:

WhatsApp-whapa
   Error: no such column: messages.recipient_count
whatsapp-exporter-main/src/main.py", line 19, in query_messages
    for received_timestamp, remote_resource, key_from_me, data, media_caption, media_wa_type in cur.execute(query, {"key_remote_jid": key_remote_jid}):
sqlite3.OperationalError: no such column: received_timestamp
 ./wtsexporter
Whatsapp_Chat_Exporter/extract.py", line 200, in messages
    c.execute("""SELECT messages.key_remote_jid,
sqlite3.OperationalError: no such column: messages_quotes.data

blshkv avatar Aug 28 '22 09:08 blshkv

I just switched now to crypt15 (E2E backups) that are decrypted fine by https://github.com/ElDavoo/WhatsApp-Crypt14-Crypt15-Decrypter (they were since the feature was supported but you could only browse the data with sqlitebrowser because of the table problems we're having). I guess this would be the recommended way forward as there is no problem to obtain the key (it's just shown to you).

With the first version of "manipulations" from above WhatsappViewer works fine. The second version, doesn't work, also it creates a db about 20% smaller.

vb0 avatar Aug 28 '22 10:08 vb0

WhatsApp-whapa Error: no such column: messages.recipient_count sqlite3.OperationalError: no such column: received_timestamp sqlite3.OperationalError: no such column: messages_quotes.data

You should discuss this on the whapa github https://github.com/B16f00t/whapa

for the missing tables add "message.recipient_count , message.received_timestamp, message_quoted.text_data as data" to the SQL create table statement

ReMiOS avatar Aug 28 '22 11:08 ReMiOS

@ReMiOS thanks for your work! I've tried to run the executable but it failed with error Failed to execute script wav_create_table. Also tried to execute the commands by hand and didn't work neither, here are the results of the first query for example:

$ sqlite3 msgstore.db
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
sqlite> CREATE TABLE IF NOT EXISTS messages AS SELECT file_hash,message._id,message.chat_row_id,message.key_id,jid.raw_string AS key_remote_jid,message.from_me AS key_from_me, message.status,message.text_data AS data,message.timestamp,message_media.message_url AS media_url,message.message_type AS media_wa_type,message_media.file_size AS media_size,message_media.mime_type AS media_mime_type,message_media.media_name,message_media.media_caption,message_media.media_duration,message_location.latitude, message_location.longitude,message_media.file_path AS thumb_image,receipts.remote_resource,message_thumbnail.thumbnail AS raw_data, message._id AS quoted_row_id FROM message LEFT JOIN message_media ON message._id = message_media.message_row_id LEFT JOIN chat ON message.chat_row_id = chat._id LEFT JOIN jid ON jid_row_id = jid._id LEFT JOIN message_location ON message._id = message_location.message_row_id LEFT JOIN receipts ON message.key_id = receipts.key_id LEFT JOIN message_thumbnail ON message._id = message_thumbnail.message_row_id;
Error: no such column: message_media.media_caption

serginator avatar Aug 29 '22 18:08 serginator

@ReMiOS thanks for your work! I've tried to run the executable but it failed with error Failed to execute script wav_create_table. ```

Did you run wav_create_table.exe in the same folder as the msgstore.db ?

ReMiOS avatar Sep 01 '22 07:09 ReMiOS

Did you run wav_create_table.exe in the same folder as the msgstore.db ?

Of course. Maybe there are even more different versions of the db? I don't know. The thing is that if I run the SQL statements it fails too saying that there is no message_media.media_caption column

serginator avatar Sep 01 '22 07:09 serginator

@ReMiOS thanks for your work! I've tried to run the executable but it failed with error Failed to execute script wav_create_table. ```

Did you run wav_create_table.exe in the same folder as the msgstore.db ?

I get the same error when running the exe. Anyway, as Serginator told you, thank you so much for your work!

ammm84 avatar Sep 01 '22 15:09 ammm84

Just run this executable in the same folder as the msgstore.db file wav_create_table.zip

Hello @ReMiOS, works like a charm! Thank you, and plus for the code.

nufrankz avatar Sep 07 '22 20:09 nufrankz

Did you run wav_create_table.exe in the same folder as the msgstore.db ?

Of course. Maybe there are even more different versions of the db? I don't know. The thing is that if I run the SQL statements it fails too saying that there is no message_media.media_caption column

I only have the DB version with message_media.media_caption column to test it with you can try to replace "message_media.media_caption" in the SQL statement with "NULL as media_caption"

ReMiOS avatar Sep 14 '22 05:09 ReMiOS

Did you run wav_create_table.exe in the same folder as the msgstore.db ?

Of course. Maybe there are even more different versions of the db? I don't know. The thing is that if I run the SQL statements it fails too saying that there is no message_media.media_caption column

I only have the DB version with message_media.media_caption column to test it with you can try to replace "message_media.media_caption" in the SQL statement with "NULL as media_caption"

Sorry, I couldn't try it until today, and it worked flawlessly replacing in the first statement message_media.media_caption with NULL as media_caption. And then the other statements worked well too, so I was able to open the db with Whatsapp Viewer. Thanks @ReMiOS !!!! :)

serginator avatar Sep 26 '22 08:09 serginator

thanks @ReMiOS. your help means a lot and it came in right time to me. May god bless you brother!

BOJO2022 avatar Oct 12 '22 15:10 BOJO2022

I've created a workaround for the changed table scheme in the WhatsApp msgstore.db database

A rewrite of the code would be better, hopefully this will help the developers to make the code working again without the need for this workaround.

This file creates the missing tables

  • messages
  • messages_links
  • messages_quotes

Also it adds some indexes to make it load faster

N.B. i could not find the column "quoted_row_id" as in the old version, but referring to "_id" works for finding a column, this statement appears to be very useful SELECT DISTINCT name FROM sqlite_master WHERE sql like '%%'

Just run this executable in the same folder as the msgstore.db file wav_create_table.zip

You can achieve the same result by running the following SQL statements:

CREATE TABLE IF NOT EXISTS messages AS SELECT file_hash,message._id,message.chat_row_id,message.key_id,jid.raw_string AS key_remote_jid,message.from_me AS key_from_me,
message.status,message.text_data AS data,message.timestamp,message_media.message_url AS media_url,message.message_type AS media_wa_type,message_media.file_size 
AS media_size,message_media.mime_type AS media_mime_type,message_media.media_name,message_media.media_caption,message_media.media_duration,message_location.latitude,
message_location.longitude,message_media.file_path AS thumb_image,receipts.remote_resource,message_thumbnail.thumbnail AS raw_data, message._id AS quoted_row_id 
FROM message LEFT JOIN message_media ON message._id = message_media.message_row_id LEFT JOIN chat ON message.chat_row_id = chat._id LEFT JOIN jid ON jid_row_id = jid._id 
LEFT JOIN message_location ON message._id = message_location.message_row_id LEFT JOIN receipts ON message.key_id = receipts.key_id LEFT JOIN message_thumbnail 
ON message._id = message_thumbnail.message_row_id

CREATE TABLE IF NOT EXISTS messages_quotes AS SELECT message_row_id AS _id, chat_row_id, parent_message_chat_row_id, from_me, sender_jid_row_id, key_id, timestamp,message_type,
text_data, payment_transaction_id, lookup_tables, origin FROM message_quoted

CREATE TABLE IF NOT EXISTS messages_links AS SELECT * FROM message_link

CREATE INDEX IF NOT EXISTS messages_chat_id_index ON messages (chat_row_id,_id)

CREATE INDEX IF NOT EXISTS messages_jid_id_index on messages (key_remote_jid, _id)

CREATE INDEX IF NOT EXISTS messages_key_index on messages ( key_remote_jid, key_from_me, key_id )

Thanks, bro! it worked out!

dheorr avatar Nov 08 '22 00:11 dheorr

I've created a workaround for the changed table scheme in the WhatsApp msgstore.db database

Just run this executable in the same folder as the msgstore.db file wav_create_table.zip

This worked on the folder that I extracted, so now whatsapp viewer can open the msgstore.db.. Progress

But my issue is with the msgstore-2023-03-28.1.db.crypt14 files from the phone directory. is there a way to implement this to the "msgstore.db.crypt14" file instead of the "msgstore.db"??

Can't open them in wa viewer. and ElDavoo when open the "decrypt14_15.py" it closes in a second.

any help? thanks !!!

ceka14 avatar Apr 04 '23 18:04 ceka14

I've created a workaround for the changed table scheme in the WhatsApp msgstore.db database

A rewrite of the code would be better, hopefully this will help the developers to make the code working again without the need for this workaround.

This file creates the missing tables

  • messages
  • messages_links
  • messages_quotes

Also it adds some indexes to make it load faster

N.B. i could not find the column "quoted_row_id" as in the old version, but referring to "_id" works for finding a column, this statement appears to be very useful SELECT DISTINCT name FROM sqlite_master WHERE sql like '%%'

Just run this executable in the same folder as the msgstore.db file wav_create_table.zip

You can achieve the same result by running the following SQL statements:

CREATE TABLE IF NOT EXISTS messages AS SELECT file_hash,message._id,message.chat_row_id,message.key_id,jid.raw_string AS key_remote_jid,message.from_me AS key_from_me,
message.status,message.text_data AS data,message.timestamp,message_media.message_url AS media_url,message.message_type AS media_wa_type,message_media.file_size 
AS media_size,message_media.mime_type AS media_mime_type,message_media.media_name,message_media.media_caption,message_media.media_duration,message_location.latitude,
message_location.longitude,message_media.file_path AS thumb_image,receipts.remote_resource,message_thumbnail.thumbnail AS raw_data, message._id AS quoted_row_id 
FROM message LEFT JOIN message_media ON message._id = message_media.message_row_id LEFT JOIN chat ON message.chat_row_id = chat._id LEFT JOIN jid ON jid_row_id = jid._id 
LEFT JOIN message_location ON message._id = message_location.message_row_id LEFT JOIN receipts ON message.key_id = receipts.key_id LEFT JOIN message_thumbnail 
ON message._id = message_thumbnail.message_row_id

CREATE TABLE IF NOT EXISTS messages_quotes AS SELECT message_row_id AS _id, chat_row_id, parent_message_chat_row_id, from_me, sender_jid_row_id, key_id, timestamp,message_type,
text_data, payment_transaction_id, lookup_tables, origin FROM message_quoted

CREATE TABLE IF NOT EXISTS messages_links AS SELECT * FROM message_link

CREATE INDEX IF NOT EXISTS messages_chat_id_index ON messages (chat_row_id,_id)

CREATE INDEX IF NOT EXISTS messages_jid_id_index on messages (key_remote_jid, _id)

CREATE INDEX IF NOT EXISTS messages_key_index on messages ( key_remote_jid, key_from_me, key_id )

@ReMiOS Hi, I have an issue. When I try to run the file it seems to work but the final dimension of the msgstore.db file becomes heavier (something like from 120 MB to 300 MB).

With this workaround, in Whatsapp Viewer I can read the messages but I noticed that in the group chat of Whatsapp each file I sent is duplicated 2-3-4-... times according to the number of the users in that group chat (for example, if in the group there are 4 other people then each message sent by me is shown 4 times . It is referred only to the sent messages and not to the received ones which remain in the right number.

In the past, when Whatsapp Viewer was working withouth this workaround, my messages weren't duplicated.

How can I solve this issue? Does anyone have this problem apart from me? Thanks for your help :) Sent Messages are repeated

Night-Wolf avatar Apr 22 '23 11:04 Night-Wolf

@ReMiOS Hi, I have an issue. When I try to run the file it seems to work but the final dimension of the msgstore.db file becomes heavier (something like from 120 MB to 300 MB).

With this workaround, in Whatsapp Viewer I can read the messages but I noticed that in the group chat of Whatsapp each file I sent is duplicated 2-3-4-... times according to the number of the users in that group chat (for example, if in the group there are 4 other people then each message sent by me is shown 4 times . It is referred only to the sent messages and not to the received ones which remain in the right number.

The workaround is a temporary solution for fixing the table scheme in the WhatsApp msgstore.db database. A rewrite of the code is neccesary, hopefully the developers can find the time to make the code working again without the need for this workaround.

ReMiOS avatar Apr 22 '23 13:04 ReMiOS