Bug #2011

double contacts

Added by Bibberbob over 4 years ago. Updated over 2 years ago.

Status:ClosedStart date:10/05/2013
Priority:HighDue date:
Assignee:n8fr8% Done:

0%

Category:-
Target version:v13 - October Oooya
Component:

Description

After upgrading to the latest 12.5 beta 5 every contact is listet twice.

History

#1 Updated by devrandom over 4 years ago

  • Assignee set to n8fr8

Nathan, need to revert the move to a single contact list, or create upgrade logic to remove old contacts from DB.

#2 Updated by n8fr8 over 4 years ago

  • Status changed from New to In Progress
  • Priority changed from Normal to High

devrandom wrote:

Nathan, need to revert the move to a single contact list, or create upgrade logic to remove old contacts from DB.

Is it the single contact list that is causing this? I don't see how, since the contact lists are not persisted in the DB. I will look through the logic, but I don't see how that change in roster loading could cause the double issue.

I think it is that before we were storing contact address with the resource instead of bare.

@Bibberbob - for now, if you delete and add your account, it will clear up the issue. However, that will also delete your OTR key for that account.

#3 Updated by devrandom over 4 years ago

AFAIK, we never stored the resource in the contact list. Also, we do persist contact lists but we also sync them on login with the server being the master.

I verified a few days ago that the contacts were doubled (and no resources were in the list). Each contact was once with a contact list that was non-existent, and once with the Buddies list. After nuking and recreating the account, the ones with a non-existent list were gone.

I also noted this issue on the omnibus pull request.

You can likely replicate the issue by installing v11 then upgrading.

#4 Updated by Bibberbob over 4 years ago

Delete and restore the account did the trick. Thanks a lot!

#5 Updated by n8fr8 over 4 years ago

devrandom wrote:

I verified a few days ago that the contacts were doubled (and no resources were in the list). Each contact was once with a contact list that was non-existent, and once with the Buddies list. After nuking and recreating the account, the ones with a non-existent list were gone.

The fix I am working on uses the existing default contact list if it is provided by the ContactListManager, and then if that doesn't exist, it will create "Buddies". The bug before was that I was always ignoring this default list...

still, I don't understand how this would create a double contact view, in that the ContactListFilterView comes directly from the Imps.Contact cursor, and has nothing to do with lists at all. Somewhere in there is some overlap I suppose, but strange...

#6 Updated by n8fr8 over 4 years ago

  • Status changed from In Progress to Resolved

tested upgrade from Gibberbot v11 to latest v12 and did not see double contact issue!

#7 Updated by bmaehr over 4 years ago

Just did an update of gibberbot (play store version) on two devices to ChatSecure-v12.6.4-RC3.apk Got duplicate contacts on both devices.

#8 Updated by n8fr8 over 4 years ago

  • Status changed from Resolved to In Progress

Thanks for the report.

As a side note, to take advantage of the new local encryption features, you will need to either do a fresh install or go to the Settings->Applications screen for the app and "Clear Data".

This will have the side effect of solving the duplicate contact issue.

#9 Updated by n8fr8 over 4 years ago

Question for bmaehr: was this a google account or some other XMPP server?

#10 Updated by devrandom about 4 years ago

Reported by another user on jabber.ccc.de

#11 Updated by n8fr8 about 4 years ago

  • Status changed from In Progress to Resolved

When lists are loaded or created, make sure to check if there is an existing contact on another list before inserting/creating a new one for that address

https://github.com/n8fr8/Gibberbot/commit/2a6d13f32b2ae95897e1b30c8a05df641cd070b6

#12 Updated by cstest about 4 years ago

I have a double contact again, after adding a new contact with the latest CS (12.7.1)

#13 Updated by cstest about 4 years ago

cstest wrote:

I have a double contact again, after adding a new contact with the latest CS (12.7.1)

maybe i should add some more infos:
both are online
only clicking on the first one opens the Chatpanel
only the first one blinks, when recieving a message

#14 Updated by n8fr8 about 4 years ago

  • Target version changed from v12 - March Mantra to v13 - October Oooya

#15 Updated by n8fr8 over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF