Author Topic: Expired Token: "Please login before trying to sync contacts."  (Read 10966 times)

centuryplumbingco

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Expired Token: "Please login before trying to sync contacts."
« on: September 30, 2013, 09:16:52 AM »
When I try to sync I get the message "Please login before trying to sync contacts."

Looking at the log I get the following message:
"Starting synchronization for centuryplumbingco@gmail.com at: 1379622893828 (Thu Sep 19 2013 15:34:53 GMT-0500 (Central Daylight Time))

***Beginning Group - Mail List Synchronization***
***Found an expired token***
***ERROR: Error during sync
Error Message:
Login expired.
Please report this error to gcontactsync at pirules.org (in English, if possible)"

how do I fix this?  I have no idea where to update my tokens or password.

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 720
  • Karma: +5/-0
    • Pi Rules.org
Re: Expired Token: "Please login before trying to sync contacts."
« Reply #1 on: December 08, 2013, 03:04:18 PM »
gContactSync should have prompted you to enter your e-mail address and password (assuming you have the latest version).

If it doesn't prompt you, you can go to the menu in TB -> Options -> Options -> Security -> Passwords -> Saved Passwords.
You should see at least one entry for site: "chrome://gContactSync".  Click the one with the e-mail address giving you the error then click Remove.  This will remove the expired token from Thunderbird and you should be prompted to sign in next time you sync.
gContactSync: info FAQs

catfordkid

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Expired Token: "Please login before trying to sync contacts."
« Reply #2 on: February 21, 2014, 08:36:44 AM »
I have a similar problem - but there's no relevant token in the Thunderbird password list.

I was prompted to log in, but clicked something in error. I just get a 'Please login before trying to sync contacts' message when attempting to sync, without any hint as to how to do so; can you assist, please?

pkiff

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
Re: Expired Token: "Please login before trying to sync contacts."
« Reply #3 on: February 24, 2014, 10:36:22 PM »
I also am suddenly getting something similar. I got a notice about an Expired Token but I bypassed the dialog box where I was supposed to fill in my Gmail email and password again. Now I can't get that dialog to show again so I can add it. I've gone into my saved passwords and I don't have anything that looks like "chrome://gContactSync". I have IMAP, SMTP, and Calendar entries for that particular Gmail account. I removed all three, and was prompted to add them back again after restarting and trying to send email and accessing my calendar. But I'm still getting no pop-up about my gContactSync login. All I get is an error pop-up: "Please login before trying to sync contacts".

I'm on v0.4.0rc2 with Thunderbird/24.3.0, and I'm also running Lightning.

Any ideas how to reset some flag or something to force the prompt to show again?


yruf

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Expired Token: "Please login before trying to sync contacts."
« Reply #4 on: February 26, 2014, 03:33:36 PM »
I also see this problem, and can't find the relevant token in the password list. I was asked to authenticate once, but cancelled the dialog. It now doesn't ask again. Would be nice to have re-login in the account preferences dialog.


pkiff

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
Re: Expired Token: "Please login before trying to sync contacts."
« Reply #5 on: February 27, 2014, 12:42:35 AM »
It seems that one way to force the system to re-authenticate your Gmail account is to edit the gContactSync account, remove the association with your address book, save, then re-associate it. At least, that worked for me.

To edit your account: Menu -> gContactSync -> Edit Accounts
Select your Address Book on the left, then under "Choose an Account" select "None" and Save Changes.

This will decouple your Gmail contacts and address book. I closed and re-opened Thunderbird after doing this.

Then go back to the same menu, and re-associate them by clicking the Address Book and then use "Add a New Account" to enter your Gmail address and password.

I worried that this might introduce some new set of changes, but once I got things configured correctly, and associated the correct set of Groups, the account login now works, the sync went through smoothly and there was only a single change uploaded to Gmail. I also now have a "chrome://gContactSync" entry in my Options -> Options -> Security -> Saved Passwords storage area.

Why is this error message loop happening? My guess is that it is related to the new account login code that was added last month with the release of rc2. I browsed through some code here that I think is related to the current problem:
https://github.com/jdgeenen/gcontactsync/issues/19

Hope this helps someone.

Phil.
« Last Edit: February 27, 2014, 12:44:57 AM by pkiff »

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 720
  • Karma: +5/-0
    • Pi Rules.org
Re: Expired Token: "Please login before trying to sync contacts."
« Reply #6 on: February 27, 2014, 09:17:06 PM »
The problem in 0.4.0rc2-rc4 was that gContactSync was removing the expired authentication token before it had a new one to replace it with.  When you canceled it never added a new token which is why you couldn't find it in the list.  0.4.0rc2 added a new account wizard and it won't show up if there are any address books being synchronized, even if there aren't any valid authentication tokens for the synchronized address books. This will be fixed in 0.4.0rc5 (see issue #23).

To anyone affected by this bug, Phil's instructions are correct (thanks, by the way :)):

  • Go to  Menu -> gContactSync -> Edit Accounts
  • Click New Account and sign into your account[/b]
  • The account under Choose Account will have changed to None.  Click the drop-down and select the proper account
  • Click Save Changes, close the window, and sync

Note that you only need to do this once per Thunderbird installation, even if you have synchronized multiple address books with the account with the expired token.

Josh
gContactSync: info FAQs

pkiff

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
Re: Expired Token: "Please login before trying to sync contacts."
« Reply #7 on: February 28, 2014, 08:33:06 AM »
Great! Thanks for all your hard work on this add-on Josh. It is really a great add-on that works quite quietly and efficiently in the background after getting it configured.

Josh Geenen

  • gContactSync Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 720
  • Karma: +5/-0
    • Pi Rules.org
Re: Expired Token: "Please login before trying to sync contacts."
« Reply #8 on: March 11, 2014, 09:42:57 PM »
I finally released 0.4.0rc5 with the fix, sorry for the delay.  Unfortunately the workaround is still necessary; all 0.4.0rc5 does is prevent this from happening in the future.

 It should auto update within a day otherwise you can find it here soon if you scroll down to Development Channel: https://addons.mozilla.org/en-us/thunderbird/addon/gcontactsync/

Josh
gContactSync: info FAQs