Sync with Sunbird fails if more than 4 calendars areselected

For user who dont speak german please use this part of my forum
Antworten
ChillinR
Beiträge: 5
Registriert: Mi 16. Jan 2008, 12:46
Wohnort: Enschede, the Netherlands

Sync with Sunbird fails if more than 4 calendars areselected

Beitrag von ChillinR »

Hi! First of all, I'd like to say MPE is an excellent program! I only found out about it yesterday and I really like it, primarily because of the ability to sync my Phone's calendar with Sunbird, Google Calendar and Thunderbird/lightning (among other programs).

I do, however, have a problem. I searched the English and German boards (well, the German boards not very thouroughly though, since my German isn't all that good) but couldn't find an answer, so I decided to post my problem here.

I use Sunbird 0.7 as my calendar app, and have created and subscribed to a total of eight calendars. I tried synchronizing my phone (k800i) calendar with Sunbird, using MPE 1.6.5. It worked like a charm! In the syncing options, however, I soon discovered that not all 8 calendars were selected. After selecting all of them, syncing didn't work anymore (even after increasing the Interface-Timeout to 100s). An error message was displayed, stating "Loading Entries from Sunbird failed!".

I've been playing around with the settings a bit, and found that syncing worked properly when 1 to 4 calendars were selected. Add a fifth, and the error pops up again. Furthermore, when > 4 calendars are selected, MPE suddenly opens another instance of Sunbird every time I try to sync. Finally (again when selecting more than 4 calendars), when I return to the sync options, the 5th - 8th calendar are all deselected again.

I hope someone knows how to resolve this issue (and whether it's even possible). Thanks for your time and trouble!

- Phone model: k800i
- Type of connection: USB
- MPE-version: 1.6.5
- Windows version: Vista Home Premium x64 NL
NP
Co-Developer
Beiträge: 525
Registriert: Di 9. Jan 2007, 13:48
Wohnort: Bonn, Deutschland

Beitrag von NP »

Interesting. What kind of calendars are you using - lokal or network based? When the error occurs, please check the Sunbird Javascript Error Console for entries - another Sunbird window appearing is a sure sign for javascript problems.
NP
K800i
ChillinR
Beiträge: 5
Registriert: Mi 16. Jan 2008, 12:46
Wohnort: Enschede, the Netherlands

Beitrag von ChillinR »

The calendars are network based, they're all Gcal Calendars actually. (I know MPE can directly sync with Gcal, but I'd rather use Sunbird.. so yes, it is in fact possible to overcome my problem without calling for help :oops:).

I'm using the "Provider for Google Calendar" add-on for bidirectional acces to the Gcal Calendars.

Anyway, I checked the error console and it did indeed display several errors (2 to be precise):

Here's the first:
Error: [Exception... "'Calender http://www.google.com/calendar/feeds/** ... *******.ca not found!' when calling method: [mpeIMyPhoneExplorer::WriteItems]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: file:///C:/Users/Tjalling/AppData/Roaming/Mozilla/Sunbird/Profiles/kqom19v7.default/extensions/myphoneexplorer@fjsoft.at/components/mpecli.js :: handler_handle :: line 95" data: no]
Source File: file:///C:/Users/Tjalling/AppData/Roaming/Mozilla/Sunbird/Profiles/kqom19v7.default/extensions/myphoneexplorer@fjsoft.at/components/mpecli.js
Line: 95
(I've manually replaced the last part of the google URL by *'s)

And the second:
Error: Exception caught during -mpe export-items: [Exception... "'Calender http://www.google.com/calendar/feeds/** ... *******.ca not found!' when calling method: [mpeIMyPhoneExplorer::WriteItems]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: file:///C:/Users/Tjalling/AppData/Roaming/Mozilla/Sunbird/Profiles/kqom19v7.default/extensions/myphoneexplorer@fjsoft.at/components/mpecli.js :: handler_handle :: line 95" data: no]
Source File: file:///C:/Users/Tjalling/AppData/Roaming/Mozilla/Sunbird/Profiles/kqom19v7.default/extensions/myphoneexplorer@fjsoft.at/components/mpecli.js
Line: 122
Seems like useful info, since the errors occur in MPE javascript files... I hope it is. Thx again.

Edit: by the way, Sunbird does find and display these calendars and MPE also does if I select any four calendars... so the problem is not that two specific calendar URLs are wrong.
NP
Co-Developer
Beiträge: 525
Registriert: Di 9. Jan 2007, 13:48
Wohnort: Bonn, Deutschland

Beitrag von NP »

Well, the question is: Are the Calendar URLs mentioned in the error messages correct, or are they wrong? As Google URLs are quite long, I suspect a length problem somewhere that leads to crippled URLs when syncing. As you identified your Calendar URLs and ****-ed them, you should be able to check this.

You could also run the following command from the command line:

thunderbird -mpe list-cals=c:\cals.txt

This should list all your calendars in the file c:\cals.txt, including the URLs, so you can easily compare them to the error messages.
NP
K800i
ChillinR
Beiträge: 5
Registriert: Mi 16. Jan 2008, 12:46
Wohnort: Enschede, the Netherlands

Beitrag von ChillinR »

I ran the command you suggested (replacing thunderbird by sunbird) and all URLs are correct.

It occured to me, however, that the urls in the error console ended with ".ca", while the urls in the text file simply ended with /basic. When browsing to both types of url, firefox treats them as feeds.

Apparently, the /basic urls are the urls for each of the 8 calendars (as they should be). Browsing to the .ca-url actually resulted in a list (or index) of those 8 calendars. Each of the list items (calendars) was clickable, resulting in a list of all events in the respective calendar.

Anyway, apparently the MPE add-on is unable to find this list. As said, though, this problem doesn't occur when I select fewer calendars in MPE. I presume the add-on requires the list regardless of the number of calendars... so I don't really get what's wrong.

BTW, there is only one .ca-url, I simply didn't see that both javascript errors in my previous post were pointing to the same url :oops:.
NP
Co-Developer
Beiträge: 525
Registriert: Di 9. Jan 2007, 13:48
Wohnort: Bonn, Deutschland

Beitrag von NP »

What I do not understand is how the URLs can differ at all. I just checked with my own Google calendar: The URL ending with /basic is the correct one, and is the one that is used to identify the Google calendar in Sunbird.

There should be no way that MPE requests a calendar URL that is not the same as listed in the cals.txt file.

The normal way for MPE to communicate the calendars to be synced to Sunbird/Lightning is setting the registry key:

HKEY_CURRENT_USER\Software\MyPhoneExplorer\Mozilla\Calendar

to a concatenation of the calendar URLs, separating them with |

Please check what this registry key contains when you select more than 4 Google calendars.
NP
K800i
ChillinR
Beiträge: 5
Registriert: Mi 16. Jan 2008, 12:46
Wohnort: Enschede, the Netherlands

Beitrag von ChillinR »

Ah, so it shouldn't be looking for a .ca-url at all! Since the url points to the calendar index, I assumed MPE always used that index.

I tried a few different calendar selections (different number of calendars / different calendars selected) and copied and compared the resulting values of the registry key.

When 4 or less calendars are selected, all urls are correct /basic-urls.

However, as soon as I try to sync after selecting five or more calendars, the fifth url in the registry key is the .ca-url! Also, it doesn't matter if I select 5, 6, 7 or 8 calendars: the registry key allways ends with the fifth entry (i.e. the .ca-url).

Hmm... maybe manually entering the urls in the registry key will work. I'm going to try that now.

Edit/update: well, that didn't work :(. Although I can enter and save all urls in the key, MPE apparently overrides them (after pressing 'sync').

Furthermore, MPE never shows more than 4 ticked boxes in the calendar selection window ("Settings for Sunbird") if you re-open it after pressing OK.
FJ
Site Admin
Beiträge: 32117
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol

Beitrag von FJ »

I'll check out if there is a problem with saving the settings.
ChillinR
Beiträge: 5
Registriert: Mi 16. Jan 2008, 12:46
Wohnort: Enschede, the Netherlands

Beitrag von ChillinR »

All right, great! Thanks
FJ
Site Admin
Beiträge: 32117
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol

Beitrag von FJ »

Please try this update and report if it works now.
stivo

same problem: sync fail is more than 4 calendars

Beitrag von stivo »

I've been using MPE for about 2 months now and I love it! Unfortunately I was a bit unhappy with the GUI and UX of the program, so I now use Thunderbird+Lightning and sync using MPE.

All was well until I added my fifth calendar. I ran the sync, I didn't receive any errors, but the result: it erased all appointments except for those belonging to the new fifth calendar (plus it made some odd duplicate mistakes regarding those entries).

I deleted the fifth calendar in TB, sync'ed, and everything was restored to normal.

These calendars are not network, all local, nothing fancy or complex, simply more than 4 calendars and MPE seems to not manage. When having more than 4, upon opening the advanced option under settings/sync, it doesn't remember any check box choices I have made, it "reads" the calendar list every time I reopen the advanced dialogue.

Stranger error, great program, keep it up!

*all apps/addons are at latest stable releases; log file showed no errors.
Antworten