0

My Thunderbird's Lightning calendar file (local.sqlite) became corrupted and I can no longer view or add events. How to fix the file? Terminal states "database disk image is malformed" and "NS_ERROR_FAILURE: error executing async statement":

chromepy:~> thunderbird &
[1] 47217
chromepy:~> [calBackendLoader] Using Thunderbird's libical backend
Extension error: Error while loading 'jar:file:///usr/lib/thunderbird/extensions/messagingmenu@mozilla.com.xpi!/manifest.json' (NS_ERROR_FILE_NOT_FOUND) resource://gre/modules/Extension.jsm:570 :: readJSON/</<@resource://gre/modules/Extension.jsm:570:20
onStopRequest@resource://gre/modules/NetUtil.jsm:128:18

Extension error: Error while loading 'jar:file:///usr/lib/thunderbird/omni.ja!/chrome/messenger/search-extensions/twitter/manifest.json' (NS_ERROR_FILE_NOT_FOUND) resource://gre/modules/Extension.jsm:570 :: readJSON/</<@resource://gre/modules/Extension.jsm:570:20
onStopRequest@resource://gre/modules/NetUtil.jsm:128:18

console.log: "Legacy WebExtension <excasel@nadelundhirn.de> has been disabled."
console.debug: "Successfully loaded OpenPGP library librnp.so version 0.14+git20210121.7c8492b4.MZLA from /usr/lib/thunderbird/librnp.so"
console.debug: "Found 0 public keys and 0 secret keys (0 protected, 0 unprotected)"
console.debug: "Successfully loaded optional OpenPGP library libgpgme.so.11 from system's standard library locations"
console.debug: "gpgme version: 1.13.1-unknown"
console.debug: "Trying to load /usr/lib/thunderbird/libotr.so.5"
console.debug: "Trying to load libotr.so.5 from system's standard library locations"
console.debug: "Successfully loaded OTR library libotr.so.5 from system's standard library locations"
console.warn: Lightning: {"result":11,"message":"database disk image is malformed","ERROR":1,"INTERNAL":2,"PERM":3,"ABORT":4,"BUSY":5,"LOCKED":6,"NOMEM":7,"READONLY":8,"INTERRUPT":9,"IOERR":10,"CORRUPT":11,"FULL":13,"CANTOPEN":14,"EMPTY":16,"SCHEMA":17,"TOOBIG":18,"CONSTRAINT":19,"MISMATCH":20,"MISUSE":21,"NOLFS":22,"AUTH":23,"FORMAT":24,"RANGE":25,"NOTADB":26}
JavaScript error: resource:///modules/CalStorageCalendar.jsm, line 311: NS_ERROR_FAILURE: error executing async statement
JavaScript error: resource:///modules/CalStorageCalendar.jsm, line 311: NS_ERROR_FAILURE: error executing async statement
console.warn: Lightning: {"result":11,"message":"database disk image is malformed","ERROR":1,"INTERNAL":2,"PERM":3,"ABORT":4,"BUSY":5,"LOCKED":6,"NOMEM":7,"READONLY":8,"INTERRUPT":9,"IOERR":10,"CORRUPT":11,"FULL":13,"CANTOPEN":14,"EMPTY":16,"SCHEMA":17,"TOOBIG":18,"CONSTRAINT":19,"MISMATCH":20,"MISUSE":21,"NOLFS":22,"AUTH":23,"FORMAT":24,"RANGE":25,"NOTADB":26}
JavaScript error: resource:///modules/CalStorageCalendar.jsm, line 311: NS_ERROR_FAILURE: error executing async statement
JavaScript error: resource:///modules/CalStorageCalendar.jsm, line 311: NS_ERROR_FAILURE: error executing async statement
JavaScript error: resource:///modules/AddrBookCard.jsm, line 197: NS_ERROR_NOT_AVAILABLE: PreferDisplayName: undefined - not a boolean
JavaScript error: resource:///modules/CalStorageCalendar.jsm, line 311: NS_ERROR_FAILURE: error executing async statement
JavaScript error: resource:///modules/CalStorageCalendar.jsm, line 311: NS_ERROR_FAILURE: error executing async statement
JavaScript error: resource:///modules/CalStorageCalendar.jsm, line 311: NS_ERROR_FAILURE: error executing async statement
JavaScript error: resource:///modules/CalStorageCalendar.jsm, line 311: NS_ERROR_FAILURE: error executing async statement
JavaScript error: resource:///modules/CalStorageCalendar.jsm, line 311: NS_ERROR_FAILURE: error executing async statement
JavaScript error: resource:///modules/CalStorageCalendar.jsm, line 311: NS_ERROR_FAILURE: error executing async statement
JavaScript error: resource://gre/modules/ActivityManager.jsm, line 127: NS_ERROR_NOT_AVAILABLE:
user4157124
  • 2,809
  • 13
  • 27
  • 42
Kreuzfeld
  • 33
  • 1
  • 7
  • 1
    You can try [`.recover`](https://stackoverflow.com/questions/18259692/how-to-recover-a-corrupt-sqlite3-database/57872238#57872238) from the SQLite shell, though it's very possible it might too far gone to recover. – Anon Coward Dec 03 '21 at 00:39

2 Answers2

1

As I use only remote calendars, I deleted ~/.thunderbird/profilename/calendar-data/cache.sqlite

guest
  • 11
  • 1
1

I've had the same problem after a forced shutdown on Windows.

The .recover as suggested by Anon Coward didn't work because the output file was in a different format.

Analysis with PRAGMA integrity_check showed a problem with the indexes. I've used REINDEX as suggested by Fathah Rehman P and this fixed the issue for me.

Bl4ckbird
  • 85
  • 5