Closed Bug 2082770 Opened 29 days ago Closed 28 days ago

Account Hub is not able to detect calendars in the latest Daily and Beta build (159.b and 160.0a)

Categories

(Calendar :: Provider: CalDAV, defect)

Thunderbird 159
Desktop
All
defect

Tracking

(thunderbird_esr153 unaffected, thunderbird158 unaffected, thunderbird159 fixed, thunderbird160 fixed)

RESOLVED FIXED
160 Branch
Tracking Status
thunderbird_esr153 --- unaffected
thunderbird158 --- unaffected
thunderbird159 --- fixed
thunderbird160 --- fixed

People

(Reporter: vlucaci, Assigned: mkmelin)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 1 external file)

Affected versions

  • 160.0a1(20261015104419)
  • 159.0b2(20261013231314)

Non-affected versions

  • 158.0(20261008005236)

Affected platforms

  • Ubuntu 26
  • macOS 27
  • Win 11

Steps to reproduce

  1. Launch TB with a fresh profile.
  2. Login with valid credentials.

Expected result

  • No errors are displayed in the error console.
  • The Accounts Hub wizard discovers address books and calendars.

Actual result

  • The accounts hub process freezes stuck for about 5 minutes with the loading animation, after that it returns that no calendars have been detected.
[CalICSProvider] Could not detect calendar using method attemptGet NS_ERROR_DOM_NETWORK_ERR: Connection error
    onStreamComplete resource:///modules/caldav/CalDavRequest.sys.mjs:483
CalICSProvider.sys.mjs:103:20
The resource at “https://www.thunderbird.net/en-US/” was blocked by OpaqueResponseBlocking. Reason: “after sniff: status code is not in allowed range”.
calendar: [CalICSProvider] Could not detect calendar using method attemptDAVLocation NS_ERROR_DOM_NETWORK_ERR: Connection error
    onStreamComplete resource:///modules/caldav/CalDavRequest.sys.mjs:483
CalICSProvider.sys.mjs:103:20
The resource at “https://www.thunderbird.net/en-US/” was blocked by OpaqueResponseBlocking. Reason: “after sniff: status code is not in allowed range”.
calendar: [CalICSProvider] Could not detect calendar using method attemptPut NS_ERROR_DOM_NETWORK_ERR: Connection error
    onStreamComplete resource:///modules/caldav/CalDavRequest.sys.mjs:483
CalICSProvider.sys.mjs:103:20

Notes

2026-10-16T09:18:29.670000: ERROR : Unable to start the application (error: Failed to start the process: [Errno 86] Bad CPU type in executable: '/private/var/folders/l5/fxnd__qx39v3_t3jq03165_w0000gp/T/tmp84tnhp1f/Thunderbird Daily.app/Contents/MacOS/thunderbird')
2026-10-16T09:18:30.854000: DEBUG : Starting merge handling...
2026-10-16T09:18:30.854000: DEBUG : Using url: https://hg.mozilla.org/comm-central/json-pushes?changeset=2a6c5ae4a47607be8672826f5df685375910daaa&…
2026-10-16T09:18:30.854000: DEBUG : redo: attempt 1/3
2026-10-16T09:18:30.855000: DEBUG : redo: retry: calling _default_get with args: ('https://hg.mozilla.org/comm-central/json-pushes?changeset=2a6c5ae4a47607be8672826f5df685375910daaa&…, kwargs: {}, attempt #1
2026-10-16T09:18:30.856000: DEBUG : urllib3.connectionpool: Resetting dropped connection: hg.mozilla.org
2026-10-16T09:18:32.087000: DEBUG : urllib3.connectionpool: https://hg.mozilla.org:443 "GET /comm-central/json-pushes?changeset=2a6c5ae4a47607be8672826f5df685375910daaa&full=1 HTTP/1.1" 302 0
2026-10-16T09:18:32.904000: DEBUG : urllib3.connectionpool: https://hg-edge.mozilla.org:443 "GET /comm-central/json-pushes?changeset=2a6c5ae4a47607be8672826f5df685375910daaa&full=1 HTTP/1.1" 200 None
2026-10-16T09:18:32.910000: DEBUG : Found commit message:
Bug 2075724 - Follow-up: Add missing headers for ccov builds r=mkmelin

Differential Revision: https://phabricator.services.mozilla.com/D329363


2026-10-16T09:18:32.911000: DEBUG : Did not find a branch, checking all integration branches
2026-10-16T09:18:32.911000: INFO : The bisection is done.
2026-10-16T09:18:32.913000: INFO : Stopped
Assignee: nobody → mkmelin+mozilla
Summary: Accounts Hub is not able to detect calendars in the latest Daily and Beta build (159.b and 160.0a) → Account Hub is not able to detect calendars in the latest Daily and Beta build (159.b and 160.0a)
No longer regressed by: 2020691

Bug 2052324 moved the check for a granted CalDAV scope from the Account Hub
into CalDavProvider.detectCalendars, so that it would no longer stop Graph
calendar detection. It passed the detection location to
OAuth2Module.initFromHostname, but the location is a URL built from the email
domain, which does not map to an OAuth2 provider, so CalDAV detection returned
no calendars for every OAuth2 account.

Do the check in the Account Hub again, using the incoming server's hostname,
and skip only the CalDAV provider through a pre-detect filter when the scope
wasn't granted. Graph detection is unaffected, as only CalDAV is skipped.
lso always skip the ICS provider there: it only probes the URL it is
given, and the domain's website is never an ICS calendar.

The authMethod argument bug 2052324 added to detectCalendars is no longer
used, so remove it again.

Also pass the username to locationToUri in the CalDAV and ICS providers, so
an empty location falls back to the domain of the username as intended.

Status: NEW → ASSIGNED

Great work finding the regression.

Setting tracking flags with version number Is great. But please avoid using "Trunk" as a version# for regressions. Set version to the earliest known regressed version#. Thanks.

Version: Trunk → Thunderbird 159
Target Milestone: --- → 160 Branch

Pushed by ebaginski@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/ae7aec68c1a9
Fix CalDAV calendar discovery for OAuth2 accounts in the Account Hub. r=edicharry

Status: ASSIGNED → RESOLVED
Closed: 28 days ago
Resolution: --- → FIXED

Comment on attachment 9661907 [details]
Bug 2082770 - Fix CalDAV calendar discovery for OAuth2 accounts in the Account Hub. r=edicharry,freaktechnik

Uplift Approval Request

  • Please state case for uplift consideration and ensure bug severity is set: Regression
  • User impact if declined: CalDAV calendars not discovered
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Daily?: Yes
  • Has the fix been verified in Beta?: No
  • Needs manual test from QA?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): Complex system. But status que is totally broken so definitely needs uplift.
  • Does the fix cause any migrations to be skipped?: No
  • String changes made/needed: none
Attachment #9661907 - Flags: approval-comm-beta?

Comment on attachment 9661907 [details]
Bug 2082770 - Fix CalDAV calendar discovery for OAuth2 accounts in the Account Hub. r=edicharry,freaktechnik

[Triage Comment]
Approved for beta

Attachment #9661907 - 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

Created:
Updated:
Size: