Pi’s Blog

My blog about Thunderbird and GSoC 2008

gContactSync 0.2.0b1 released – Please upgrade

Anyone using version 0.2.0a1 or 0.2.0a2 of gContactSync in Thunderbird 2 has probably encountered a severe bug.  It starts when you attempt to search using the textbox in the top-right corner of the Address Book window.

It only affects Thunderbird 2 (not any recent version of Thunderbird 3 or Seamonkey), but 0.2.0b1 has more changes so I recommend it to all users.

Download link:

https://www.mozdev.org/projects/overview/gcontactsync/

Symptoms:

  • The search filter cannot be removed until Thunderbird is restarted
  • Contacts cannot be modified, added, or removed to or from that directory until Thunderbird is restarted
  • Unable to synchronize (some errors listed below).
  • The status bar says “Synchronizing…” and will not change
  • Mailing lists and contacts in that directory may not work properly, even after a restart

Some Errors:

***WARNING: Couldn’t evaluate command
Error – no URL was found for the HTTP Request

For technical details and more possible error messages please see the bug report.

Fix:

  1. Download the extension from the link and install in Thunderbird
  2. Restart Thunderbird
  3. Open the address book
  4. If synchronization completes successfully you are finished, otherwise continue.

It is possible, although unlikely that you may need to do more.  I had to do this with my test profile that I corrupted when attempting to find the cause of the bug but not the others.  If you must follow these steps please e-mail me so I know.

  1. Repeat this for all synchronized address books:
    1. Go to Gmail and backup your contacts (Export link in the top right of the contacts page)
    2. Select the synchronized address book in Thunderbird
    3. Go to Tools -> Export, and make sure you choose LDIF, then save it.  This will backup your contacts in case anything happens.
    4. Right-click the directory and click “Delete” and click OK at the prompt.  This will not delete your contacts from Google.
  2. Close the address book window and all Thunderbird windows
  3. Start Thunderbird again, but do not open the Address Book window yet
  4. Open the Add-ons manager (Tools -> Options -> Add-ons), select gContactSync and click Options or Preferences.
  5. Go to the Accounts tab
  6. You should see your e-mail addresses and blank spaces where the address books should be.  If not, backup and delete the named address books and go to step 6 (e-mail me for assistance or if you cannot remove them)
  7. Select the address and click ‘Change Address Book’, then type a name and click OK.  Repeat for all accounts.
  8. Close the Preferences dialog and add-ons manager
  9. Open the Address Book window and Sync if it doesn’t start automatically.  There should not be any errors, and you should see your contacts in each synchronized address book.

I can make more thorough instructions with screenshots if necessary tomorrow evening (US central time).  Please let me know if you would like this.

If you have any questions or this doesn’t work please don’t hesitate to e-mail me.

Download link:

https://www.mozdev.org/projects/overview/gcontactsync/

The Sync button is still not working for all users, and I finally managed to get it on one profile in Windows Vista.  When I upgraded to 0.2.0b1 it went back to the normal icon, but this release does not have a fix.  You may avoid using the Sync button and use the Sync option under the gContactSync menu in the Address Book toolbar instead.
If you want to remove the button:

  1. Go to gContactSync -> Preferences -> Main
  2. Uncheck “Enable the Sync toolbar button”
  3. Click OK or Close, then close and reopen the Address Book.
  4. If the button doesn’t disappear please let me know.

Bugfixes/enhancements since 0.1.x

Bugs in italics are new since 0.2.0a2

  • Bug 20546 – Search is broken in gContactSync 0.2
  • Bug 20644 – Localize all strings in options.xul
  • Bug 20656 – Error: gAddressBookBundle is undefined
  • Bug 20527 – Avoid HTTP Request errors when the Address Book window is closed
  • Bug 20509 – Add Seamonkey support
  • Bug 20508 – Consider adding overlay.css to customizeToolbar.xul
  • Bug 20487 – Add shortcut to preferences in the Address Book
  • Bug 20486 – Improve Address Preferences
  • Bug 20352 – Update gContactSync to use Contacts Data API 2
  • Bug 20148 – Default groups dont appear in Thunderbird
  • Bug 19786 – Support for Google’s ‘Most Contacted’ & ‘Suggested Contacts’

Known Bugs

  • The Sync toolbar button still doesn’t always work

I apologize for the inconvenience

Josh

Advertisements

March 9, 2009 Posted by | GSOC | 1 Comment

The best way to support an extension

I would like to find a better way to receive error reports for my extension to help both me and its users.  I have received error reports on 5 e-mail addresses (actually 3 and 2 forwarded accounts), comments on my blog, bug reports, and over IRC.  I read all e-mail as soon as I receive it, but so far I have been way  too slow to reply.

My only ideas so far are to make a form on my website and have a support link in the extension or to make a new XUL dialog in the extension.  A form on my website would be easiest for me but a XUL dialog could be localized with the rest of the extension.

Does anyone (especially experience extension developers) have any suggestions on how to support an extension?  I would like to put my extension on AMO but am worried that my full time internship and upcoming online classes may further delay my replies.

March 8, 2009 Posted by | GSOC | 8 Comments

Online Tool for viewing Google Contacts

About

Since I finally got around to learning PHP, I decided to create a quick and simple online tool for viewing your Google Contacts.  It naturally supports the extra attributes that gContactSync uses (except allow remote content and preferred mail format since those aren’t too important).

My intention was just to make an easy way to view your synchronized Thunderbird/Google contacts from anywhere with Internet access with the ability to show the custom attributes added by gContactSync.  If you don’t use gContactSync you are better off using Gmail’s better-looking interface. 😉

It is read-only (you cannot update, delete, or add contacts or groups) for now.

I will put the source in CVS soon after I clean it up.  It reuses a lot of the JavaScript from gContactSync 0.2.

Instructions

You can find it here.  Click on the Login button to be redirected to a page from Google.  If you are already signed into a Google Account then you can click on a button to grant access to your contacts for pirules.net (my website).

If you choose to grant access, a token is stored and matched with a cookie on your computer so you only have to sign in once.  This token can be used to access your contacts by retrieving, updating, adding, or deleting contacts and contact groups but your username and password cannot be obtained or modified using this token.  You can read more about this authentication method (called AuthSub) here.

You will be redirected back to pirules.net where the one-use token is exchanged with a multi-use token (still only for contacts).  Then, your groups and the first 25 contacts will be obtained.  Click on a group (left side) to show the contacts in it and click on a contact to view more details.  Everything is on the same page right now and contacts are obtained using AJAX so the entire page is not refreshed until you logout.

Only 25 contacts (for now) are shown at a time so there are links to the previous and next 25 contacts, if applicable, at the bottom of the list.

Click the Logout button when you are finished, which will de-activate your token unless you want it to remain valid for future use on the site. Logging out takes a few seconds before giving any feedback.

As a sidenote, if it doesn’t work try waiting for 10 or 15 minutes before letting me know because I am actively working on the page and sometimes make mistakes.  I just caught a nasty virus (which ruined my first day off), so I may be slow to reply.

Requirements

  • JavaScript must be enabled for pirules.net
  • Cookies enabled for pirules.net (only needed until the page or browser is closed)
  • Firefox 3.0.6 or higher (tested with a fairly recent build of Shiretoko 3.1b3pre and Firefox 3.0.6).  It does not work in Internet Explorer 6, 7, or 8 right now, and it might not ever since I spend a lot of time at work making a website IE-compatible and it is neither fun nor easy.  I’m guessing anyone that uses this already uses Thunderbird and Firefox, but if that isn’t the case let me know and I’ll see what I can do.
  • It works on Safari (tested with my new iPod touch)

February 16, 2009 Posted by | GSOC | , | 2 Comments

gContactSync 0.2.0a2

About

gContactSync 0.2 takes advantage of Google’s updated and improved API for obtaining and modifying contacts.  Duplicates are allowed which, combined with a rewrite of the synchronization code, provides a significantly faster synchronization process.  The longest delay now seems to be receiving the contacts from Google.  There may be some room for improvement there, but I do not want to make too many changes yet until I make sure that the ones I made did not introduce any bugs.

The new API exposes the system groups, which include  My Contacts, Family, Friends, and Coworkers.  All contacts from the account, including Suggested Contacts are in the synchronized address book.  There is a mailing list for each of the pre-defined system groups and each custom group.

You can download it here, but I rewrote the most important code and there may be bugs I haven’t found in it yet.  I would only advise those who have hundreds or thousands of contacts and receive the “Unresponsive Script” warning to try it.  Please read the upgrade instructions below.

NOTE: Google allows contacts without e-mail addresses, but Thunderbird will break if a contact without an e-mail address is manually added to a mailing list as explained in Bug 20153.  If you encounter that bug in 0.1.x please let me know because it is somewhat difficult to fix and all attempts to synchronize after it breaks will fail.  To avoid this, 0.2 adds an email address “nobody@nowhere.invalid” to any contact without one.  However, only unique e-mail addresses are allowed in mailing lists, so only one contact with an empty e-mail address is allowed per group/mailing list is allowed until o.2.0b1.  The other contacts will appear in the address book only.

Current Features

  • All the features of 0.1
  • Duplicates (multiple contacts with the same e-mail address) are allowed
  • Much faster synchronization
  • Only US English (en-US) until I finish adding features and strings
  • Customization of how addresses are synchronized
  • Default groups are enabled (Family, Friends, Coworkers) as mailing lists in Thunderbird

Requirements

  • Thunderbird 2.0 or Thunderbird 3.0 (a1pre through the trunk build b3pre) or Seamonkey 2.0 only (not 1.1.x)
  • A Google account or Google-hosted account
  • An Internet connection faster than dialup (DSL, cable, satellite, etc)

Planned Features

  • More locales
  • Maybe addons.mozilla.org?
  • Let me know what else you would like, but I can’t promise anything

Upgrade instructions to 0.2.0

  • In the address book, synchronize contacts one last time.
  • Rename the synchronized address book(s), this is just so you have a backup of your contacts.
  • In the main window, go to Tools -> Add-ons -> gContactSync -> Options/Preferences
  • In the Accounts tab, select one account at a time in remove them.
  • Install the new version and restart Thunderbird.  There is no need to remove the previous version first.
  • Open the Address Book window and fill in the information for your first account.

Bugfixes/enhancements from 0.1.x

  • Bug 20527 – Avoid HTTP Request errors when the Address Book window is closed
  • Bug 20509 – Add Seamonkey support
  • Bug 20508 – Consider adding overlay.css to customizeToolbar.xul
  • Bug 20487 – Add shortcut to preferences in the Address Book
  • Bug 20486 – Improve Address Preferences
  • Bug 20352 – Update gContactSync to use Contacts Data API 2
  • Bug 20148 – Default groups dont appear in Thunderbird
  • Bug 19786 – Support for Google’s ‘Most Contacted’ & ‘Suggested Contacts’

Known Bugs:

  • Bug 20153 – Partial fix only – Groups containing contacts without email addresses break in Thunderbird

February 8, 2009 Posted by | GSOC, thunderbird | , , , , | Leave a comment

Address Preferences in gContactSync 0.2

Google and Thunderbird store postal addresses differently, so converting one format to the other is difficult.  Google’s fields have multiple lines while Thunderbird has 6 separate fields.  gContactSync 0.1 would take Thunderbird’s 6 address fields (Address, Address2, City, State, Zip Code, and Country) and convert them into a new field that allows multiple lines like Google when a new contact from Thunderbird was first synchronized.  Contacts from Google would have their addresses directly synchronized with the new fields in Thunderbird.  However, it converted them in a hard-coded format (the standard US format) and removed the values in the old fields unless a hidden preference was changed.

0.2 will have a new preferences tab, probably similar to the screenshot below that allows for customization of how addresses are converted.

Preferences about postal addresses

Preferences about postal addresses

As you can see, you can customize how each address is created by placing the name of the property in brackets.  Anything not in brackets, such as spaces or punctuation,  is preserved.

You can find the properties used by Thunderbird here.

Here is the default for the home address, which is identical to the previous hard-coded method.

[HomeAddress]
[HomeAddress2]
[HomeCity], [HomeState]  [HomeZipCode]
[HomeCountry]

Lines that contain no letters are numbers are removed, so a contact with a HomeAddress and HomeCountry only will have two lines.

I’m going back home for the weekend so I won’t get much done with this over the weekend, but I would like to hear some opinions about how this looks and works.  If you don’t fully understand how it works from the description please let me know so I can make it more clear for you and everyone else.

I don’t have a version tested thoroughly enough and won’t for at least a week.  The newest source is in the CVS repository.

February 5, 2009 Posted by | GSOC | 5 Comments

gContactSync Versions 0.1.3 & 0.2.0a1

Version 0.1.3

Basic Features

  • Synchronizes contacts between Google Mail and Mozilla Thunderbird (2 or 3, including Thunderbird 3.0b1 and the trunk build [3.0b2pre] as it is today)
  • Can synchronize several accounts with their own address books
  • Adds attributes and “types” for phone numbers and screennames to Thunderbird
  • Customizable with a preferences dialog
  • en-US and es-ES locales

Bugfixes

  • 20188 Card Dialog overlay is broken on trunk builds
  • 20169 Extra attributes should be disabled for read-only cards
  • 20152 ‘TypeError: iter.first is not a function’ in Thunderbird 3
  • 20145 Error: document.getElementById(“syncExtended”) is null – options.js Line: 49
  • 20389 Values with only spaces should be treated as empty

Known Bugs

  • 20153 Groups containing contacts without email addresses break in Thunderbird.  Please be careful if you have any contacts without e-mail addresses.  Until 0.2.0, please do not put them in a group other than the pre-defined groups by Google (My Contacts, Family, Friends, & Coworkers)

Download

Version 0.2

Google has released an updated and improved API for obtaining and modifying contacts that will be used in version 0.2 of gContactSync.

You can download it here, but I rewrote the most important code and there may be bugs I haven’t found in it yet.  I would only advise those who have hundreds or thousands of contacts and receive the “Unresponsive Script” warning to try it.  It has a fix for Bug 20153 if you encounter that.

Current Features

  • All the features of 0.1
  • Duplicates (multiple contacts with the same e-mail address) are allowed
  • Much faster synchronization
  • Only US English (en-US) until I finish adding features and strings

Planned Features

  • More locales
  • Customization of how addresses are synchronized
  • Default groups are enabled (Family, Friends, Coworkers) as mailing lists in Thunderbird
  • My Contacts and suggested contacts are now separated to an extent.  All contacts will appear in the main address book, and each group (My Contacts, Family, Friends, Coworkers, and any custom group) has a corresponding mailing list in Thunderbird.
  • Let me know what else you would like, but I can’t promise anything
  • Maybe addons.mozilla.org?

Upgrade instructions to 0.2.0

  • In the address book, synchronize contacts one last time.
  • Rename the synchronized address book(s), this is just so you have a backup of your contacts.
  • In the main window, go to Tools -> Add-ons -> gContactSync -> Options/Preferences
  • In the Accounts tab, select one account at a time in remove them.
  • Install the new version and restart Thunderbird.  There is no need to remove the previous version first.
  • Open the Address Book window and fill in the information for your first account.

January 18, 2009 Posted by | GSOC, thunderbird | 2 Comments

Seven Things

I’ve been tagged by sid0, fellow GSoC 2008 student

I have Internet access once again (until my ISP grows tired of me downloading so much source code for Gentoo)!

The rules.

  1. Link back to your original tagger and list the rules in your post.
  2. Share seven facts about yourself.
  3. Tag some (none? 🙂 ) people by leaving names and links to their blogs.
  4. Let them know they’ve been tagged.

Seven Things

  1. Not too many people know this, but I play the bass guitar for fun as of last summer.  I plan on it just being a hobby, but I can play several songs well including Iron Man (once my fingers are warmed up for the solo)
  2. I am on an internship in Minnesota but do not have a car.  As a result I walk when it isn’t below 0 (all this last week) and take the bus a lot.
  3. I take school and grades very seriously and barely hung onto my 4.0 this semester after some setbacks
  4. I survived for more than a week without Internet access in my new apartment
  5. Despite doubts from relatives and friends, I can cook (I did work in a restaurant for years), do dishes (I was a dishwasher at first), clean (I am a neat freak), and survive on my own without spending all day programming
  6. I’ve known about 250 digits of pi since 8th grade.  It started in 6th grade when I saw about 25 digits of pi in my math book and realized that I had memorized them after just glancing at the page.  I haven’t decided if I should try to break 1000 or not.
  7. I’m a big open source fan, especially after Google Summer of Code 2008, although I had been using Ubuntu for years and just started with Gentoo (now my main OS on my desktop and notebook) before then.

I won’t tag anybody at the moment since I’ve been out of the game for a while and most people I would tag have already been tagged afaik.

January 17, 2009 Posted by | Uncategorized | 2 Comments

No Internet access for a while

I recently moved to Minnesota for an internship and I’ve been having some trouble getting an Internet connection even though I ordered it far in advance.  I’ve been waiting about two weeks now, so hopefully I’ll get it soon.a

I have basic access with my phone, but very limited bandwidth and I cannot type well with it, so if you e-mail me or the list, replying might take some time, especially when I can’t try to duplicate bugs.

I’m at the library now (free wi-fi, but only HTTP and HTTP over SSL seem to be allowed), but it is too far to walk so I have to take the bus on Saturday.

I’ve fixed what bugs I could, and started work on version 0.2.0, which works with the new and improved API from Google (see Bug 20352 for progress).  Since multiple contacts with the same e-mail address are allowed in the new API, there should be a performance boost.  I also hope to make more speed improvements.

The one thing holding me back from releasing 0.2.0 is Bug 20153 since mailing lists with contacts that may not have e-mail addresses are essential for taking advantage of the new API.

I have a version with some bug fixes (should work on trunk as it was when I had an internet connection) that will probably appear in 0.1.3 (unless I fix bug 20153 soon), but I don’t want to release it when I have no way of testing it or communicating.

January 10, 2009 Posted by | Uncategorized | 1 Comment

My Recent Lack of Activity

I apologize for my recent lack of activity both on gContactSync and Thunderbird.  I have not vanished from the Open Source scene.  The past month was tough (very busy and not fun) due to some strange medical issues that eventually forced me to go to the hospital.  During that time I had to devote my energy to catching/keeping up with homework, papers, and projects for college as well as my part-time job to help pay for college.

I’m doing well now, and will hopefully find some time to work on gContactSync and a few Thunderbird bugs (like an extended XBL datepicker for the Birthday and (not yet created) Anniversary fields) between homework, finding an apartment, and visiting relatives and friends over my one week off for Thanksgiving break (I also have several computers to fix, remove malware from, and setup for relatives).  I accepted a co-op position (not related to Mozilla) from January until August 2009, so I may have more spare time to work on my extension and Thunderbird.

My first goal is to catch up on bugs, e-mail, etc.  I apologize again for my recent unresponsiveness and inactivity.

Status update

  • Thunderbird
    • Bug 456024 Turn the adapted birthday datepicker into an inherited/extended xbl widget – I’ve had a basic patch for some time now that introduces an extended XBL datepicker widget that allows for blank values for the month and year (with M/D empty text) and removes the year portion of the datepicker
    • Bug 456220 Birthday and month shown in card view aren’t localized well – I just need to have some input on how to solve this.  Using the system settings is fine if the year is present, but if not there are two main choices that I see:

      • Just as the system describes (MM/DD/YYYY for me in US English on Linux, Day Name, Month Name D, YYYY in Windows in US English), but with the YYYY, separator, and  day name & separator removed (if present)
      • Look at how the system does it (find the month/day relative order and the separator between them) and print the month name and day in the detected order with the separator.  However, in Linux this would be inconsistent with the MM/DD/YYYY that I get.
    • Bug 456026 Add day/month order indications to the birthday field on address book contacts – The datepicker bug should fix this
    • Bug 458591 Consider improving the labels on the Birthday Field – I just need some recommendations on how to improve them.  There is an outdated image of the new datepicker here (the card dialog was since changed).  Localizer feedback would be awesome since I only know English and some Spanish.
    • Bug 456025 Implement an anniversary field in the address book – Waiting on the datepicker
  • gContactSync
    • Considering new name (gContacts as it originally was).  Any ideas are welcome
    • Working on replying to recent feedback over e-mail, the mailing list, and blog comments
    • Contrary to what some believe, the gContactSync “team” consists of one busy undergraduate Computer Engineering major only as a volunteer project (started as a paid Google Summer of Code 2008 project)
    • Anyone who wants to help program, fix bugs, or add features is welcome to do so (shoot me an e-mail).  The code has a lot of comments in it.
    • Checking out the poll results from my last post and deciding on what to do after fixing some bugs
    • Bugs
      • 20188 Card Dialog overlay is broken on trunk builds – Trying to figure out the best way to have two totally different overlays
      • 20169 Extra attributes should be disabled for read-only cards – The textboxes and types added are not disabled for read-only cards (like cards found through LDAP)
      • 20153 Groups containing contacts without email addresses break in Thunderbird – Have not figured out the best way to start this yet

November 21, 2008 Posted by | Uncategorized | , , , , | 1 Comment

gContactSync version 0.1.2 released

Version 0.1.2 of gContactSync is out and available for download here.  Right-click and hit Save Link As, then install it in Thunderbird.

This is a bugfix release only.

Bug Fixes:

  • These bugs should be fixed with this release.  If they still aren’t, please let me know.
  • Bug 20112 – Preferences dialog changes size
  • Bug 20142 – Accounts list isn’t visible
  • Bug 19959 – the sync toolbar item got a wrong icon and can’t be removed from toolbar (it might be incorrectly sized)

Basic Features

  • Synchronizes contacts between Google Mail and Mozilla Thunderbird (2 or 3)
  • Can synchronize several accounts with their own address books
  • Adds attributes and “types” for phone numbers and screennames to Thunderbird
  • Customizable with a preferences dialog
  • en-US and es-ES locales

What would you like to see most

School is making me extremely busy, but I’m most likely going on a co-op/internship next semester (I have to pick one this week probably) so I might have more time.  Which of the features would you like first?  I’d like to eventually add all of them.  Please only vote once, and comment below or via e-mail.  I might be slow to reply, but I will.

October 26, 2008 Posted by | GSOC | | 12 Comments