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

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -[NSDictionaryM setObject:forKey:]: key cannot be nil' #53

Open
ammadanjumch opened this issue Jan 5, 2022 · 5 comments

Comments

@ammadanjumch
Copy link

@residentsummer any clue how to fix this one?

watoi % build/Release/watoi msgstore.db ./ChatStorage.sqlite app/Payload/WhatsApp.app/Frameworks/Core.framework/WhatsAppChat.momd
2022-01-05 16:55:45.444 watoi[3269:124075] Probing msgstore.db at path: msgstore.db
2022-01-05 16:55:45.444 watoi[3269:124075] ok.
2022-01-05 16:55:45.445 watoi[3269:124075] Android store loaded
2022-01-05 16:55:45.445 watoi[3269:124075] Probing WhatsAppChat.momd at path: app/Payload/WhatsApp.app/Frameworks/Core.framework/WhatsAppChat.momd
2022-01-05 16:55:45.445 watoi[3269:124075] ok.
2022-01-05 16:55:45.445 watoi[3269:124075] Probing ChatStorage.sqlite at path: ./ChatStorage.sqlite
2022-01-05 16:55:45.445 watoi[3269:124075] ok.
CoreData: error: addPersistentStoreWithType:configuration:URL:options:error: returned error NSCocoaErrorDomain (259)
CoreData: annotation: userInfo:
CoreData: annotation: NSFilePath : /Users/achaudhry/watoi/ChatStorage.sqlite
CoreData: annotation: NSSQLiteErrorDomain : 26
CoreData: annotation: storeType: SQLite
CoreData: annotation: configuration: (null)
CoreData: annotation: URL: ChatStorage.sqlite -- file:///Users/achaudhry/watoi/
CoreData: annotation: options:
CoreData: annotation: NSSQLitePragmasOption : {
"journal_mode" = DELETE;
}
2022-01-05 16:55:45.450 watoi[3269:124075] CoreData loaded
2022-01-05 16:55:45.452 watoi[3269:124075] 1430060208@broadcast: 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.
2022-01-05 16:55:45.453 watoi[3269:124075] is group chat
2022-01-05 16:55:45.453 watoi[3269:124075] not found member [email protected]
CoreData: warning: Unable to load class named 'WAGroupMember' for entity 'WAGroupMember'. Class not found, using default NSManagedObject instead.
2022-01-05 16:55:45.453 watoi[3269:124075] not found member [email protected]
2022-01-05 16:55:45.453 watoi[3269:124075] [email protected]: not found
2022-01-05 16:55:45.453 watoi[3269:124075] is group chat
2022-01-05 16:55:45.453 watoi[3269:124075] not found member (null)
2022-01-05 16:55:45.453 watoi[3269:124075] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSDictionaryM setObject:forKey:]: key cannot be nil'
*** First throw call stack:
(
0 CoreFoundation 0x000000019a7a81cc __exceptionPreprocess + 240
1 libobjc.A.dylib 0x000000019a4f97b8 objc_exception_throw + 60
2 CoreFoundation 0x000000019a878488 -[__NSCFString characterAtIndex:].cold.1 + 0
3 CoreFoundation 0x000000019a885260 -[__NSDictionaryM setObject:forKey:].cold.2 + 0
4 CoreFoundation 0x000000019a6e1628 -[__NSDictionaryM setObject:forKey:] + 896
5 watoi 0x0000000104554e40 -[Importer addMissingMember:toChat:asAdmin:] + 608
6 watoi 0x00000001045555d8 -[Importer importChats] + 1876
7 watoi 0x0000000104554258 -[Importer import] + 28
8 watoi 0x0000000104553d80 main + 364
9 dyld 0x00000001046a90f4 start + 520
)
libc++abi: terminating with uncaught exception of type NSException
zsh: abort build/Release/watoi msgstore.db ./ChatStorage.sqlite

@MichaelProjects
Copy link

any update yet?

@Tonne-TM
Copy link

Tonne-TM commented May 7, 2022

Having exactly the same error (iPhone 13 mini backup, MacOS 12.2.1 M1 Pro).

@Szmiglo
Copy link

Szmiglo commented May 10, 2022

Same here, unfortunatelly

@kavishdahekar
Copy link

Anybody had any luck with this? I'm stuck at the exact same place.

@TonyVlcek
Copy link

Same here ✋

When running the migration according to the original guide:

build/Release/watoi <path-to-msgstore.db> ./ChatStorage.sqlite app/Payload/WhatsApp.app/Frameworks/Core.framework/WhatsAppChat.momd

The Core.framework app is not found inside Frameworks.

After looking into that folder I tried using the SharedModules.framework folder instead and running like this:

watoi/build/Release/watoi msgstore.db ./ChatStorage.sqlite app/Payload/WhatsApp.app/Frameworks/SharedModules.framework/WhatsAppChat.momd

That gets over the previous issue and it found the necessary files but it errors out with the message in the title of this issue.

This is my call stack:

watoi/build/Release/watoi msgstore.db ./ChatStorage.sqlite app/Payload/WhatsApp.app/Frameworks/SharedModules.framework/WhatsAppChat.momd
2024-03-10 20:04:59.131 watoi[4718:36286] Probing msgstore.db at path: msgstore.db
2024-03-10 20:04:59.131 watoi[4718:36286]     ok.
2024-03-10 20:04:59.134 watoi[4718:36286] Android store loaded
2024-03-10 20:04:59.134 watoi[4718:36286] Probing WhatsAppChat.momd at path: app/Payload/WhatsApp.app/Frameworks/SharedModules.framework/WhatsAppChat.momd
2024-03-10 20:04:59.134 watoi[4718:36286]     ok.
2024-03-10 20:04:59.134 watoi[4718:36286] Probing ChatStorage.sqlite at path: ./ChatStorage.sqlite
2024-03-10 20:04:59.134 watoi[4718:36286]     ok.
2024-03-10 20:04:59.148 watoi[4718:36286] CoreData loaded
2024-03-10 20:04:59.154 watoi[4718:36286] [email protected]: not found
2024-03-10 20:04:59.155 watoi[4718:36286] [email protected]: not found
2024-03-10 20:04:59.156 watoi[4718:36286] 	 is group chat
2024-03-10 20:04:59.156 watoi[4718:36286] 	 not found member (null)
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSDictionaryM setObject:forKey:]: key cannot be nil'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000018125c570 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x0000000180d4deb4 objc_exception_throw + 60
	2   CoreFoundation                      0x00000001811a2084 -[__NSDictionaryM setObject:forKey:] + 1064
	3   watoi                               0x0000000102fe4a40 -[Importer addMissingMember:toChat:asAdmin:] + 480
	4   watoi                               0x0000000102fe5034 -[Importer importChats] + 1456
	5   watoi                               0x0000000102fe4034 -[Importer import] + 20
	6   watoi                               0x0000000102fe3c20 main + 272
	7   dyld                                0x0000000180d890e0 start + 2360
)
libc++abi: terminating due to uncaught exception of type NSException
zsh: abort      watoi/build/Release/watoi msgstore.db ./ChatStorage.sqlite

The version of WhatsApp I got via Apple Configurator is 24.5.4 (WhatsApp 24.5.4.ipa).


BTW: I'm using watoi because the official migration tool in the Move to iOS Android app fails at 98% complete, saying, "An unknown error occurred".

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

6 participants