Closed Bug 1713874 Opened 5 years ago Closed 5 years ago

Lightning can't identify calendar from Radicale server and the interface locks up after trying

Categories

(Calendar :: Provider: CalDAV, defect, P2)

Thunderbird 89
defect

Tracking

(thunderbird_esr78 unaffected, thunderbird90 fixed)

RESOLVED FIXED
91 Branch
Tracking Status
thunderbird_esr78 --- unaffected
thunderbird90 --- fixed

People

(Reporter: bugzilla, Assigned: darktrojan)

References

Details

Attachments

(3 files, 1 external file, 1 obsolete file)

Attached file Kalender.ics —

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:88.0) Gecko/20100101 Firefox/88.0

Steps to reproduce:

Using the latest beta, I tried to add a calendar from a Radicale server. Thunderbird / Lightning tries to connect without using a password a few times and then asks for a password. After entering the password, everything seems fine on the server, but in Thunderbird nothing happens. The logs show that the calendar couldn't be detected. Same thing happens when you use a newly created calendar (see attached file).

Actual results:

Thunderbird log:

20:28:21,068 Lightning: [CalICSProvider] Could not detect calendar using method attemptHead - HTTP response status -1 CalICSProvider.jsm:96
20:28:21,075 Lightning: [CalICSProvider] Could not detect calendar using method attemptGet - HTTP response status -1 CalICSProvider.jsm:96
20:28:21,080 Lightning: [CalICSProvider] Could not detect calendar using method attemptDAVLocation - HTTP response status -1 CalICSProvider.jsm:96
20:28:21,084 Lightning: [CalICSProvider] Could not detect calendar using method attemptPut - HTTP response status -1 CalICSProvider.jsm:96
20:28:21,113 Lightning: [CalDavProvider] Could not detect calendar using method wellKnown - HTTP response status -1 CalDavProvider.jsm:101
20:28:21,119 Lightning: [CalDavProvider] Could not detect calendar using method attemptRoot - HTTP response status -1 CalDavProvider.jsm:101
20:28:21,120 Lightning: Error during calendar detection: resource:///modules/calendar/utils/calProviderDetectionUtils.jsm:20: NoneFoundError
DetectionError@resource:///modules/calendar/utils/calProviderDetectionUtils.jsm:20:1
@resource:///modules/calendar/utils/calProviderDetectionUtils.jsm:31:7
detect@resource:///modules/calendar/utils/calProviderDetectionUtils.jsm:164:26
openCalendarWizard@resource:///modules/calendar/utils/calWindowUtils.jsm:25:12
doCommand@chrome://calendar/content/calendar-command-controller.js:385:20
goDoCommand@chrome://global/content/globalOverlay.js:101:18
oncommand@chrome://messenger/content/messenger.xhtml:1:12
calendar-creation.js:742
20:28:32,714 Lightning: [CalDavProvider] Could not detect calendar using method attemptLocation - resource:///modules/calendar/utils/calProviderDetectionUtils.jsm:20: AuthFailedError - DetectionError@resource:///modules/calendar/utils/calProviderDetectionUtils.jsm:20:1
@resource:///modules/calendar/utils/calProviderDetectionUtils.jsm:31:7
detectCollection@resource:///modules/CalDavProvider.jsm:284:13
openCalendarWizard@resource:///modules/calendar/utils/calWindowUtils.jsm:25:12
doCommand@chrome://calendar/content/calendar-command-controller.js:385:20
goDoCommand@chrome://global/content/globalOverlay.js:101:18
oncommand@chrome://messenger/content/messenger.xhtml:1:12
CalDavProvider.jsm:88
20:28:46,076 Lightning: [CalICSProvider] Could not detect calendar using method attemptDAVLocation - resource:///modules/calendar/utils/calProviderDetectionUtils.jsm:20: AuthFailedError - DetectionError@resource:///modules/calendar/utils/calProviderDetectionUtils.jsm:20:1
@resource:///modules/calendar/utils/calProviderDetectionUtils.jsm:31:7
attemptDAVLocation@resource:///modules/CalICSProvider.jsm:246:13
openCalendarWizard@resource:///modules/calendar/utils/calWindowUtils.jsm:25:12
doCommand@chrome://calendar/content/calendar-command-controller.js:385:20
goDoCommand@chrome://global/content/globalOverlay.js:101:18
oncommand@chrome://messenger/content/messenger.xhtml:1:12
CalICSProvider.jsm:83
20:28:46,079
Prompter: internal dialogs not available in this context. Falling back to window prompt. Prompter.jsm:1084

Server log (IP, username and calendar ID removed):
Jun 1 20:28:38 mail radicale[733]: [2021-06-01 20:28:38 +0200] [731/Thread-34] [INFO] Failed login attempt: '[username]'
Jun 1 20:28:39 mail radicale[733]: [2021-06-01 20:28:39 +0200] [731/Thread-34] [INFO] GET response status for '/[username]/[calendar]/' in 6.387 seconds: 401 Unauthorized
Jun 1 20:28:39 mail radicale[733]: [2021-06-01 20:28:39 +0200] [731/Thread-35] [INFO] PROPFIND request for '/[username]/[calendar]/' with depth '0' received from [ip] using 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Thunderbird/89.0'
Jun 1 20:28:39 mail radicale[733]: [2021-06-01 20:28:39 +0200] [731/Thread-35] [INFO] Access to '/[username]/[calendar]/' denied for anonymous user
Jun 1 20:28:39 mail radicale[733]: [2021-06-01 20:28:39 +0200] [731/Thread-35] [INFO] PROPFIND response status for '/[username]/[calendar]/' with depth '0' in 0.001 seconds: 401 Unauthorized
Jun 1 20:28:39 mail radicale[733]: [2021-06-01 20:28:39 +0200] [731/Thread-36] [INFO] PROPFIND request for '/[username]/[calendar]/' with depth '0' received from [ip] using 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Thunderbird/89.0'
Jun 1 20:28:44 mail radicale[733]: [2021-06-01 20:28:44 +0200] [731/Thread-36] [INFO] Failed login attempt: '[username]'
Jun 1 20:28:46 mail radicale[733]: [2021-06-01 20:28:46 +0200] [731/Thread-36] [INFO] PROPFIND response status for '/[username]/[calendar]/' with depth '0' in 6.447 seconds: 401 Unauthorized
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-37] [INFO] HEAD request for '/[username]/[calendar]/' received from [ip] using 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Thunderbird/89.0'
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-37] [INFO] HEAD response status for '/[username]/[calendar]/' in 0.001 seconds: 403 Forbidden
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-38] [INFO] PROPFIND request for '/[username]/[calendar]/' with depth '0' received from [ip] using 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Thunderbird/89.0'
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-38] [INFO] Access to '/[username]/[calendar]/' denied for anonymous user
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-38] [INFO] PROPFIND response status for '/[username]/[calendar]/' with depth '0' in 0.001 seconds: 401 Unauthorized
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-39] [INFO] GET request for '/[username]/[calendar]/' received from [ip] using 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Thunderbird/89.0'
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-39] [INFO] Access to '/[username]/[calendar]/' denied for anonymous user
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-39] [INFO] GET response status for '/[username]/[calendar]/' in 0.001 seconds: 401 Unauthorized
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-40] [INFO] PROPFIND request for '/[username]/[calendar]/' with depth '0' received from [ip] using 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Thunderbird/89.0'
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-40] [INFO] Successful login: '[username]'
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-40] [INFO] PROPFIND response status for '/[username]/[calendar]/' with depth '0' in 0.011 seconds: 207 Multi-Status
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-41] [INFO] GET request for '/[username]/[calendar]/' received from [ip] using 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Thunderbird/89.0'
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-41] [INFO] Successful login: '[username]'
Jun 1 20:28:53 mail radicale[733]: [2021-06-01 20:28:53 +0200] [731/Thread-41] [INFO] GET response status for '/[username]/[calendar]/' in 0.010 seconds: 200 OK

Expected results:

The calendar should be detected as it seems fine to me. In case there's something wrong with the calendar, Thunderbird should show an error message and the interface shouldn't lock up like this. I also think that only one login attempt without password should be made before asking for a password.

I've done some more testing, and this only happens when authentication is required and only when initially adding the calendar. If I turn off authentication on the server, add the calendar and then turn on authentication again, everything seems to work.

Hi, calendar detection errors can be hard to debug. I haven't yet seen anything that stands out in your logs.

You can get a more detailed log by setting the preference calendar.debug.log to true. (Click Config Editor in the bottom corner of the preferences tab.) In the developer toolbox (under Tools > Developer Tools) you can see the log and all of the network requests that are made.

It looks like you're entering the full URL of your calendar. What happens if you just enter the host name?

Attached file lightning-log.txt —

Yes, I tried to add the calendar using the full URL. However, the same thing happens when just adding the server address.

I've upgraded to Thunderbird 90.0b1, but there's no difference.

I enabled the debug modes in both Lightning and on Radicale and created a new account and calendar to use. The log files are attached.

What I noticed is that Lightning seems to request both calendars (even the first one), even though none of them show up in the calendar list. I've removed some contents from the log files, but the first calendar is marked by [first-calendar] instead of [calendar] as I used for the one that I currenlty added.

Attached file lightning-log.txt (obsolete) —
Attached file radicale-log.txt —
Attachment #9224913 - Attachment is obsolete: true

I should probably add that the username is the same as the user's e-mail address, so it contains both . and @. It's possible to connect to the calendar with the same address and login information in both Apple's built in calendar tool and with DAVx5 on Android.

It also seems to be a similar problem with adding a CardDev server to Thunderbird. The interface locks up and the log file looks like this, without the address book getting added:
11:50:28,753 CardDAV setup: Attempting to connect to https://[server]:5232/[username]/[addressbook]/ abCardDAVDialog.js:178
11:50:28,848
Prompter: internal dialogs not available in this context. Falling back to window prompt. Prompter.jsm:1084
11:50:40,175 CardDAV setup: https://[server]:5232/[username]/[addressbook]/ ... success abCardDAVDialog.js:181

Are these problems connected, or should I create a separate bug?

I wanted to see this for myself so I created a similar Radicale setup and had no problems. The last lines in your lightning-log.txt match what I see and indicate a calendar was found (for both ICS and CalDAV types) and at that point the dialog should move to the next page. I presume yours just sits there with the loading icon spinning around and around?

I think this might happen if Thunderbird is waiting for another provider to find calendars, but there are no other providers. Unless you have an add-on installed that's interfering? What happens if you try again in Safe Mode Troubleshoot Mode?

I guess there could also be some problem with saving passwords. It'd be weird, but I suggest cleaning out your saved passwords for this server.

As for CardDAV, I also had no problem there. The code is quite similar so I'd assume the problem is related.

The same thing happens in Troubleshooting mode. I also did a clean install of Thunderbird 90.0b1 on a computer running Windows and had the same problem there. There's no spinning icon on either system, but the interface lockup only hapens on macOS (both in 10.15 and 11.4). In the lockup, the dialog closes and I'm returned to the main window. I can't use keyboard shortcuts and the main window doesn't react to mouse clicks. I can use menu items and can open up the Developer tools in a separate window.

In your Radicale install, did you use authentication and SSL? Everything works fine for me when I turn off authentication on the server, and it keeps on working fine even after turning authentication back on. This just happens when I use authentication on the initial adding of the calendars.

Okay, I can see it on Mac. An OS difference is very odd given it's exactly the same code. I still have no idea what is going on but at least I can reproduce it. It doesn't appear limited to Radicale.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Ok, that's a bit strange. It doesn't work for me in Windows either, but the lockup only happens on macOS. Is the calendar added to the calendar list for you? It could be that the lockup is caused by some bug in the general error handling in macOS.

I think the error has something to do with saving the password. It could be trying to contact the OS key store. If I don't try to save the password it works.

I've now also seen the problem on Windows.

Severity: -- → S2
Priority: -- → P2

When it is a problem with the passwords on Mac and Windows but not Linux, then maybe signon.management.page.os-auth.enabled could interfere.

What's your value of pref signon.rememberSignons? I suspect it's false and shown in bold indicating it's not the default. Toggle it and everything works, but I'm not sure why it's set to false. I came across the same thing a few days ago which might be why my usual profile had no problems.

On Daily it's on on default. But Linux doesn't use it.

I can't get it work even if I uncheck the box to save the password, but if the problem is there, the code used to add the password later (if authentication first is disabled) is working.

For me, signon.management.page.os-auth.enabled is set to false and signon.rememberSignons is set to true (both are the default settings).

There's no reason for this dialog to be modal. On Mac, the password prompt causes it to disappear and never return, but this only happens if it is modal.

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Attachment #9225789 - Attachment description: Bug 1713874 - Stop opening calendar creation dialog modally. r=mkmelin → Bug 1713874 - Stop using modal dialogs for calendar/address book creation. r=mkmelin

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/9866251a51f3
Stop using modal dialogs for calendar/address book creation. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

This has been automatically set to FIXED because I landed something, but I'm not sure if all of the problems mentioned have gone away. On macOS the major problem I came across is fixed.

dittnamn, can you test this again in the next nightly build in about 12 hours time?

Target Milestone: --- → 91 Branch

Well, it works better but not fully. The interface doesn't lock up anymore. I get into the next page in the dialog and I can choose which calendars to add. In the properties dialog the username that I added earlier is not shown, but I can enter it manually.

When I add the first test calendar like this, it seems to work but when I try to add my real calendar (with a different username), the dialog says that I've added the wrong credentials. The server log shows that it tries to log in using the first username, even though the second username is written in the form field.

If I restart Thunderbird before adding my second calendar it works fine. Also, if I don't go into the properties to add the username, the calendar isn't enabled before going into the properties to add it later.

(In reply to dittnamn from comment #19)

Well, it works better but not fully. The interface doesn't lock up anymore. I get into the next page in the dialog and I can choose which calendars to add. In the properties dialog the username that I added earlier is not shown, but I can enter it manually.

I'm not entirely sure how or why but this isn't necessary in most circumstances. If it works without the username in the dialog, don't fill it in.

When I add the first test calendar like this, it seems to work but when I try to add my real calendar (with a different username), the dialog says that I've added the wrong credentials. The server log shows that it tries to log in using the first username, even though the second username is written in the form field.

This should be in a different bug.

Thanks for checking that what I changed fixed something.

Comment on attachment 9225789 [details]
Bug 1713874 - Stop using modal dialogs for calendar/address book creation. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #): Not sure, probably not something we did
User impact if declined: Unable to subscribe to calendars or address books on mac OS
Testing completed (on c-c, etc.): On c-c two weeks ago
Risk to taking this patch (and alternatives if risky): Nope

Attachment #9225789 - Flags: approval-comm-beta?

Comment on attachment 9225789 [details]
Bug 1713874 - Stop using modal dialogs for calendar/address book creation. r=mkmelin

[Triage Comment]
Approved for beta

Attachment #9225789 - Flags: approval-comm-beta? → approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: