Last Comment Bug 1195974 - Lightning 4.0.2 switches caldav calendards off and read-only when offline
: Lightning 4.0.2 switches caldav calendards off and read-only when offline
Status: RESOLVED FIXED
: regression
Product: Calendar
Classification: Client Software
Component: Provider: CalDAV (show other bugs)
: Lightning 4.0.2
: x86_64 Windows 7
-- major with 14 votes (vote)
: 4.0.2.1
Assigned To: Philipp Kewisch [:Fallen]
:
:
Mentors:
: 1195800 1196389 1197081 1197710 1197727 1198635 1199321 1200713 1201818 1202129 1202135 1202185 1202345 1203933 1204444 1206489 1212410 (view as bug list)
Depends on:
Blocks: 1186547 ltn4021
  Show dependency treegraph
 
Reported: 2015-08-18 12:22 PDT by Lukas Ruf
Modified: 2016-11-27 20:13 PST (History)
36 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description User image Lukas Ruf 2015-08-18 12:22:15 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Build ID: 20150812163655

Steps to reproduce:

I have two local and a series (8) CalDAV-based calendards.  Until recently, the CalDAV calendars worked perfectly with and without offline support as expected.

Since the updating to 4.0.2, all CalDAV calendars are switched off and set to Read Only when there is no connection to the server.


Actual results:

All CalDAV calendars are switched off and set to Read Only when there is no network connection to the server


Expected results:

The settings of CalDAV calendars should not be changed, i.e. not switched off and not set to Read Only, when there is no connection to the server.
Comment 1 User image Iacopo Benesperi [:iacchi] 2015-08-18 20:53:45 PDT
I can confirm the bug. An user on our support forum is having the same problem with a calendar subscribed with caldav and hosted on his private NAS. When he disconnects from the NAS, the calendar disappears and it's reloaded as read only. I've forwarded him the link to this bug, he will contribute with more info (or I'll do it for him if he can't speak English)
Comment 2 User image sforzy 2015-08-19 04:57:00 PDT
As Iacopo has written, I've the same problem with lightning and caldav calendar on my private NAS.
The problem doesn't happen with portable TB (3.1.7) + ligthning 3.3.3 (installed as plugin and not integrated on TB as on the new version of TB).
below you will find the report of error console when trying to activate the calendar when i'm offline from the nas (sensible info are deleted! - report is in italian....i'm sorry):

Data e ora: 16/08/2015 20:43:47
Errore: [calCachedCalendar] replay action failed: null, uri=http://10.8.0.1/owncloud/remote.php/caldav/calendars/admin/condiviso, result=2147500037, op=[xpconnect wrapped calIOperation]
File sorgente: file:///C:/Users/XXX/AppData/Roaming/Thunderbird/Profiles/8dcox2e4.XXXX/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCachedCalendar.js
Riga: 322

Data e ora: 16/08/2015 20:43:47
Avviso: Si è verificato un errore durante la lettura dei dati dal calendario: condiviso. Codice di errore: READ_FAILED. Descrizione:
File sorgente: file:///C:/Users/XXX/AppData/Roaming/Thunderbird/Profiles/8dcox2e4.XXXX/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCalendarManager.js
Riga: 960

Data e ora: 16/08/2015 20:43:47
Avviso: Si è verificato un errore durante la lettura dei dati dal calendario: condiviso. Codice di errore: DAV_NOT_DAV. Descrizione: La risorsa a http://10.8.0.1/owncloud/remote.php/caldav/calendars/admin/condiviso non è una collezione DAV oppure non è disponibile
File sorgente: file:///C:/Users/XXX/AppData/Roaming/Thunderbird/Profiles/8dcox2e4.XXXX/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCalendarManager.js
Riga: 960
Comment 3 User image [:MakeMyDay] 2015-08-19 23:43:54 PDT
*** Bug 1196389 has been marked as a duplicate of this bug. ***
Comment 4 User image [:MakeMyDay] 2015-08-19 23:45:19 PDT
*** Bug 1195800 has been marked as a duplicate of this bug. ***
Comment 5 User image [:MakeMyDay] 2015-08-21 00:01:50 PDT
*** Bug 1197081 has been marked as a duplicate of this bug. ***
Comment 6 User image jannf 2015-08-21 03:00:45 PDT
Confirmed on Arch Linux using Thunderbird 38.2.0 and Lightning 4.0.2 and with Server Software CalDav as well as SOGo.
It's pretty annoying...
Comment 7 User image rebug 2015-08-22 06:38:09 PDT
Confirmed on DAViCal 1.1.3.1 running on Debian 8 Jessie (server side) + Thunderbird 38.2.0/Lightning 4.0.2 running on MS Windows 7 SP1 (client side)
Comment 8 User image [:MakeMyDay] 2015-08-22 07:38:22 PDT
Thanks, but currently no further confirmations are required for this bug. This appears for whatever caldav setup you're running.

This seems to be a regression of bug 1186547.
Comment 9 User image [:MakeMyDay] 2015-08-24 08:54:22 PDT
*** Bug 1197710 has been marked as a duplicate of this bug. ***
Comment 10 User image [:MakeMyDay] 2015-08-24 10:01:15 PDT
*** Bug 1197727 has been marked as a duplicate of this bug. ***
Comment 11 User image Stefan Sitter 2015-08-24 13:50:54 PDT
As far as I know in the past there was a real read-only state that was set by the user in the calendars properties dialog. 

And there was the concept of a calendar being temporarily read-only e.g. because calendar was not available. When calendar went back online or Thunderbird was restarted the temporarily read-only flag was reset. When using cache the underlying CalDAV calendars were internally read-only but the cache calendar on top was editable.

Maybe this feature was working as intended but Bug 1186547 incorrectly assumed it to be an error? Back-out Bug 1186547 and restore previous behavior?
Comment 12 User image Philipp Kewisch [:Fallen] 2015-08-25 00:57:33 PDT
I really need to take care of this one soon. I'm not sure a backout is the right thing to do because iirc then mReadOnly was set but not really used. It looks like I made a wrong assumption when writing the patch for bug 1186547, I just have to fix it.
Comment 13 User image Stefan Sitter 2015-08-26 05:20:57 PDT
*** Bug 1198635 has been marked as a duplicate of this bug. ***
Comment 14 User image heinz.repp 2015-08-26 06:48:14 PDT
A workaround for all who want to work with CalDAV calendars until this gets fixed:

1. under Add-Ons, select Lightning -> more, and there set automatic updates radio buttons to off.
2. back to Add-Ons, switch to "Search for Add-Ons", search/select Lightning, click on "learn more"
3. In the "About this Add-on" box search for and click on "complete version history"
4. locate version 4.0.1.2, and then move cursor right of it: a green "+ Add to Thunderbird" appears, click it
5. switch back to the current Add-Ons panel and be patient: there is no visual feedback, that the last step succeeded, but it did, believe me, as I was impatient and clicked multiple times, only to find multiple simultaneous downloads in the temp folder
6. confirm the confirmation dialog and wait till the installation finishes, then restart Thunderbird
7. reactivate all your CalDAV calendars and remove the Read-Only check mark

Btw, Philipp Kewisch: you set the needinfo flag: what info are you still asking for?
Comment 15 User image Philipp Kewisch [:Fallen] 2015-08-26 07:02:56 PDT
requesting needinfo from myself to remind me I really need to write the patch :-) This is major enough that I'll likely release 4.0.2.1.
Comment 16 User image Philipp Kewisch [:Fallen] 2015-08-26 08:02:02 PDT
Given there have been more than enough regressions in 4.0.x I now agree the best thing to do is back this out on 4.0.x and fix it for beta.

Backout on esr38: https://hg.mozilla.org/releases/comm-esr38/rev/839f27cac475

Keeping this bug open for the patch for beta I am working on.
Comment 17 User image Philipp Kewisch [:Fallen] 2015-08-27 04:27:53 PDT
Also backed out of beta so we can build:

https://hg.mozilla.org/releases/comm-beta/rev/561d02f77bb0
Comment 18 User image [:MakeMyDay] 2015-08-27 09:50:15 PDT
*** Bug 1199321 has been marked as a duplicate of this bug. ***
Comment 19 User image Stefan Sitter 2015-08-30 03:49:08 PDT
Could someone test if the behavior with Thunderbird 38 is now as expected using the latest automatic Lightning test build? You find them in the comm-esr38-<platform> sub-folder on <https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/tinderbox-builds/>.
Comment 20 User image Ragnar Schaa 2015-08-30 09:40:27 PDT
Seems to be working in my case (Linux Mint/TB 38.2)...
now I need to wait for it to find its way into the repo so I can have my german back, but I'll survive ;)

Thx!
Comment 21 User image Lukas Ruf 2015-08-31 04:16:36 PDT
Works in my case (Win7 Pro EN, TB 38.2.0, latest test build) as expected.

Test cases:
- set offline while TB/Lightning were running
- while offline, restart TB/L
- while offline, after restart, added new entry to CalDav-Calendar (davical)
- set to online
- pressed 'synchronize' manually

Results:
- As expected
- Offline added entry was sync'd with Caldav-Server, entry appeared on a different device (Android)

Thanks a lot!
Comment 22 User image Paolo 2015-08-31 05:13:38 PDT
Ubuntu 14.04 64bit
TB: 38.2.0
Lightning Latest tinderbox-builds

Now it works perfect!

Thanks!
Comment 23 User image nick.dannenberg+mozilla 2015-09-01 00:57:56 PDT
Tested successfully on Win7 Pro EN, Mac OS 10.10, Ubuntu 14.04 with TB 38.2 and latest tinderbox-builds.

Thanks!
Comment 24 User image [:MakeMyDay] 2015-09-02 00:25:18 PDT
*** Bug 1200713 has been marked as a duplicate of this bug. ***
Comment 25 User image sforzy 2015-09-02 10:26:22 PDT
it seems to work on win7 x64 + TB 38.2.0 
great work!!! :-)
Comment 26 User image Stefan Sitter 2015-09-02 11:48:59 PDT
Philipp, back-out for comm-central and comm-aurora is still missing. Once that is done and functionality is restored we should re-open or terminate Bug 1186547.
Comment 27 User image Stefan Sitter 2015-09-04 02:01:29 PDT
*** Bug 1201818 has been marked as a duplicate of this bug. ***
Comment 28 User image Philipp Kewisch [:Fallen] 2015-09-04 06:03:14 PDT
Ok, lets take it out until I come up with a completely new patch. I've filed bug 1201862 to take care.

https://hg.mozilla.org/comm-central/rev/82baea639081
https://hg.mozilla.org/releases/comm-aurora/rev/45663d9662d2
Comment 29 User image Stefan Sitter 2015-09-05 06:24:34 PDT
*** Bug 1202129 has been marked as a duplicate of this bug. ***
Comment 30 User image Stefan Sitter 2015-09-05 07:55:29 PDT
*** Bug 1202135 has been marked as a duplicate of this bug. ***
Comment 31 User image Stefan Sitter 2015-09-05 17:09:12 PDT
*** Bug 1202185 has been marked as a duplicate of this bug. ***
Comment 32 User image [:MakeMyDay] 2015-09-07 05:27:36 PDT
*** Bug 1202345 has been marked as a duplicate of this bug. ***
Comment 33 User image schorsch 2015-09-08 04:26:32 PDT
Any info on when this fix will become available to the public via official updates?

regards
Comment 34 User image Karl Rossing 2015-09-08 13:42:37 PDT
I'm wondering this too

(In reply to schorsch from comment #33)
> Any info on when this fix will become available to the public via official
> updates?
> 
> regards
Comment 35 User image Philipp Kewisch [:Fallen] 2015-09-08 15:37:44 PDT
Hope to do the release some time tomorrow. In the meanwhile, can you test these builds? https://mozilla.kewis.ch/releases/ltn4021/

(if you get a secure connection failure, try reloading. Looks like there are OCSP timeouts atm)
Comment 36 User image Martin Pecka 2015-09-08 17:07:31 PDT
I can't say if the build you sent helped with this issue, but after installing it I lost my setting of the "first day of the week" (before update was Monday, after update Sunday). I'm not sure if this is normal when installing from other sources.
Comment 37 User image Philipp Kewisch [:Fallen] 2015-09-08 18:36:34 PDT
This pref should not be changed during an update, but it doesn't sound related. Can you try to reproduce by 1) dowgrade to whatever you had installed before 2) set pref to monday 3) update again. Do you get any error console messages, either now or during the reproduce process?
Comment 38 User image Martin Pecka 2015-09-08 23:53:05 PDT
Ok, it was probably false alarm, since downgrading to 4.0.2 and upgrading back didn't change the pref.

And I see on error in the console after plainly starting TB (but it is both with 4.0.2 and 4.0.2.1):
Error: TypeError: this.tree.view is undefined
Source file: chrome://calendar/content/calendar-unifinder.js
Line: 624
Comment 39 User image heinz.repp 2015-09-09 02:52:33 PDT
Ok, same here (on win32). It works, the error console shows some errors due to CalDAV resource not available, but calendar is shown and writable. And, mysteriously, week start is reset to Sunday (was: Monday) when updating from 4.0.1.2 for me too, and I see this error on Lightning startup as well:

Error: TypeError: this.tree.view is undefined
Source file: chrome://calendar/content/calendar-unifinder.js
Line: 624

Not sure if this is related, there are some info messages in the beginning like:
firstrun 3
firstrun 4
before register
register uninstall start
register uninstall start 1
register uninstall start 2
register uninstall new 2
after register
firstrun 2
firstrun 2d

without source, it seems there is some "firstrun" initialization there, could this account for resetting of week start?
Comment 40 User image Philipp Kewisch [:Fallen] 2015-09-09 06:07:35 PDT
Those firstrun messages do not come from Lightning. Could it be the EWS Provider causing those messages?
Comment 41 User image Stefan Sitter 2015-09-09 10:16:23 PDT
(In reply to Martin Pecka from comment #36)

If you did not changed this setting in preference dialog you should get the default value that is actually localization specific. Maybe you were using e.g. Lightning with German localization that defines Monday as first day of week. And the test build uses English localization that defines Sunday as first day of week. Or maybe this mechanism is broken.
Comment 42 User image heinz.repp 2015-09-09 14:53:21 PDT
on Linux i686 upgrading 4.0.1.2 to 4.2.0.1 did NOT change week start, it stayed on Monday for my German localization. But maybe I fiddled with it in the past, so this setting probably was not default any more, so it did not change. In response to the test build using English localization, both (win32 and Linux i686) are completely localized (all German strings), and looking into the xpi I see the chrome folder has all localizations, so it really is multi-language (as a release candidate is expected to).
Comment 43 User image Stefan Sitter 2015-09-11 11:15:29 PDT
*** Bug 1203933 has been marked as a duplicate of this bug. ***
Comment 44 User image Philipp Kewisch [:Fallen] 2015-09-14 02:52:30 PDT
*** Bug 1204444 has been marked as a duplicate of this bug. ***
Comment 45 User image Charles 2015-09-16 10:07:16 PDT
Still fighting with this in our office... would be REALLY nice to get a formal release to fix it.
Comment 46 User image Karl Rossing 2015-09-16 11:21:28 PDT
I have been running the patch since it got released. I havn't had an issue yet. We are pushing it out manually to our users and so far, all seems good.

(In reply to Philipp Kewisch [:Fallen] from comment #35)
> Hope to do the release some time tomorrow. In the meanwhile, can you test
> these builds? https://mozilla.kewis.ch/releases/ltn4021/
> 
> (if you get a secure connection failure, try reloading. Looks like there are
> OCSP timeouts atm)
Comment 47 User image Lukas Ruf 2015-09-16 11:38:11 PDT
(In reply to Karl Rossing from comment #46)
> I have been running the patch since it got released. I havn't had an issue
> yet. We are pushing it out manually to our users and so far, all seems good.
> 
> (In reply to Philipp Kewisch [:Fallen] from comment #35)
> > Hope to do the release some time tomorrow. In the meanwhile, can you test
> > these builds? https://mozilla.kewis.ch/releases/ltn4021/
> > 
> > (if you get a secure connection failure, try reloading. Looks like there are
> > OCSP timeouts atm)

We do the same at our place: no issues so far.

Thanks!
Comment 48 User image [:MakeMyDay] 2015-09-16 23:48:09 PDT
Lightning 4.0.2.1 is about to be released. That contains another fix, so please use that instead of the preview build.
Comment 49 User image Charles 2015-09-17 05:56:12 PDT
So... where do we get it?
Comment 50 User image [:MakeMyDay] 2015-09-20 12:11:10 PDT
*** Bug 1206489 has been marked as a duplicate of this bug. ***
Comment 51 User image Stefan Sitter 2015-10-21 11:11:21 PDT
*** Bug 1212410 has been marked as a duplicate of this bug. ***
Comment 52 User image bart_louwers 2016-11-27 20:09:45 PST
The problem persists on 4.7.4.
Comment 53 User image bart_louwers 2016-11-27 20:13:09 PST
Nevermind, this is the issue I'm having: https://bugzilla.mozilla.org/show_bug.cgi?id=992340

Note You need to log in before you can comment on or make changes to this bug.