Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No WhatsAppChat.momd in Whatsapp 2.18.91 #16

Closed
flo92aa opened this issue Sep 24, 2018 · 13 comments
Closed

No WhatsAppChat.momd in Whatsapp 2.18.91 #16

flo92aa opened this issue Sep 24, 2018 · 13 comments

Comments

@flo92aa
Copy link

flo92aa commented Sep 24, 2018

I am trying to move Whatsapp vom Android to iOS by using watoi. Everything works until I need to extract WhatsAppChat.momd from my installed Whatsapp version. The problem is, that I cannot find the file in the version 2.18.91. I tried an older Version (v2.17.60) where the file is available but the tool is telling me that the version is incompatible to my one.

Any suggestion what I can do? Do I have to use an other file with my Version of Whatsapp?

Thanks in advance

@residentsummer
Copy link
Owner

Hi, @flo92aa !

What do you mean by

tool is telling me that the version is incompatible

I didn't build any version checks into it. So I guess it's coming from CoreData.framework... Anyway, please provide the logs.

Thanks!

@flo92aa
Copy link
Author

flo92aa commented Sep 26, 2018

The output of the terminal is as follows

MacBook-Air-3:watoi-master xxxxx$ build/Release/watoi msgstore.db ChatStorage.sqlite app/Payload/WhatsApp.app/WhatsAppChat.momd/
2018-09-26 18:39:05.009 watoi[7226:743593] Android store loaded
CoreData: error: -addPersistentStoreWithType:SQLite configuration:(null) URL:ChatStorage.sqlite -- file:///Users/xxxxx/Downloads/watoi-master/ options:{
NSSQLitePragmasOption = {
"journal_mode" = DELETE;
};
} ... returned error Error Domain=NSCocoaErrorDomain Code=134100 "The managed object model version used to open the persistent store is incompatible with the one that was used to create the persistent store." UserInfo={metadata={
GroupsRequested = "1537717677.103755";
ListsRequested = 1;
MediaSectionID = 1;
NSPersistenceFrameworkVersion = 865;
NSStoreModelVersionHashes = {
WABlackListItem = <b54037a7 ef644ae5 878923e7 69ac33f7 62451b56 5b5f5958 a974392d 928a26b2>;
WAChatProperties = <17867f4d e0b75073 448f040a 60cee369 3290523b 88212d5d 185196f5 c44ac988>;
WAChatPushConfig = <26c3aa5c 2ba087dc 9b9508b3 26983276 af4d3aae 2d451ffe 2a407b37 3727c5d1>;
WAChatSession = <7081f4ca 101d4740 df9e9a68 d6ea0a9f 87ce245b 3e3a59f1 a6019eee 13c45f53>;
WAGroupInfo = <ad1f229e c16b17e6 4c7bc3a8 8ce08f3d ebfbc5d5 2a4f345b ecae305d 87c51080>;
WAGroupMember = <096e35f3 7392f6a4 1023984a eebe0d7f 4e187d31 741f8286 aee4a223 53330b1a>;
WAGroupMembersChange = <77556fc5 ba7d6553 534ab0d3 bf8263d4 dc12404a 71965745 bb925964 f927aaa2>;
WAMediaItem = <e40f4841 a184d229 5139aa31 4e19948e 3994cc5d cd471a52 4299b81e 6fbf553a>;
WAMessage = <9b60946b d2974d60 ff56ae59 e59af242 36be34e3 3a1aa4f7 6321bc1e 5151ab85>;
WAMessageDataItem = <7a08b572 9e8c7a77 adc91840 5e407d78 96a0a196 43a859c6 f8225822 dc06e5ce>;
WAMessageInfo = <c29f46af 01ff96a4 3a01ec29 6e76406b e6ea699a d193a308 076474e9 ecc9f863>;
WAProfilePictureItem = <d61c57b4 0188730f 47d39264 fe1a8d6e bf43ba52 907ceeb6 9d9af2ae df4436dd>;
WAProfilePushName = <6b4ca82f dcefda51 1bbac4bd 4fab72f8 3490d603 44974df7 6384f60a 6c0902de>;
WAVCardMention = <f9f1d3d6 cdbc19e7 ca7d440e 3588cb89 946b2350 68d25337 24d03765 2f9984f8>;
WAZ1PaymentTransaction = <a2abb3fd dd16ac22 1d7d0dfd 957f0479 a7139c84 6e668ebf 036d4279 79816644>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
"2.12.14"
);
NSStoreType = SQLite;
NSStoreUUID = "8CAB0EAD-77E2-484A-9C02-12E73B71AF1E";
VCardsMentionsIndex = "2001-01-01 00:00:00 +0000";
"_NSAutoVacuumLevel" = 2;
"s.docIDOffset" = 4;
}, reason=The model used to open the store is incompatible with the one used to create the store} with userInfo dictionary {
metadata = {
GroupsRequested = "1537717677.103755";
ListsRequested = 1;
MediaSectionID = 1;
NSPersistenceFrameworkVersion = 865;
NSStoreModelVersionHashes = {
WABlackListItem = <b54037a7 ef644ae5 878923e7 69ac33f7 62451b56 5b5f5958 a974392d 928a26b2>;
WAChatProperties = <17867f4d e0b75073 448f040a 60cee369 3290523b 88212d5d 185196f5 c44ac988>;
WAChatPushConfig = <26c3aa5c 2ba087dc 9b9508b3 26983276 af4d3aae 2d451ffe 2a407b37 3727c5d1>;
WAChatSession = <7081f4ca 101d4740 df9e9a68 d6ea0a9f 87ce245b 3e3a59f1 a6019eee 13c45f53>;
WAGroupInfo = <ad1f229e c16b17e6 4c7bc3a8 8ce08f3d ebfbc5d5 2a4f345b ecae305d 87c51080>;
WAGroupMember = <096e35f3 7392f6a4 1023984a eebe0d7f 4e187d31 741f8286 aee4a223 53330b1a>;
WAGroupMembersChange = <77556fc5 ba7d6553 534ab0d3 bf8263d4 dc12404a 71965745 bb925964 f927aaa2>;
WAMediaItem = <e40f4841 a184d229 5139aa31 4e19948e 3994cc5d cd471a52 4299b81e 6fbf553a>;
WAMessage = <9b60946b d2974d60 ff56ae59 e59af242 36be34e3 3a1aa4f7 6321bc1e 5151ab85>;
WAMessageDataItem = <7a08b572 9e8c7a77 adc91840 5e407d78 96a0a196 43a859c6 f8225822 dc06e5ce>;
WAMessageInfo = <c29f46af 01ff96a4 3a01ec29 6e76406b e6ea699a d193a308 076474e9 ecc9f863>;
WAProfilePictureItem = <d61c57b4 0188730f 47d39264 fe1a8d6e bf43ba52 907ceeb6 9d9af2ae df4436dd>;
WAProfilePushName = <6b4ca82f dcefda51 1bbac4bd 4fab72f8 3490d603 44974df7 6384f60a 6c0902de>;
WAVCardMention = <f9f1d3d6 cdbc19e7 ca7d440e 3588cb89 946b2350 68d25337 24d03765 2f9984f8>;
WAZ1PaymentTransaction = <a2abb3fd dd16ac22 1d7d0dfd 957f0479 a7139c84 6e668ebf 036d4279 79816644>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
"2.12.14"
);
NSStoreType = SQLite;
NSStoreUUID = "8CAB0EAD-77E2-484A-9C02-12E73B71AF1E";
VCardsMentionsIndex = "2001-01-01 00:00:00 +0000";
"_NSAutoVacuumLevel" = 2;
"s.docIDOffset" = 4;
};
reason = "The model used to open the store is incompatible with the one used to create the store";
}
2018-09-26 18:39:05.045 watoi[7226:743593] CoreData loaded
2018-09-26 18:39:05.045 watoi[7226:743593] no such table: chat_list
Abort trap: 6

@residentsummer
Copy link
Owner

Yeah, it's definitely storage version incompatibility.

Though, I was able to find .ipa for version 2.18.91. Googled for whatsapp 2.18.91 ipa. Downloaded from one of the sites I consider trustworthy, here goes checksum for your reference:

$ md5 *ipa
MD5 (WhatsApp_Messenger_2.18.91.3.ipa) = 62786cad3d510713e8dacf02aa17622a

After unpacking it turned out that the location of model description files had changed (now it's Payload/WhatsApp.app/Frameworks/Core.framework/WhatsAppChat.momd), so adjust the command accordingly.

Right now I can't check that tool will work with this version (db schema had changed after all). But if you will try to run the migration, please leave a comment here with the results.

@residentsummer
Copy link
Owner

Hi @mikenagle.

Looks like Appsideloader.app is some techique to install apps not from the AppStore. It not what we need though. You have to try other sources...

I'm not sure if it's legal to share a link here (likely "NO"), but if you google from incognito for the exact phrase from my previous message, working sites are 2nd and 3rd (one russian site, requires registration for downloads; another have "cake" in it's name, scroll down > All versions > scroll to the bottom, pick a link for 2.18.91). File size is ~58M. Verify the checksum.

@flo92aa
Copy link
Author

flo92aa commented Sep 27, 2018

Hi,

thanks for your support. The output of my terminal is as follows now

MacBook-Air-3:watoi-master xxxxxx$ build/Release/watoi msgstore.db ChatStorage.sqlite app/Payload/WhatsApp.app/Frameworks/Core.framework/WhatsAppChat.momd
2018-09-27 19:14:20.565 watoi[9394:2930222] Android store loaded
2018-09-27 19:14:20.596 watoi[9394:2930222] CoreData loaded
2018-09-27 19:14:20.596 watoi[9394:2930222] no such table: chat_list
Abort trap: 6

It seems, like you said, that the db schema had changed.

@residentsummer
Copy link
Owner

@flo92aa please check the path to msgstore.db - it's missing.

Yeah, error messages are truly misleading :/

@residentsummer
Copy link
Owner

Added file checking code. Thanks @flo92aa for bringing my attention to it!

$ build/Release/watoi no-such-file.db ~/dev/whatsapp/ChatStorage_last.sqlite ~/dev/whatsapp/WhatsAppChat.momd
2018-09-27 21:38:48.689 watoi[5636:39825710] Probing msgstore.db at path: no-such-file.db
2018-09-27 21:38:48.690 watoi[5636:39825710]     missing/not readable!
[1]    5636 abort      build/Release/watoi no-such-file.db ~/dev/whatsapp/ChatStorage_last.sqlite 

@flo92aa
Copy link
Author

flo92aa commented Sep 28, 2018

After solving the first problem, I am facing a new problem which looks similar to the one in #11

I get this terminal output

MacBook-Air-3:watoi-master xxxxxx$ build/Release/watoi /Users/xxxxxx/Desktop/v2/watoi-master/build/Release/msgstore.db /Users/xxxxxx/Desktop/v2/watoi-master/ChatStorage.sqlite app/Payload/WhatsApp.app/Frameworks/Core.framework/WhatsAppChat.momd
2018-09-28 17:57:31.581 watoi[10710:3268269] Android store loaded
2018-09-28 17:57:31.600 watoi[10710:3268269] CoreData loaded
2018-09-28 17:57:31.607 watoi[10710:3268269] 491705592659-1349070486@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-09-28 17:57:31.613 watoi[10710:3268269] is group chat
2018-09-28 17:57:31.615 watoi[10710:3268269] not found member (null)
CoreData: warning: Unable to load class named 'WAGroupMember' for entity 'WAGroupMember'. Class not found, using default NSManagedObject instead.
2018-09-28 17:57:31.617 watoi[10710:3268269] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSDictionaryM setObject:forKey:]: key cannot be nil'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff50c1966b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fff77e57942 objc_exception_throw + 48
2 CoreFoundation 0x00007fff50c5977c _CFThrowFormattedException + 194
3 CoreFoundation 0x00007fff50b20cd3 -[__NSDictionaryM setObject:forKey:] + 963
4 watoi 0x000000010b05bc38 -[Importer addMissingMember:toChat:asAdmin:] + 600
5 watoi 0x000000010b05c584 -[Importer importChats] + 2324
6 watoi 0x000000010b05af1b -[Importer import] + 27
7 watoi 0x000000010b05ab66 main + 354
8 libdyld.dylib 0x00007fff78a6e015 start + 1
9 ??? 0x0000000000000004 0x0 + 4
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

Any ideas?

@residentsummer
Copy link
Owner

What's the size of your ChatStorage.sqlite? (ls -l /Users/xxxxxx/Desktop/v2/watoi-master/ChatStorage.sqlite).

Also please provide output of this command (it will show the number of groups chats and group members):

sqlite3 /Users/xxxxxx/Desktop/v2/watoi-master/ChatStorage.sqlite 'select count(*) from ZWACHATSESSION; select count(*) from ZWAGROUPMEMBER;'

@flo92aa
Copy link
Author

flo92aa commented Sep 28, 2018

Problems are solved now. Thanks for your support.

The second command showed that the ChatStorage.sqlite includes no groupchats. I created a new backup and extracted the file again, but this time the groupchats were included. Finally, I was able to transfer the messages from Android to iOS.

@residentsummer
Copy link
Owner

Glad to hear that! 🎉

More room for improvent here as well (reporting stats on loaded files).

After you'll restore the backup to your iPhone, could you please take a minute and comment here on the results? There are report #14 that Whatsapp crashes on startup...

@flo92aa
Copy link
Author

flo92aa commented Sep 29, 2018

I restored the backup and everything seems fine. Whatsapp is working correctly without crashes

@residentsummer
Copy link
Owner

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants