jdgeenen / gcontactsync Goto Github PK
View Code? Open in Web Editor NEWSynchronizes contacts & groups between Thunderbird or SeaMonkey and Google Contacts. Imports Facebook friends and Twitter contacts
License: Other
Synchronizes contacts & groups between Thunderbird or SeaMonkey and Google Contacts. Imports Facebook friends and Twitter contacts
License: Other
Someone mentioned that the duplicate master password prompt was re-introduced in 0.4.0rc1. I'm going to use this as a chance to cleanup first login code.
The old accounts dialog is now the Edit Accounts dialog and won't be used to create new accounts, so it should show all settings at all times. Sync direction is more popular than I originally thought it would be.
Plaxo and MySpace completely dropped their APIs without any announcements that I can find.
They should be fully removed from Overlay.xul, the DTDs, and Import.js.
If possible update the website with a useful error.
People fields should link to other contacts in the contact details pane
Provide autocompletion or a menu of some kind to choose an existing contact in the edit contact dialog.
TB has two fields for street addresses. It looks like Google handles these addresses with a newline in the gd:street value. This should be fairly easy to implement.
<gd:structuredPostalAddress rel='http://schemas.google.com/g/2005#home' >
gd:formattedAddress1234 1st St NW
Apt 123
Rochester, MN 55901</gd:formattedAddress>
gd:street1234 1st St NW
Apt 123</gd:street>
gd:postcode55901</gd:postcode>
gd:cityRochester</gd:city>
gd:regionMN</gd:region>
</gd:structuredPostalAddress>
gContactSync always uploads contacts to Google if the TB contact was updated, even if there is no actual change to the contact (if an unsynchronized attribute changed, for example). This contributes to 503/over quota errors.
Several people are getting 503 errors about being over quota. I added some code to run a test that will determine the minimum delay between asynchronous requests. This should be enough of a delay between gContactSync's requests.
I've seen errors with a delay up to 100 ms while 120 ms appears to be enough of a delay.
I get several standard logs that don't have enough info, having the global and AB preferences would help significantly.
I don't know if this is intended, but it appears the latest changes I do in my address book are not always synced when I open these same contacts later. It's like if there was no sync when exiting Thunderbird.
Is it a bug or should it be seen as an enhancement?
Add and sync an anniversary field in the Private tab. Copy the existing TB Birthday field.
There's a bug in setValue under the EVENT type that causes gContactSync to not set new anniversaries in Google contacts. It shows up with this message in the log:
***WARNING: Error in GContact.setValue:
ReferenceError: parentElem is not defined
The fix for the null bug exposed an issue with how phonetic names are updated. If there is no phonetic name gContactSync was setting the first and last name yomi attributes to "null".
Anyone exposed has to follow my instructions here to clean this state up after updating to 1.0rc1: http://pirules.org/forum/index.php/topic,600.msg1765.html#new
The merge on first sync is very basic and can lead to lost values in TB for fields that other add-ons do not synchronize.
There's a potential list here: http://pirules.org/forum/index.php?topic=601.new#new but I suspect photos, birthdays, anniversaries, extended properties, phonetic names, etc. are also missing.
Need access keys for the new account setup wizard, the preferences, and a few things in the edit accounts dialog.
v1 of the Twitter API is no longer supported, so gContactSync needs to move to v1.1: https://dev.twitter.com/docs/api/1.1
Preferences aren't being logged if the user doesn't open the AB window.
Website labels aren't currently in the contact view pane so it's unclear which type of website it is. Types are only displayed in the edit contact dialog.
gContactSync currently updates contact photos if the contact has changed. It should be possible to use the etag to determine if the TB photo is outdated and the timestamp on the TB contact photo file to determine if the remote photo is out of date.
A few users have commented that gContactSync replaces HD photos with lower quality photos. This should help with that issue since the API must limit the size or quality of uploaded photos...
gContactSync is causing the following error in Postbox starting in v0.4.0rc6:
Error while modifying view pane: TypeError: aCard.getProperty is not a function
Multiple users have requested a way to "reset" gContactSync and start over. The advanced preferences tab would be a good place for this button.
This would have to:
The access keys for the preferences don't work as reported here: http://pirules.org/forum/index.php/topic,605.0.html
Instead of always asking for a username and password gContactSync should show a list of existing accounts or let the user add a new account.
In version 0.4 canceling the expired token prompt causes a "Please login before trying to sync contacts" message which 1) isn't very helpful and 2) isn't necessary.
I believe this can be fixed by only removing the auth token on successful authentication.
gContactSync currently runs in the main thread, making Thunderbird unresponsive until synchronization has finished.
https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Threads
ClientLogin is obsolete and will no longer work in 2015, so v0.5 will switch to OAuth for authentication. Google can provide a long-term token.
I've received comments that gContactSync is not very easy to setup so an initial setup wizard could make setup easier.
I'd like to finish this before releasing 0.4.
Trying to POST or PUT a contact with no fields set results in the following:
***ERROR: Error while adding contact
Error Message:
Entry does not have any fields set
To recreate:
The Google contacts API supports custom events: https://developers.google.com/google-apps/contacts/v3/reference#gcEvent
Add a checkbox to the options dialog for javascript.options.showInConsole so chrome errors are displayed in the error console
com.gContactSync.serialize has a bug where it will globally replace "null" with "".
This can cause errors like the following, or delete 4 letters unexpectedly:
Referenced group doesn't belong to the same user. Should be: 'nullXYZ'. Is: 'XYZ'
Please report this error to gcontactsync at pirules.org (in English, if possible)
gContactSync should probably open the Accounts dialog if the user tries to manually sync and no address books are synchronized (all disabled, the synchronized AB was deleted, etc.) but one or more authentication tokens exist (meaning they were shown the initial setup wizard).
Use an incremental/fast sync when possible to save time and memory. This will require some journaling since I don't know of a way to identify deleted contacts in TB. The AB listener would need to insert a row with the deleted ID (needs to support multiple sync sources, maybe a JSON object with key/value pairs?) and the date it was deleted in an sqlite db. Add cleanup of sqlite tables for deleted ABs to the preferences.
Use min-updated, showdeleted, and requirealldeleted. If it returns a 410 fall back to a slow sync. https://developers.google.com/google-apps/contacts/v3/reference#Parameters
To handle the case where gContactSync is disabled and a contact was deleted, a fast sync should verify the number of contacts match at the end. If not fall back to a slow sync.
It looks like the MySpace developer API is just gone. Requests return a service unavailable error and their documentation is gone.
https://www.askmyspace.com/t5/Reviewed-Feedback/Is-MySpace-Developer-dead/td-p/48101
Custom labels aren't working on scheduled syncs (setTimeout vs manually syncing has different behavior for "this"). This typically won't cause any issues since gContactSync doesn't allow setting a custom label from TB but produces a warning and is a potential bug (create a website with a custom label from Google, sync, remove website from TB, sync, add a website to the same field and keep the custom label, sync, label doesn't match).
**WARNING: Error in GContact.setValue:
TypeError: this.mCurrentElement is undefined
There was a bug with postal addresses where the type for blank properties after e-mail was stored as "home". This is causing issues with the work postal address components and wastes space in address books.
The fix will require a one-time update of all affected contacts.
From: http://pirules.org/forum/index.php/topic,589.0.html
Hey Josh,
I'm creating a new thread for this Feature Request to make it easier to track, and will incorporate everything from the thread it originated from.
Ok, so this is a feature request to make gContactSync capable of syncing to a standard file format - like JSON, a custom XML format, or even LDIF or VCF - and then extending that capability to be able to sync to non-google/privately hosted local and/or remote filesystems, ie, local/networked locations, and remote filesystems using something like WebDAV and FTP.
The first part would be selecting and defining the most robust, stable file format for storing the sync'd data itself.
Next, allow for the ability to sync to this format via any one of multiple 'account type' plugins.
For testing purposes, you could maybe start off with one: WebDAV - which I think is what you were basically describing in the original thread, using Apache+PHP+MySQL.
I think simply supporting the generic WebDAV protocol is the best, then the back end can be implemented using whatever tools the user wants - in your case, Apache+PHP+MySQL, but someone else for example could use lighttpd and PostgreSQL.
I'd also like to support for local network syncing via a local/network filesystem path (ie, on Windows, you'd need to support UNC style "\server\share" paths as well as plain drive letters (whether local or mapped drives (UNC paths mapped to drive letters - then however linux does this too), but if you don't want to do this part, as long as this could be implemented via a plugin, that would be awesome.
Then you (or anyone else with the coding skills) could start adding support for new account types - ie, FTP, Google Drive, etc, as time (and motivation) permitted...
As always, Josh, thanks for gContactSync, and thanks for considering new features like this one!
Charles
Suggestion from Bartek:
As a suggestion to further improve the addon: consider adding an option in the settings not to sync contacts without an email address. That would avoid the ugliness of dummy email addresses. I really don't need contacts without email addresses in Thunderbird, but I have lots of those because my phone syncs with Google.
The upgrade to 1.0 from <0.4.0b1 isn't working correctly.
gContactSync needs to reset the address book when the groups and contacts to synchronize changes. There's code that does this but it isn't working properly because the AB prefs are being saved with the new values before being checked.
For example, the following sequence will cause gCS to prompt the user to delete all contacts outside of "My Contacts"
Need to implement log rotation for debugging issues that happened before Thunderbird was restarted. At least 1 backup would help tremendously.
I received a log from someone who got the following error:
[Line 1, Column 2654, element gContact:website] Invalid value for attribute : 'rel'
The element that causes the error looks like this:
<gContact:website xmlns:gContact="http://schemas.google.com/contact/2008" href="http://www.google.com" rel="http://schemas.google.com/g/2005#home"/>
Valid rel values are listed here (shouldn't include the schemas URI):
https://developers.google.com/google-apps/contacts/v3/reference#gcWebsite
***WARNING: Error updating card after being removed: [xpconnect wrapped nsIAbCard] moz-abmdbdirectory://abook-1.mab/MailList2 1406944015.486 Error Message: Invalid directory supplied to the AddressBook constructor
Someone ran into an NS_ERROR_FAILURE when calling nsIAbDirectory.modifyCard. It happened while upgrading the Collected Addresses AB. The exact contact on which the exception occurs changes every time which implies TB and gContactSync were trying to edit that AB simultaneously.
A retry loop may help.
If a new TB contact has a photo when gCS is adding the contact the following warning will be logged:
John Doe
***WARNING: Unable to get last modified date from a contact:
TypeError: this.xml.getElementsByTagName(...)[0] is undefined
As far as I can tell this is harmless since 1 will be returned which is certainly older than any contact photo. I'd still like to fix it by returning 0 if there is no LMD.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.