residentsummer/watoi

ChatStorage.sqlite generated is 0kb size?

ferbulous opened this issue · 6 comments

Hi, so the problems I had is similar to what mcmuffin posted on his issues

#5

I tried replacing with my current backup location

$ sqlite3 ~Library/Application Support/MobileSync/Backup/Manifest.db "select fileID from Files where relativePath = 'ChatStorage.sqlite' and domain like '%whatsapp%';"
abcdef01234567890

But I'm just getting invalid error or something like 'no such table: files'

So I used IExplorer to grab the ChatStorage.sqlite and I followed the rest of the steps.
However, the new ChatStorage.sqlite generated is only 0kb.
I'm not exactly sure what went wrong here since there's no error in terminal and the process took less than a second?

Btw, the msgstore.db file size from my android phone is around 100mb & the whatsapp.ipa version is 2.18.61 which is a cracked version that I found when googling.

More updates, apparently I didn't decrypt the msgs.db.crypt12 files yet. Manage to decrypt the chat backup file but I'm getting this error instead

watoi KeeliumMAC$ build/Release/watoi ~/Downloads/msgstore.db ChatStorage.sqlite app/Payload/WhatsApp.app/WhatsAppChat.momd
2018-06-03 18:47:23.429 watoi[69237:11700545] Android store loaded
CoreData: annotation:  Failed to load optimized model at path '/Users/KeeliumMAC/Downloads/watoi/app/Payload/WhatsApp.app/WhatsAppChat.momd/WhatsAppChat_2.18.10.omo'
CoreData: warning: no NSValueTransformer with class name 'WAMessageReceiptInfoTransformer' was found for attribute 'receiptInfo' on entity 'WAMessageInfo'
2018-06-03 18:47:23.461 watoi[69237:11700545] CoreData loaded
2018-06-03 18:47:23.468 watoi[69237:11700545] 60189004598-1406257238@g.us: not found
CoreData: warning: Unable to load class named 'WAChatSession' for entity 'WAChatSession'.  Class not found, using default NSManagedObject instead.
CoreData: warning: Unable to load class named 'WAGroupInfo' for entity 'WAGroupInfo'.  Class not found, using default NSManagedObject instead.
2018-06-03 18:47:23.477 watoi[69237:11700545] 	 is group chat
2018-06-03 18:47:23.478 watoi[69237:11700545] 	 not found member (null)
CoreData: warning: Unable to load class named 'WAGroupMember' for entity 'WAGroupMember'.  Class not found, using default NSManagedObject instead.
2018-06-03 18:47:23.480 watoi[69237:11700545] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: key cannot be nil'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff995b257b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fffae8161da objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff994b2cc5 -[__NSDictionaryM setObject:forKey:] + 1061
	3   watoi                               0x0000000101cd4c6c -[Importer addMissingMember:toChat:asAdmin:] + 614
	4   watoi                               0x0000000101cd557f -[Importer importChats] + 2267
	5   watoi                               0x0000000101cd3f41 -[Importer import] + 27
	6   watoi                               0x0000000101cd3b86 main + 354
	7   libdyld.dylib                       0x00007fffaf0f7235 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

@ferbulous looks like the same issue as #8 (see my last message there). Are you sure Whatsapp was activated on iDevice prior to backup?

@residentsummer yes, whatsapp was already activated on the iphone 7. It had all the groups listed and no previous chats restored since it's all on android device.

Well, that will require more thorough troubleshooting then...

@ferbulous do you, by any chance, still have that initial (prior to running migration utility) ChatStorage.sqlite file? If you do, could you please send it to me by email (it's my username at gmail dot com).

Hmmm, thinking about the issue, I wonder, why the ChatStorage.sqlite is 0kb... It shouldn't be empty in the first place (before running a migrator). I've found the database, that I've used while developing the utlity and it's already 385K in size before importing msgstore.db.

Some time ago I've added a check to ensure that db file is present before running the migration (that's likely the reason you've got a 0kb result). Otherwise it'll print a clear (I hope :) ) error message.

Feel free to reopen if issue persists.