Author Topic: 0.2.12 + TB 3.0.2 - Reset All Accounts corrupts Personal Address Book  (Read 9026 times)

tanstaafl

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 122
  • Karma: +1/-0
Hi Josh,

Had my first data loss experience with 0.2.12 and TB 3.0.2... luckily I keep good backups, so it wasn't a disaster, just an an annoyance. ;)

I have a user where if I click the 'Reset All Accounts' button, it corrupts his main (Personal) address book, which has never been synced using anything. To confirm, I just tested it on mine, and it corrupted a *different* one, one that *had* been synced previously.

It will take a lot of work to try to nail this down specifically, and I'm willing to do it, but would appreciate some guidance from you on how best to proceed... I can send you one of the corrupted AddressBooks, if you'll promise not to spam them with Viagra spams - ;)

One thing, I'm reasonably sure it only happens on systems where an account had been added, synced, then deleted, then added again. The first one had only been done 2, maybe 3 times, but on mine I've done it a bunch of times for two different Address Books.

I looked in about:config > gcontactsync, and there are multiple sections of stuff for the 2 ABs I've sync'd - ie, 'ldap_2.servers.AddressbookName_3gContactSyn...' - apparently, each section relates to one of the times I set up the account?

Would it be a good idea to add some kind of 'Start Over' button that wipes all of the previous prefs clean? Or, is there a way to do that that I've missed? Or do I have to reset them all individually (there's a bunch in mine)?

I can reproduce the corrupting AB on one of our users systems every time, and would be willing to trust you with any of the files from his profile that might help you figure out what is happening - or, I can enable verbose logging (does it log anything when you 'Reset All Accounts'?), or I'm willing to do whatever you need me to do to try to nail this down.

Or - should I just go ahead and try 0.3a3?

Would appreciate your assistance...
« Last Edit: March 02, 2010, 06:58:02 AM by tanstaafl »

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 720
  • Karma: +5/-0
    • Pi Rules.org
Quote
Had my first data loss experience with 0.2.12 and TB3.0.2... luckily I keep good backups, so it wasn't a disaster, just an an annoyance. Wink
That's good that you had a backup.  I'm looking into basic backups for gContactSync 0.3 (Bug 22540).

Quote
I have a user where if I click the 'Reset All Accounts' button, it corrupts his main (Personal) address book, which has never been synced using anything. To confirm, I just tested it on mine, and it corrupted a *different* one, one that *had* been synced previously.

By corrupt, do you mean it erased everything or that the address book stopped working in some way (ie you can't add any contacts or lists, or it doesn't even show up)?

Quote
One thing, I'm reasonably sure it only happens on systems where an account had been added, synced, then deleted, then added again. The first one had only been done 2, maybe 3 times, but on mine I've done it a bunch of times for two different Address Books.

I looked in about:config > gcontactsync, and there are multiple sections of stuff for the 2 ABs I've sync'd - ie, 'ldap_2.servers.AddressbookName_3gContactSyn...' - apparently, each section relates to one of the times I set up the account?
...
Would it be a good idea to add some kind of 'Start Over' button that wipes all of the previous prefs clean? Or, is there a way to do that that I've missed? Or do I have to reset them all individually (there's a bunch in mine)?

gContactSync preferences are a bit of a mess wrt address books.  It used to store them under ldap_2.servers.AddressBookName_#gContactSync... but Thunderbird starting treating them as branches (put a . and add preferences to it).  So, I starting using a different branch under extensions.gContactSync.  For backwards compatibility it might still read those old preferences if the AB still exists.  Once it reads the old preferences the old values are removed.
See Bug 22216 for more details.

Old preferences for deleted ABs are still there, however, with both the new and old methods.  I'm going to add an Advanced tab (and rename the old one) in 0.3.  It will contain at least one button for cleaning up the preferences (Bug 22542).

Quote
It will take a lot of work to try to nail this down specifically, and I'm willing to do it, but would appreciate some guidance from you on how best to proceed... I can send you one of the corrupted AddressBooks, if you'll promise not to spam them with Viagra spams - Wink
...
I can reproduce the corrupting AB on one of our users systems every time, and would be willing to trust you with any of the files from his profile that might help you figure out what is happening - or, I can enable verbose logging (does it log anything when you 'Reset All Accounts'?), or I'm willing to do whatever you need me to do to try to nail this down.

If you could send me a verbose log I'd appreciate it as I think it is a problem with AB preferences rather than the actual mork address book.   Disable automatic synchronization and enable verbose logging then open up the AB and reset all address books.

Thanks for letting me know about this
gContactSync: info FAQs

tanstaafl

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 122
  • Karma: +1/-0
That's good that you had a backup.  I'm looking into basic backups for gContactSync 0.3 (Bug 22540).

Cool... but yeah, I've been good about backups for a long time (after having learned the hard way, like most people probably)...

Quote
By corrupt, do you mean it erased everything or that the address book stopped working in some way (ie you can't add any contacts or lists, or it doesn't even show up)?

It appears to be empty, but it isn't. The file size is larger than the original (before resetting all accounts), so obviously something got added.

Like I said - I have a corrupt one (and the good one prior to the corruption) that I can send you privately if you think that would help you figure out what happened.

Quote
gContactSync preferences are a bit of a mess wrt address books.  It used to store them under ldap_2.servers.AddressBookName_#gContactSync... but Thunderbird starting treating them as branches (put a . and add preferences to it).  So, I starting using a different branch under extensions.gContactSync.  For backwards compatibility it might still read those old preferences if the AB still exists.  Once it reads the old preferences the old values are removed.
See Bug 22216 for more details.

Hmmm.. ok, makes sense...

So, any chance this fix will hit 0.2 anytime soon? Or, is 0.3a3 stable enough that you could suggest we use it now? We are only syncing one address book, with multiple people, most of them in read-only mode - only 3 will have write access, and only one of those will normally be making any changes.

Quote
Old preferences for deleted ABs are still there, however, with both the new and old methods.  I'm going to add an Advanced tab (and rename the old one) in 0.3.  It will contain at least one button for cleaning up the preferences (Bug 22542).

So... the way I see it, my choices are, start over with either 0.2 or 0.3, but either way, I'm thinking I should reset all of the gContactSync prefs first...

Quote
Quote
I can reproduce the corrupting AB on one of our users systems every time, and would be willing to trust you with any of the files from his profile that might help you figure out what is happening - or, I can enable verbose logging (does it log anything when you 'Reset All Accounts'?), or I'm willing to do whatever you need me to do to try to nail this down.

If you could send me a verbose log I'd appreciate it as I think it is a problem with AB preferences rather than the actual mork address book.

Well... maybe the prefs are the cause, but do you still believe that now that I've told you the filesize of the .mab file increases when this happens? ;)

Sorry I left that little tidbit out of my initial report...

Quote
Disable automatic synchronization and enable verbose logging then open up the AB and reset all address books.

Done - log attached. I'd rather not attach the .mab files publicly, please let me know if you want me to send them - good one and then the corrupted one after resetting the Accounts - privately...

Quote
Thanks for letting me know about this

Thank *you*, Josh... gContactSync promises to be the best sync solution for Contacts for TB hands down...

Any chance you're thinking of adding Calendar/Tasks sometime in the future? :)

<Charles ducks as Josh throws his keyboard at him>
« Last Edit: March 03, 2010, 09:34:06 AM by tanstaafl »

tanstaafl

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 122
  • Karma: +1/-0
So... the way I see it, my choices are, start over with either 0.2 or 0.3, but either way, I'm thinking I should reset all of the gContactSync prefs first...

Or to be more precise...

Uninstall gContactSync, restart TB, reset all gContactSync related prefs in about:config, restart TB, install gContactSync, add account... go to next workstation, rinse, repeat...

I know that 0.3 is alpha, but we aren't using many of the extra feature - no pictures, and don't even really care about addresses - only Names, Company Names, email address and phone numbers... so, do you think it is reliable enough for our purposes? The main thing I'd want to avoid is having to hit each workstation again and again resetting things as changes are made to the extension...

tanstaafl

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 122
  • Karma: +1/-0
Hey Josh,

Sorry to be impatient, but even if you can't work on fixing this right away, could you comment on whether or not my thoughts regarding reinstalling gContactSync (and resetting all of the prefs in between) would likely fix this, and/or whether or not 0.3a3 is stable enough to go ahead and start using without large chances of it breaking during its progress toward 0.3 stable?

We're kind of stuck in limbo right now - the VP who is using it is a little gun-shy after having his main/personal address book corrupted...

Thanks for any comments/insights you have time to provide...

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 720
  • Karma: +5/-0
    • Pi Rules.org
Quote
It appears to be empty, but it isn't. The file size is larger than the original (before resetting all accounts), so obviously something got added.

I very recently helped someone recover deleted contacts from an address book.  When contacts are "deleted", they are placed in a deleted contacts table.  All that does is add some text at the bottom of the file.  So when several contacts are deleted the Mork AB will actually increase in size.  If you are careful you can undelete the contacts.  I'm going to write a wiki article on undeleting contacts here.

Quote
So, any chance this fix will hit 0.2 anytime soon? Or, is 0.3a3 stable enough that you could suggest we use it now? We are only syncing one address book, with multiple people, most of them in read-only mode - only 3 will have write access, and only one of those will normally be making any changes.
...
I know that 0.3 is alpha, but we aren't using many of the extra feature - no pictures, and don't even really care about addresses - only Names, Company Names, email address and phone numbers... so, do you think it is reliable enough for our purposes? The main thing I'd want to avoid is having to hit each workstation again and again resetting things as changes are made to the extension...

I actually don't know of any issues in 0.3.0a3 and consider it stable, but I'm making a fair number of changes in 0.3.0a4 (backup, adding some advanced tools, etc.).  0.3.0a3 does have better logging of address book preferences and AB resets, but if you make changes through the Accounts dialog those changes will not be seen by 0.2.

So if you have time it might help if you install 0.3 on just one machine (after a full profile backup) and do a Reset All Synced ABs (Accounts) with verbose logging enabled.  The reset code was changed slightly so it's possible that it won't reset the address books that aren't synchronized

When you look at the Accounts tab (in 0.2 and 0.3), do you see the ABs that get reset anywhere?  Is any AB rest that does not appear in the list?

I'm just about finished with my homework and projects for this week, and have spring break next week :D so I should be able to figure out a way to clean old preferences, although I do not think it would fix this problem.  I should be able to put it into a single line that can be run through the Error Console.

Quote
Well... maybe the prefs are the cause, but do you still believe that now that I've told you the filesize of the .mab file increases when this happens? ;)

Yes, I still think the prefs are the problem (see my explanation of the increased file size above).

Quote
Done - log attached. I'd rather not attach the .mab files publicly, please let me know if you want me to send them - good one and then the corrupted one after resetting the Accounts - privately...

Thanks, I might be able to undelete the contacts if the backups were outdated.  After class I might ask you to look at or send me the mab files just to see if the contacts were removed or see what happened.

Quote
Thank *you*, Josh... gContactSync promises to be the best sync solution for Contacts for TB hands down...

Any chance you're thinking of adding Calendar/Tasks sometime in the future? :)

<Charles ducks as Josh throws his keyboard at him>

I've been asked a few times, so I'm thinking about it, but I don't have a whole lot of free time at the moment.  <Josh throws his useless wireless keyboard>

Quote
Sorry to be impatient, but even if you can't work on fixing this right away, could you comment on whether or not my thoughts regarding reinstalling gContactSync (and resetting all of the prefs in between) would likely fix this, and/or whether or not 0.3a3 is stable enough to go ahead and start using without large chances of it breaking during its progress toward 0.3 stable?

If you remove all prefs related to gContactSync and ldap2_server then it would probably be fixed, but that might be a bit drastic at this point.

I have class now, be back in 1 hour
gContactSync: info FAQs

tanstaafl

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 122
  • Karma: +1/-0
Quote
It appears to be empty, but it isn't. The file size is larger than the original (before resetting all accounts), so obviously something got added.

I very recently helped someone recover deleted contacts from an address book.  When contacts are "deleted", they are placed in a deleted contacts table.  All that does is add some text at the bottom of the file.  So when several contacts are deleted the Mork AB will actually increase in size.  If you are careful you can undelete the contacts.  I'm going to write a wiki article on undeleting contacts here.

So... you're saying that all of the Contacts got deleted, which is why it appears to be empty?

The backup was up to date, so I'm not worried about recovering anything, just thought looking inside it might tell you something - it was gobbledygook to me... ;)

Quote
When you look at the Accounts tab (in 0.2 and 0.3), do you see the ABs that get reset anywhere?  Is any AB rest that does not appear in the list?

Now that you've asked that question, I realize that I don't even know precisely what resetting an AB does...

Is it *supposed* to empty the AB, and then redownload from Google?

Quote
I'm just about finished with my homework and projects for this week, and have spring break next week :D so I should be able to figure out a way to clean old preferences, although I do not think it would fix this problem.  I should be able to put it into a single line that can be run through the Error Console.

That will help for later, but it's not that big a deal to just uninstall gContactSync, restart TB, reset each leftover gContactSync pref, restart TB and reinstall gcontactsync.

Quote
Quote
Done - log attached. I'd rather not attach the .mab files publicly, please let me know if you want me to send them - good one and then the corrupted one after resetting the Accounts - privately...

Thanks,

Curious if the log told you anything useful?

Quote
Quote
Thank *you*, Josh... gContactSync promises to be the best sync solution for Contacts for TB hands down...

Any chance you're thinking of adding Calendar/Tasks sometime in the future? :)

<Charles ducks as Josh throws his keyboard at him>

I've been asked a few times, so I'm thinking about it, but I don't have a whole lot of free time at the moment.  <Josh throws his useless wireless keyboard>

Heh - no worries... but if you do, you might have a look at the SyncSW extension - it only syncs with the Scheduleworld service, but Scheduleworld syncs very well with Google (Calendar and Contacts), so it might give you some hints...

Quote
Quote
Sorry to be impatient, but even if you can't work on fixing this right away, could you comment on whether or not my thoughts regarding reinstalling gContactSync (and resetting all of the prefs in between) would likely fix this, and/or whether or not 0.3a3 is stable enough to go ahead and start using without large chances of it breaking during its progress toward 0.3 stable?

If you remove all prefs related to gContactSync and ldap2_server then it would probably be fixed, but that might be a bit drastic at this point.

Drastic, but not difficult, and we need to get this working asap, but... you're sure that anything with the ldap2_server belongs to gContactSync too?
« Last Edit: March 03, 2010, 11:56:27 AM by tanstaafl »

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 720
  • Karma: +5/-0
    • Pi Rules.org
No, ldap2_server is for address books (leave them alone for now), but ldap2_server...gContactSyncUsername is gContactSync.  I'll let you know more when I'm done with class fir the day in 1 hour.
gContactSync: info FAQs

tanstaafl

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 122
  • Karma: +1/-0
Oh, right, you said '... related to gContactSync *and* ldap2_server... '

Ok, will wait to hear back - and thanks again for looking into this for me...

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 720
  • Karma: +5/-0
    • Pi Rules.org
Quote
So... you're saying that all of the Contacts got deleted, which is why it appears to be empty?
The backup was up to date, so I'm not worried about recovering anything, just thought looking inside it might tell you something - it was gobbledygook to me... Wink

Yes, that is almost certainly the case.  ABs are currently stored using Mork, and look like junk to me too.  ;)  I just found that deleting a contact adds lines to the end of the file after comparing a file before and after the deletion.

Quote
Now that you've asked that question, I realize that I don't even know precisely what resetting an AB does...

Is it *supposed* to empty the AB, and then redownload from Google?

"Resetting" an address book just removes all contacts and mailing lists from it and sets the last synchronized date to 0.  The next time you sync everything should be pulled back from Google.  However, if the address book is in write-only mode then nothing will happen.

I did see your new thread/feature request and will reply there next.

I realize that a reset is very unclear, especially in 0.2.  0.3 will show the following when you try to reset an address book:

Quote
Resetting an address book will permanently remove all contacts and mailing lists from that address book, but will not remove your synchronization settings for that address book.  Contacts and groups will be pulled from Google back into the address book during the next synchronization.
Click OK to reset the address book or Cancel to stop.
Visit the forum if you have any questions.

Quote
Curious if the log told you anything useful?

gContactSync decided to reset the Vendors directory as well as the Personal Address Book, which means that they each have a gContactSyncUsername preference somewhere.

Can you look in the Config Editor for:
extensions.gContactSync*gContactSyncUsername
and give me a list of just the Preference Name (right-click -> Copy Name), as well as whether each is blank or not, for each result?

I expect the following will have some value:
extensions.gContactSync.ldap_2.servers.Vendors_4.gContactSyncUsername
extensions.gContactSync.ldap_2.servers.pab.gContactSyncUsername

The same 2 address books should appear in the Accounts tab.

Quote
Oh, right, you said '... related to gContactSync *and* ldap2_server... '

Ok, will wait to hear back - and thanks again for looking into this for me...

Correct, any preference like the following is obsolete and no longer used:
ldap_2.servers.AddressBookName_1gContactSyncUsername.uri
where AddressBookName is the name of the address book.  After the AB name comes either nothing or _ and a number if there were other address books in the past with the same name.

Assuming you haven't named any address books gContactSync you can delete any preference with the following filters (NOTE - see the exceptions below):
ldap_2.servers.*gContactSyncUsername
ldap_2.servers.*gContactSynclastSync

These preferences can be safely removed if they start with ldap_2.servers
That filter will also return results that should not be removed because you evidently cannot use a regular expression or complicated filter.
This includes new gContactSync prefs starting with extensions.gContactSync.
It may also return information on any address books that have gContactSync in their name.

If you used very early versions of 0.3 you may want to try the following as well:
ldap_2.servers.*gContactSyncDisabled
ldap_2.servers.*gContactSyncPrimary
ldap_2.servers.*gContactSyncPlugin
ldap_2.servers.*gContactSyncmyContacts
ldap_2.servers.*gContactSyncmyContactsName
ldap_2.servers.*gContactSyncreadOnly
ldap_2.servers.*gContactSyncwriteOnly
ldap_2.servers.*gContactSyncsyncGroups

If you want to remove all traces of gContactSync, first uninstall gContactSync and restart TB.  Then put gContactSync into the Config Editor filter.
Note that not all results are directly from gContactSync.  I, for example, have a tinymenu result (can be removed if gContactSync is removed), some ABs with gContactSync in their name, etc.


EDIT - let me know if I missed anything
gContactSync: info FAQs

tanstaafl

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 122
  • Karma: +1/-0
ABs are currently stored using Mork, and look like junk to me too.  ;)  I just found that deleting a contact adds lines to the end of the file after comparing a file before and after the deletion.

Weird... so do they ever clean themseleves up? Or just grow and grow forever? That wouldn't make much sense to me...

Quote
"Resetting" an address book just removes all contacts and mailing lists from it and sets the last synchronized date to 0.  The next time you sync everything should be pulled back from Google.  However, if the address book is in write-only mode then nothing will happen.

Hmmm... maybe I've stumbled on another bug (or an unintended consequence)...

The above makes sense, except, somehow, resetting our Vendors Address Book kept deleting all the contacts from Google, so that's what I thought it was supposed to do... could that have been because I had the 'Remove contacts from Google immediately after they are removed in Thunderbird' option checked? If so, is that a bug, or intended behavior? Meaning, shouldn't resetting an AB be an exception to that option/rule?

Quote
I did see your new thread/feature request and will reply there next.

I realize that a reset is very unclear, especially in 0.2.  0.3 will show the following when you try to reset an address book:

Quote
Resetting an address book will permanently remove all contacts and mailing lists from that address book, but will not remove your synchronization settings for that address book.  Contacts and groups will be pulled from Google back into the address book during the next synchronization.
Click OK to reset the address book or Cancel to stop.
Visit the forum if you have any questions.

So... what is the purpose for resetting an AB? Meaning, under what circumstances might it be necessary?

Quote
Quote
Curious if the log told you anything useful?

gContactSync decided to reset the Vendors directory as well as the Personal Address Book, which means that they each have a gContactSyncUsername preference somewhere.

Can you look in the Config Editor for:
extensions.gContactSync*gContactSyncUsername
and give me a list of just the Preference Name (right-click -> Copy Name), as well as whether each is blank or not, for each result?

There are 4... Copy Name for each gives:

extensions.gContactSync.ldap_2.servers.Vendors_1.gContactSyncUsername
extensions.gContactSync.ldap_2.servers.Vendors_2.gContactSyncUsername
extensions.gContactSync.ldap_2.servers.Vendors_3.gContactSyncUsername
extensions.gContactSync.ldap_2.servers.Vendors_4.gContactSyncUsername

The status for all 4 is 'User Set', but two (_1 and _3) appear to be blank. The other two (_2 and _4) have the same value:

mbi.sync.vendors@gmail.com

Quote
I expect the following will have some value:
extensions.gContactSync.ldap_2.servers.Vendors_4.gContactSyncUsername

Yes, but now I'm wondering why _2 does too?

Quote
extensions.gContactSync.ldap_2.servers.pab.gContactSyncUsername

Value = mbi.hsteuer@gmail.com

But this is weird. Howard doesn't really know enough to be messing with this stuff, and he swears he didn't.

I do know that I created the mbi.hsteuer@gmail.com account for him when we were syncing his PAB with Scheduleworld... but I know for a fact *I* never used that account with gContactSync...

Quote
The same 2 address books should appear in the Accounts tab.

But they don't... only the mbi.sync.vendors@gmail.com shows there.

Quote
Quote
Oh, right, you said '... related to gContactSync *and* ldap2_server... '

Ok, will wait to hear back - and thanks again for looking into this for me...

Correct, any preference like the following is obsolete and no longer used:
ldap_2.servers.AddressBookName_1gContactSyncUsername.uri

<snip>

EDIT - let me know if I missed anything

Thanks Josh. Other than the other possible bug described above, I think that covers everything. Thanks very much for these thorough explanations and helping me understand what happened...

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 720
  • Karma: +5/-0
    • Pi Rules.org
Quote
Weird... so do they ever clean themseleves up? Or just grow and grow forever? That wouldn't make much sense to me...

Looking at the source code it would appear that they are cleaned after 6 months.

Quote
The above makes sense, except, somehow, resetting our Vendors Address Book kept deleting all the contacts from Google, so that's what I thought it was supposed to do... could that have been because I had the 'Remove contacts from Google immediately after they are removed in Thunderbird' option checked? If so, is that a bug, or intended behavior? Meaning, shouldn't resetting an AB be an exception to that option/rule?

Do you know if it happens during the actual reset or during the first sync after the reset?  It shouldn't happen during the reset because that preference is temporarily disabled before a reset occurs.

I see a potential problem after a reset if write-only mode is enabled.  Instead of just not doing anything like I thought at first it could delete everything.  I'll try to figure that out soon (I'm leaving to go back home today for spring break).

Quote
So... what is the purpose for resetting an AB? Meaning, under what circumstances might it be necessary?

The original purpose was to fix an address book that has one or more broken mailing lists.  When a contact in a mailing list doesn't have an e-mail address strange things can happen (see Bug 492695).  Earlier versions of gContactSync didn't catch every case (and still can't if disabled).  There is now an automatic prompt for a reset if gContactSync sees a broken mailing list in Thunderbird 3.  Mailing lists in TB 2 are already broken, so it is sometimes difficult to tell if they are really broken.

Quote
There are 4... Copy Name for each gives:

extensions.gContactSync.ldap_2.servers.Vendors_1.gContactSyncUsername
extensions.gContactSync.ldap_2.servers.Vendors_2.gContactSyncUsername
extensions.gContactSync.ldap_2.servers.Vendors_3.gContactSyncUsername
extensions.gContactSync.ldap_2.servers.Vendors_4.gContactSyncUsername

The status for all 4 is 'User Set', but two (_1 and _3) appear to be blank. The other two (_2 and _4) have the same value:

mbi.sync.vendors...
...
Yes, but now I'm wondering why _2 does too?

Whenever you create an address book TB makes a new preference branch for it (such as ldap_2.servers.Vendors). Spaces are converted to _ and some other characters are removed.  If that preference branch already exists, TB adds a _# to it where # is incremented for each AB with that name.  It looks like that profile has had 5 address books named Vendors.

_2 might still have the gContactSyncUsername before it was left there when the third Vendors AB was deleted.
Finding and deleting preferences for deleted ABs is on my TODO list for 0.3's Advanced tab.

Quote
extensions.gContactSync.ldap_2.servers.pab.gContactSyncUsername
Value = mbi.hsteuer...

But this is weird. Howard doesn't really know enough to be messing with this stuff, and he swears he didn't.

I do know that I created the mbi.hsteuer@gmail.com account for him when we were syncing his PAB with Scheduleworld... but I know for a fact *I* never used that account with gContactSync...

Quote
The same 2 address books should appear in the Accounts tab.

But they don't... only the mbi.sync.vendors... shows there.

That is indeed weird, but I may know what happened.  At some point hat AB was ever setup to synchronize with that account (the only explanation for the preference that I can think of) .  Then that account was deleted through the Accounts tab and gContactSync didn't clear the username.  Either you used a very early version of gContactSync 0.1 or there was a bug that stopped gContactSync from clearing that username preference.

Now the question is, should address books with a gContactSyncUsername still be reset if there is no authorization token for that account?  I'm inclined to say no for 0.2, but yes for 0.3  0.3 will prompt the user to sign in if the auth token is missing or invalid, but I do not think 0.2 did.  Also, 0.2 did not show such ABs in the Accounts tab.


Quote
Thanks Josh. Other than the other possible bug described above, I think that covers everything. Thanks very much for these thorough explanations and helping me understand what happened...

No problem, thanks for the feedback and helping me track this down.
gContactSync: info FAQs

tanstaafl

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 122
  • Karma: +1/-0
Quote
The above makes sense, except, somehow, resetting our Vendors Address Book kept deleting all the contacts from Google, so that's what I thought it was supposed to do... could that have been because I had the 'Remove contacts from Google immediately after they are removed in Thunderbird' option checked? If so, is that a bug, or intended behavior? Meaning, shouldn't resetting an AB be an exception to that option/rule?

Do you know if it happens during the actual reset or during the first sync after the reset?  It shouldn't happen during the reset because that preference is temporarily disabled before a reset occurs.

I think it was during the first sync after, but I can't be certain... however...

Quote
I see a potential problem after a reset if write-only mode is enabled.

This wasn't the case - both Howards and the other user I was working with had write access, and I'm certain of that.

Quote
Finding and deleting preferences for deleted ABs is on my TODO list for 0.3's Advanced tab.

Good, otherwise it can get really ugly really quick if you're doing a lot of testing, adding then deleting ABs, etc...

Quote
Now the question is, should address books with a gContactSyncUsername still be reset if there is no authorization token for that account?  I'm inclined to say no for 0.2, but yes for 0.3  0.3 will prompt the user to sign in if the auth token is missing or invalid, but I do not think 0.2 did.

Sounds ok to me...

Question though - if I change the password for the Google Account everyone is syncing with, doesn't that reset the auth token as well? If not, I see that as a major security risk... because I didn't see any other way to reset the auth tokens.

Thanks again...

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 720
  • Karma: +5/-0
    • Pi Rules.org
Quote
I think it was during the first sync after, but I can't be certain... however...
...

This wasn't the case - both Howards and the other user I was working with had write access, and I'm certain of that.

OK, I'll see if I can repeat that with or without write-only mode.

Quote
Good, otherwise it can get really ugly really quick if you're doing a lot of testing, adding then deleting ABs, etc...

You don't want to see my prefs.js in my main TB profile.

Quote
Question though - if I change the password for the Google Account everyone is syncing with, doesn't that reset the auth token as well? If not, I see that as a major security risk... because I didn't see any other way to reset the auth tokens.

Changing the password will result in a "Token Expired" error message from gContactSync because Google invalidates all tokens issued before the change.  In this case, gContactSync will ask the user to enter his or her credentials to get a new token.
gContactSync: info FAQs

tanstaafl

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 122
  • Karma: +1/-0
Quote
Quote
Good, otherwise it can get really ugly really quick if you're doing a lot of testing, adding then deleting ABs, etc...

You don't want to see my prefs.js in my main TB profile.

I can imagine...

Quote
Quote
Question though - if I change the password for the Google Account everyone is syncing with, doesn't that reset the auth token as well? If not, I see that as a major security risk... because I didn't see any other way to reset the auth tokens.

Changing the password will result in a "Token Expired" error message from gContactSync because Google invalidates all tokens issued before the change.  In this case, gContactSync will ask the user to enter his or her credentials to get a new token.

I figured as much, but wanted to make sure...

Thanks again for your dedication to gContactSync! 0.3 looks like its going to be really nice.

Now, if they'd only finish killing off mork and switch to sqlite for the ABs, that will hopefully make maintaining gContactSync easier for you... or will it matter?