NS_ERROR_FAILURE: Couldn't decrypt string

User Help for Mozilla Thunderbird
Locked
crustyg
Posts: 6
Joined: November 16th, 2018, 2:33 am

NS_ERROR_FAILURE: Couldn't decrypt string

Post by crustyg »

Hi: New installation of TB 60.3/Lightning/gContactSync/Provider for Google Calendar. Windows 7 Ent, existing Firefox installation (55) - had to back rev due to breaking Adobe Flash integration (don't ask, just sympathise).
Mail installation really smooth, Lightning didn't appear (known issue, applied workaround), gContactSync seemed fine, but never had any calendar events coming in from Google Calendar.
All three Google resources managed by company, with Okta SSO across them.
Enabled basic logging, seeing NS_ERROR_FAILURE: Couldn't decrypt string and this seems to increment (another set of entries in console) after I press Synchronize in Calendar.
Found a Dev thread that seems to imply that there may be corruption in DB used to store credentials and passwords - certainly hope not as a total reinstallation would be very painful. And no, I don't create backups of my profile - more fool me.
Have removed all stored passwords for the Google resources - restarted TB, am asked for credentials for Gmail, but *not* for Calendar, as though Provider (and I *suspect) gContactSysnc aren't ever getting that far.
What next to try? Love the whole TB/Lightning/Provider setup (longtime user of MS Outlook) and actually do donate to the projects so not entirely selfish tightwad!
Help!!!
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: NS_ERROR_FAILURE: Couldn't decrypt string

Post by tanstaafl »

http://kb.mozillazine.org/Files_and_fol ... hunderbird

Try exiting Thunderbird and deleting cert9.db, key4.db, pkcs11.txt (new set of files used for security module info) and logins.json (actual passwords) in the profile. I'd also delete cert8.db, key3.db, and secmod.db (old set of security module files) to make certain you have a clean start. When you restart Thunderbird will create replacements for the files it still uses.
crustyg
Posts: 6
Joined: November 16th, 2018, 2:33 am

Re: NS_ERROR_FAILURE: Couldn't decrypt string

Post by crustyg »

Thanks for the quick response. I'm nervous: this will lose me *all* of my Firefox logins - removing logins.json?
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: NS_ERROR_FAILURE: Couldn't decrypt string

Post by tanstaafl »

Firefox logins are stored in the Firefox profile, not the Thunderbird profile. The two profiles should be completely separate, due to being stored in different directories. You will need to re-enter all of the email provider passwords when prompted (usually when checking for new mail) and check the checkbox in that window to have the password wizard save it.

You could try not deleting logsin.json, but if the problem still occurs you'll need to try again, this time also deleting that file. Don't delete just the logins.json file, consider it part of a set of related files.
crustyg
Posts: 6
Joined: November 16th, 2018, 2:33 am

Re: NS_ERROR_FAILURE: Couldn't decrypt string

Post by crustyg »

Ok, thanks for the additional information. Here goes....
crustyg
Posts: 6
Joined: November 16th, 2018, 2:33 am

Re: NS_ERROR_FAILURE: Couldn't decrypt string

Post by crustyg »

Hmm, deleted all of the files you suggested, whilst TB was closed down. Started TB, *only* password asked for was for Google Mail - nothing for Calendar or Contacts. I have Prefs | calendar.debug.log=true and calendar.debug.log.verbose=true. Error console shows successful for the calls to check if there are updates for Lightning, gContactSync and Provider for Google Calendar, but no calendar updates. I also still have prefs | network.cookie.same-site.enabled=false.
Wait one: now gSyncContacts *has* complained that it's missing a token, takes me to Google Auth page, that's ok, then another pop-up from gSync 'One of your mailing lists has broken...'.
Error console after pressing Calendar Sync button shows 'TypeError: (new Data(...)).toLocaleFormat is not a function. Everything is set to UK locale on my Win7 machine. Oh, and another error: TypeError: this.chromsUtilsWindow.openUILinkIn is not a function (I attempted to follow [Learn More] hyperlink in the Error console for the first TypeError.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: NS_ERROR_FAILURE: Couldn't decrypt string

Post by tanstaafl »

So you were able to log in fine (in some cases with password, in other cases with token) but are now running into a calendar sync problem?

Is that button a feature of the "provider for google calendar" add-on? I don't notice a grayed out calendar sync button in my copy of Lightning.
crustyg
Posts: 6
Joined: November 16th, 2018, 2:33 am

Re: NS_ERROR_FAILURE: Couldn't decrypt string

Post by crustyg »

What I see in the Error Console is POST to accounts.google.com/o/oauth2/token, POST to ocsp.pki.goog/GTSGIAG3 then a GET to google.com/m8/feeds/groups/default/full, then POST to ocsp.pki.goog/GTSGIAG3 followed by a GET to google.com/m8/feeds/contacts/default/full then POST to googleapis.com/oauth2/v3/token and then TypeError (new Date(...)).toLocaleFormat is not a function.
On the Calendar view is a big button top left Synchronise Event Task and greyed out Edit and Delete. I can't say I've noticed whether the Synchronise button only appeared after Provider was installed.
On my TB installation Calendar has never sync'd to Google Calendar.
crustyg
Posts: 6
Joined: November 16th, 2018, 2:33 am

Re: NS_ERROR_FAILURE: Couldn't decrypt string

Post by crustyg »

And a POST to googleapis.com/oauth2/v3/token then Uncaught exception: 2147746065. Belatedly I see that the Error Console shows the caller on the right (or the return code): against the TypeError is GAddressBook and against Uncaught Exception is autosync.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: NS_ERROR_FAILURE: Couldn't decrypt string

Post by tanstaafl »

Whats in the error console doesn't tell me anything useful. I suggest you try using CalDAV instead of the provider for google calendar add-on. See if https://thunderbirdtweaks.blogspot.com/ ... aldav.html or https://www.technorms.com/7955/sync-goo ... -lightning helps.
Locked