View Issue Details

IDProjectCategoryView StatusLast Update
0006012SOGo Connectorwith SOGopublic2024-08-29 20:30
Reportercz Assigned Tosebastien  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformWindowsOSWindows 10OS Version22H2
Summary0006012: sogo-connector not working with Thunderbird 128
Description

TB128 won't work with the latest sogo-connector [1],
errors in TB's console:

[Exception... "File error: Not found" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://sogo-connector/content/messenger/startup-overlay.js :: <TOP_LEVEL> :: line 22" data: no] startup-overlay.js:22:32
<anonymous> chrome://sogo-connector/content/messenger/startup-overlay.js:22
startListening jar:file:///C:/Users/testuser/AppData/Roaming/Thunderbird/Profiles/yxiynhiv.default-esr/extensions/sogo-connector@inverse.ca.xpi!/api/WindowListener/implementation.js:1603
result resource://gre/modules/ExtensionParent.sys.mjs:1221
withCallContextData resource://gre/modules/ExtensionParent.sys.mjs:664
result resource://gre/modules/ExtensionParent.sys.mjs:1220
withPendingBrowser resource://gre/modules/ExtensionParent.sys.mjs:674
result resource://gre/modules/ExtensionParent.sys.mjs:1219
callAndLog resource://gre/modules/ExtensionParent.sys.mjs:1170
recvAPICall resource://gre/modules/ExtensionParent.sys.mjs:1218
AsyncFunctionNext self-hosted:804

and

[Exception... "File error: Not found" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://sogo-connector/content/calendar/calendar-overlay.js :: <TOP_LEVEL> :: line 21" data: no] calendar-overlay.js:21:32
<anonymous> chrome://sogo-connector/content/calendar/calendar-overlay.js:21
_loadIntoWindow jar:file:///C:/Users/admin/AppData/Roaming/Thunderbird/Profiles/yxiynhiv.default-esr/extensions/sogo-connector@inverse.ca.xpi!/api/WindowListener/implementation.js:1978
AsyncFunctionNext self-hosted:804

It seems those errors mostly stem from the old variable declaration of "Services", citing compatibility issues with "Services.jsm" as described in Thunderbird's documentation [2].

e.g.

"var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");"

in chrome/content/sogo-connector/messenger/startup-overlay.js

which would be

"var Services = globalThis.Services || ChromeUtils.import("resource://gre/modules/Services.jsm").Services;"

in the newer version according to TB's documentation [2]

After manually patching all occurrences of these declarations, I still get other errors, because there's more to do than that:

converter.convertToInputStream is not a function sogoWebDAV.js:203:36
_sendHTTPRequest chrome://inverse-library/content/sogoWebDAV.js:203
load chrome://inverse-library/content/sogoWebDAV.js:375
propfind chrome://inverse-library/content/sogoWebDAV.js:442
SIML_synchronizeFromServer chrome://sogo-connector/content/messenger/mails-labels.js:123
checkFolders chrome://sogo-connector/content/messenger/folders-update.js:300
sogoConnectorStartupOverlayOnLoad chrome://sogo-connector/content/messenger/startup-overlay.js:378
startup chrome://sogo-connector/content/messenger/startup-overlay.js:690
startListening jar:file:///C:/Users/admin/AppData/Roaming/Thunderbird/Profiles/awqh4hau.hmuster/extensions/sogo-connector@inverse.ca.xpi!/api/WindowListener/implementation.js:1615
result resource://gre/modules/ExtensionParent.sys.mjs:1221
withCallContextData resource://gre/modules/ExtensionParent.sys.mjs:664
result resource://gre/modules/ExtensionParent.sys.mjs:1220
withPendingBrowser resource://gre/modules/ExtensionParent.sys.mjs:674
result resource://gre/modules/ExtensionParent.sys.mjs:1219
callAndLog resource://gre/modules/ExtensionParent.sys.mjs:1170
recvAPICall resource://gre/modules/ExtensionParent.sys.mjs:1218
AsyncFunctionNext self-hosted:804

Someone with better knowledge of the code base might be able to relatively easily patch these things, I reckon.

[1] https://github.com/Alinto/sogo-connector/tree/tb115
[2] https://developer.thunderbird.net/add-ons/updating/tb115/adapt-to-changes-in-thunderbird-103-115#services.jsm

Steps To Reproduce
  • Build sogo-connector with latest source (tb115 branch)
  • install extension in TB >=128
  • errors
TagsNo tags attached.

Activities

sebastien

sebastien

2024-08-27 12:54

administrator   ~0017830

Hi,

Can you have a try with branch https://github.com/Alinto/sogo-connector/tree/tb128 ?

Sebastien

cz

cz

2024-08-27 15:41

reporter   ~0017833

Hi,

thanks for the quick reply! I built it via the tb128 branch and it works on my Windows test machine with a clean profile. Calendars and address books are syncing and are working. But I still have some errors in the console...

first one:

NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFileInputStream.init]
ensureDataReady resource://gre/modules/ContextualIdentityService.sys.mjs:449
remove resource://gre/modules/ContextualIdentityService.sys.mjs:361
contextForUsername resource:///modules/CardDAVUtils.sys.mjs:70
_makeRequest resource:///modules/CardDAVDirectory.sys.mjs:217
fetchAllFromServer resource:///modules/CardDAVDirectory.sys.mjs:538
addDirectories chrome://sogo-connector/content/addressbook/folder-handler.js:102
ensureAutoComplete chrome://sogo-connector/content/addressbook/folder-handler.js:265
checkFolders chrome://sogo-connector/content/messenger/folders-update.js:291
checkAvailability chrome://sogo-connector/content/messenger/folders-update.js:86
onDAVQueryComplete chrome://sogo-connector/content/messenger/folders-update.js:64
_handleHTTPResponse chrome://inverse-library/content/sogoWebDAV.js:321
onStreamComplete chrome://inverse-library/content/sogoWebDAV.js:244
ContextualIdentityService.sys.mjs:215:15

and this one:

ReferenceError: MozXULElement is not definededitMenuOverlay.js:45:20
<anonymous> chrome://global/content/editMenuOverlay.js:45

After some quick testing, it seems everything is working though.

sebastien

sebastien

2024-08-27 17:16

administrator   ~0017835

I will have a look on those errors

Sebastien

sebastien

sebastien

2024-08-27 19:23

administrator   ~0017837

I cannot reproduce those errors.

For the first one I have added logs.
For the second one, I have removed the import.

Can you try with the attached patch ?

fix.patch (1,348 bytes)   
diff --git i/chrome/content/sogo-connector/addressbook/folder-handler.js w/chrome/content/sogo-connector/addressbook/folder-handler.js
index f1dcdfe..ebe6098 100644
--- i/chrome/content/sogo-connector/addressbook/folder-handler.js
+++ w/chrome/content/sogo-connector/addressbook/folder-handler.js
@@ -103,6 +103,8 @@ AddressbookHandler.prototype = {
         directory.setBoolValue("readOnly", readOnly);
       } catch(e) {
         dump(e);
+        console.error(newDirs);
+        console.error(directory);
       }
 
       //if (readOnly) { 
diff --git i/chrome/content/sogo-connector/calendar/calendar-overlay.js w/chrome/content/sogo-connector/calendar/calendar-overlay.js
index e99adb9..f99c599 100644
--- i/chrome/content/sogo-connector/calendar/calendar-overlay.js
+++ w/chrome/content/sogo-connector/calendar/calendar-overlay.js
@@ -57,8 +57,7 @@ registerJs = () => {
     "chrome://sogo-connector/content/general/sync.addressbook.groupdav.js",
     "chrome://sogo-connector/content/messenger/folders-update.js",
     "chrome://sogo-connector/content/global/sogo-config.js",
-    "chrome://global/content/globalOverlay.js",
-    "chrome://global/content/editMenuOverlay.js"], _this);
+    "chrome://global/content/globalOverlay.js"], _this);
 
   jsInclude(["chrome://sogo-connector/content/general/subscription-utils.js"], window);
 }
fix.patch (1,348 bytes)   
cz

cz

2024-08-29 07:52

reporter   ~0017843

Newest version with patch is working with TB128, but unsubscribing calendars does not work. Unfortunately, no errors in the console, it's just not happening...

sebastien

sebastien

2024-08-29 15:29

administrator   ~0017844

I have fixed the issue, can you have a try with uptodate tb128 branch ?

Sebastien

cz

cz

2024-08-29 15:37

reporter   ~0017845

Ah, yes, works perfectly now, subscribing and unsubscribing both work as intended, thank you very much for the quick fix!

Issue History

Date Modified Username Field Change
2024-08-27 09:17 cz New Issue
2024-08-27 12:53 sebastien Assigned To => sebastien
2024-08-27 12:53 sebastien Status new => assigned
2024-08-27 12:54 sebastien Note Added: 0017830
2024-08-27 12:54 sebastien Status assigned => feedback
2024-08-27 15:41 cz Note Added: 0017833
2024-08-27 15:41 cz Status feedback => assigned
2024-08-27 17:16 sebastien Note Added: 0017835
2024-08-27 19:23 sebastien Note Added: 0017837
2024-08-27 19:23 sebastien File Added: fix.patch
2024-08-27 19:26 sebastien Status assigned => feedback
2024-08-29 07:52 cz Note Added: 0017843
2024-08-29 07:52 cz Status feedback => assigned
2024-08-29 15:29 sebastien Note Added: 0017844
2024-08-29 15:29 sebastien Status assigned => feedback
2024-08-29 15:37 cz Note Added: 0017845
2024-08-29 15:37 cz Status feedback => assigned
2024-08-29 20:30 sebastien Status assigned => resolved
2024-08-29 20:30 sebastien Resolution open => fixed