SaltyAimbOtter / Thunderbird-ProtonCalendar-Addon

A simple Thunderbird addon that adds a Proton Calendar button to the toolbar.
MIT License
1 stars 3 forks source link

Clicking links in calendar events causes the calendar tab to go blank #2

Open MoralCode opened 3 months ago

MoralCode commented 3 months ago

Reproduction steps

  1. use this extension
  2. create event in proton calendar with a link in either the location or description field (such as a zoom link)
  3. open the calendar event and click the link
  4. if prompted, click confirm on the dialog box asking if you are sure you want to open the link

Expected behavior: the addon will detect the link being opened and trigger the system link handler to open the link in the users default browser

Actual Behavior: The addon tab seems to go blank and freeze up

Proton Calendar Toolbar Button 1.1 Thunderbird 115.11.0 (64-bit)

MoralCode commented 2 weeks ago

dove pretty deep with this. seems like Proton is doing something... different.... with how they handle link clicks on that confirm button of their modal (seems like theres security reasons behind it). Theyre essentially constructing an <a> tag in JS and calling .click() on that, so its hard to intercept.

Also they seem to be using React or something, which apparrently doesnt have a devtools extension for thunderbird so thats fun.

MoralCode commented 2 weeks ago

it appears as though the Proton's webapp is going all blank screen because it tries to access Services.dirsvc.get("ProfD", Ci.nsIFile); (seems to be something for getting the profile folder, specifially the line of code affected is this._storeFile = Services.dirsvc.get("ProfD", Ci.nsIFile);, which is inside a double-nested try catch) but for some reason it fails with the error NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIProcess.init] at the time proton goes to use it (but seemingly running that in the console at other times seems to return a result just fine)

MoralCode commented 2 weeks ago

changing the confirm button on the link confirmation dialog box from type="submit" to type="button" seems to make it do nothing. so maybe thats a clue about how this is all working (it seems to be using <dialog> somehow)