thsmi / sieve

Sieve Script Editor
GNU Affero General Public License v3.0
751 stars 57 forks source link

Not enough arguments [nsICertOverrideService.rememberValidityOverride] #634

Closed sdettmer closed 2 years ago

sdettmer commented 2 years ago

Prerequisites

What happened?

After I found Sieve not working with Thunderbird 91 (91.1.1 64 Bit, Windows 10) I tried the nightly build 15800 from "WebExtension / 20210927.15". I think I came a little further, because now I got a MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT (before, I did not get this). This is expected because I use the dovecot defaults (surely a self-signed cert, what else should it use). I'm afraid that now I hit a new problem.

In Detail:

  1. Goto "Sieve Filter"
  2. Account settings debugging [x] enabled all, accept
  3. Connect
  4. MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT --> click "Continue"
  5. Connect progressbar gets half blue but stucks.
  6. Open Error Console and see
    [Exception... "Not enough arguments [nsICertOverrideService.rememberValidityOverride]"  nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)"  location: "JS frame :: jar:file:///C:/Users/juergen/AppData/Roaming/Thunderbird/Profiles/5qq0yphf.default-release/extensions/sieve@mozdev.org.xpi!/api/sieve/SieveSocketApi.js :: addCertErrorOverride :: line 953"  data: no] SieveSocketApi.js:953:31
    uncaught exception: An unexpected error occurred

What did you expect to happen?

I'm very new, my first attempt to set it up. I found only little docs. I expect some rule editor view to show up.

Logs and Traces

Maybe I see only a follow up error. I notice that before I click "continue" in the MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT window I see disconnect messages:

...
console.trace() [21:08:37.358 account3] SieveClient: OnError (Connection lilli:4190)
...
console.trace() [21:08:37.359 account3] SieveAbstractSession OnError: Error while validating Certificate SieveLogger.js:136:15
    log moz-extension://50105813-0652-4336-8fdd-98c8918f0c89/libs/libManageSieve/SieveLogger.js:136
    logSession moz-extension://50105813-0652-4336-8fdd-98c8918f0c89/libs/libManageSieve/SieveLogger.js:117
    onError moz-extension://50105813-0652-4336-8fdd-98c8918f0c89/libs/libManageSieve/SieveAbstractSession.js:157
    connect moz-extension://50105813-0652-4336-8fdd-98c8918f0c89/libs/libManageSieve/SieveClient.js:95
...
console.trace() [21:08:37.360 account3] SieveAbstractSession: Disconnecting Session true
console.trace() [21:08:37.360 account3] SieveAbstractSession: Forcing Disconnect
...
console.trace() [21:08:37.360 account3] [SieveAbstractClient:cancel()] Draining message queue Error: Error while validating Certificate
...
console.trace() [21:08:37.361 account3] [SieveClient:destroy()] ... destroying socket...
...
console.trace() [2021-09-27T19:08:37.370Z] [4190] [SieveSocketApi:Disconnect()] ... already done
...

and after clicking "continue" I get:

console.trace() [21:08:37.375 account3] [SieveAbstract:disconnect()] ... disconnected
[Exception... "Not enough arguments [nsICertOverrideService.rememberValidityOverride]"  nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)"  location: "JS frame :: jar:file:///C:/Users/juergen/AppData/Roaming/Thunderbird/Profiles/5qq0yphf.default-release/extensions/sieve@mozdev.org.xpi!/api/sieve/SieveSocketApi.js :: addCertErrorOverride :: line 953"  data: no] SieveSocketApi.js:953:31
uncaught exception: An unexpected error occurred

Screenshots

If applicable, add screenshots to help explain your problem.

Which Version

Nightly build "WebExtension / 20210927.15" XPI for Thunderbird 91 (91.1.1 64 Bit, Windows 10)

Thunderbird XPI plugin nightly #20210927.15 Switch to webcrypto api (992d4b39).

Thunderbird Windows 10

Dovecot Debian 11 (Linux)

dovecot-sieve 1:2.3.13+dfsg1-2 amd64

thsmi commented 2 years ago

I checked the failing methods change log. And they introduced a breaking to their api by introducing an additional parameter

https://searchfox.org/mozilla-central/diff/7ea1bcd018a32a8e98216cf9f675c49d582950ca/security/manager/ssl/nsICertOverrideService.idl

The Thunderbird changes to fix the fall out from this breaking change was done in https://bugzilla.mozilla.org/show_bug.cgi?id=1597600

I just ported the fix.

Please give it a try and check if the nightly builds works for you: https://dev.azure.com/thsmi/1164eec3-b870-4973-8110-5e275d208aac/_apis/build/builds/15831/artifacts?artifactName=XPI%20-%20Thunderbird%20WebExtension&api-version=6.0&%24format=zip

thsmi commented 2 years ago

Did you have a chance to test the aforementioned nightly build? Does it solve you problem?