-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Importing contacts results in duplicates #52
Comments
It's going to be difficult to figure this out without being able to reproduce the problem. Android is supposed to "aggregate" "matching" contacts, but I don't see a definition of "matching" or a precise specification for the "aggregation" procedure. How many contacts are actually present after import? Assuming you import your 279 exported contacts into an empty contacts list (e.g., in a fresh emulator image) and then turn around and export them, how many are reported as exported? |
Exported again from your app says that 567 exported. |
567 is more than twice 279, so it's not just a neat case of each contact appearing twice. |
Your app in the initial export showed that 279 exported, however when importing from the app said 836, again export said 567. The 279 is the correct number that it should imported... |
As I saw in general, twice contacts exist, but maybe some apps are shown three times as I can understand |
I may have a solution for this, and I starting implementing it in code, but I can't really test or debug it without a contacts collection that displays the problem. Are you willing to post a redacted version of yours? You can do the following:
You should still go through the redacted version to make sure there's nothing you don't want there, and I can take no responsibility for any sensitive information leaking through. |
Hey I've noticed that I get several duplicates from this, I think this should be a good enough sample. Often times I get as many as four duplicates, and I think this is why: grep 'account_type' ./contacts-redacted.json | sort | uniq "account_type": "com.google",
"account_type": "com.google.android.apps.tachyon",
"account_type": "com.whatsapp",
"account_type": "org.thoughtcrime.securesms", (removed) My thought is it might be more useful to sha256sum+truncate each field instead of redacting it, but I think I'd need to write some actual code for that as I don't believe jq can do that. edit: In fact I'll do something better... edit 2: Something like this works? Some useful stuff:
Script: https://github.com/1Dragoon/chirodactor/ Basically it finds interesting fields and attempts to normalize them, then stores them in an ordered and deduped array, then inserts the order offset in its place along with a guess of what type of data it is. Not perfect, but should be good enough easily determine which contacts are related to each other. |
The jq command returned 279 contacts as expected. Tried it in android emulator to import, 836 imported. And all the contacts are imported twice. Indeed, the first contact is correct (with image and all fields) and the second is completely empty, only the name-title is correct.
Originally posted by @thanasistrisp in #50 (comment)
The text was updated successfully, but these errors were encountered: