Last Comment Bug 529853 - Creation of local calendar fails (DB Error no such column: recurrence_id_tz)
: Creation of local calendar fails (DB Error no such column: recurrence_id_tz)
Status: RESOLVED FIXED
[needed beta][no l10n impact]
: dataloss
Product: Calendar
Classification: Client Software
Component: Provider: Local Storage (show other bugs)
: unspecified
: All All
: -- major (vote)
: 1.0b1
Assigned To: Philipp Kewisch [:Fallen]
:
:
Mentors:
: 529626 530944 531014 531065 531080 531592 533195 534592 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-19 09:23 PST by Svetoslav Milenov
Modified: 2011-11-07 05:43 PST (History)
17 users (show)
philipp: blocking‑calendar1.0+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fix - v1 (2.08 KB, patch)
2009-11-24 04:32 PST, Philipp Kewisch [:Fallen]
mschroeder: review+
Details | Diff | Splinter Review
Extension to fix the Problem (6.46 KB, application/x-xpinstall)
2009-11-25 07:13 PST, Philipp Kewisch [:Fallen]
no flags Details
Extension to fix the Problem - v2 (6.34 KB, application/x-xpinstall)
2009-11-25 08:38 PST, Philipp Kewisch [:Fallen]
no flags Details
local.sqlite (1.15 KB, application/octet-stream)
2009-11-26 09:28 PST, Pete Riley
no flags Details
Extension to fix the Problem - v3 (8.88 KB, patch)
2009-11-30 12:05 PST, Philipp Kewisch [:Fallen]
no flags Details | Diff | Splinter Review
Extension to fix the Problem - v4 (8.95 KB, application/x-xpinstall)
2009-12-03 01:48 PST, Philipp Kewisch [:Fallen]
no flags Details
original database (28.00 KB, application/octet-stream)
2009-12-10 13:19 PST, Patrizio Bassi
no flags Details
patched with sqlite3 (28.00 KB, application/octet-stream)
2009-12-10 13:19 PST, Patrizio Bassi
no flags Details

Description Svetoslav Milenov 2009-11-19 09:23:47 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2b2) Gecko/20091109 SUSE/3.6b2-2.2 Firefox/3.6b2
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091117 SUSE/3.0.0-2.1 Lightning/1.0pre Thunderbird/3.0

Fresh install of lightning with google provider from nightly build.

When I started Thunderbird after the installation, I received the following error message:

Error code: 0x80004005

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageStatement.reset]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///home/sunny/.thunderbird/Profiles/8v53wff7.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calStorageUpgrade.jsm :: ensureUpdatedTimezones :: line 380"  data: no]

I closed the error message, and went to create a local calendar. When I started the wizard, I selected "On my computer", and when I clicked next, the same error message popped up.

I closed the wizard, and then I started the Error Console, and reproduced the creation of new calendar.

There, along with the error above, another error was logged:

Error: Error updating timezones: Error: mozIStorageStatement::step() returned an error
DB Error no such column: recurrence_id_tz


Reproducible: Always

Steps to Reproduce:
1. Open Events and Tasks/Calendar
2. Right-click under "Calendar", and select New Calendar
3. Select "On My Computer" and click Next

Actual Results:  
Error message pop-up is displayed:

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageStatement.reset]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///home/ICEBERG/sunny/.thunderbird/Profiles/8v53wff7.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calStorageUpgrade.jsm :: ensureUpdatedTimezones :: line 380"  data: no]

Expected Results:  
To create a new calendar.

If I go to preferences/Lightning, I can see the timezone set to my timezone.

Also, I was able to link to my gcal w/o any problems.
Comment 1 Magnus Melin 2009-11-23 01:47:15 PST
I got this on upgrade too (on windows).
Comment 2 Magnus Melin 2009-11-23 02:04:31 PST
I might add, even after i deleted the one local calendar i had (that caused the problems) and restarted, i still can't create a new local calendar. Just get the error dialog at setup time.
Comment 3 Stefan Sitter 2009-11-23 02:18:16 PST
What Thunderbird and Lightning version did you upgrade from? 
What Thunderbird and Lightning version did you upgrade to?
Comment 4 Magnus Melin 2009-11-23 02:59:11 PST
TB 3.0beta4 -> 3.0rc and whatever nightly release of lightning was available around those times.
Comment 5 Philipp Kewisch [:Fallen] 2009-11-23 11:01:43 PST
Looks like the timezones extension was missing, do you have an empty directory $APPDATA\Mozilla\Extensions\{718....\calendar-timezones@mozilla.org ?

If you don't have anything special in your local.sqlite (i.e local calendars), could you send me the local.sqlite and possibly also cache.sqlite? A schema dump of that sqlite file might be sufficient too.

You don't by chance have a backup of your profile from before the upgrade?

We should definitely look into this :-/
Comment 6 Svetoslav Milenov 2009-11-23 12:01:29 PST
I can confirm that this extension is missing on my installation.

Is there a way to get it from somewhere?
Comment 7 Philipp Kewisch [:Fallen] 2009-11-23 13:58:13 PST
The extension does not need to be installed, there are files in the lightning package that make up for the extension if its not there. The problem is, if there is an empty directory in one of the extension install paths, then it tries to take the files from there and fails. To make it short, it is only a problem if you have an empty directory at the path noted on http://weblogs.mozillazine.org/calendar/2009/11/10_beta_1_is_one_step_closer.html
Comment 8 Svetoslav Milenov 2009-11-23 17:16:05 PST
Hi Philipp,
my extensions directory is under:
~/.thinderbird/Profiles/xxxxx/ and there is no such am extension subdir at all.

I also checked:
/usr/share/mozilla/extensions and also did not find such a subdir.
Comment 9 Magnus Melin 2009-11-23 23:01:41 PST
Philipp, i sent you the sqlite files. 
I don't have the empty directory anywhere afaikt.
Comment 10 Philipp Kewisch [:Fallen] 2009-11-24 01:43:44 PST
Do you maybe remember more closely which version you were upgrading from/to ? I checked in a patch (bug 494140) around 2009-11-07 11:31:01 PST, do you know if the lightning version you had was before or after this? Also, was the lightning version you had before or after 2009-11-02 13:43:34 PST (bug 470430) ?

I looked at your local.sqlite and it seems to be missing those columns on the relations and attachments tables. This must mean the upgrader v17 failed to do its job.
Comment 11 Magnus Melin 2009-11-24 02:03:39 PST
I'm not 100%, but i think 2009-09-23 +- a day or so -> 2009-11-18 installed around those dates.
Comment 12 Magnus Melin 2009-11-24 02:05:27 PST
At least that's the xpis i had. Possibly i updated sometime in between too, but i can't recall :(
Comment 13 Philipp Kewisch [:Fallen] 2009-11-24 04:32:57 PST
Created attachment 414239 [details] [diff] [review]
Fix - v1

Finally found the reason for this. The fix is quite simple, but might cause pain for nightly users between 2009-11-07 an whenever this gets checked in.

Of course I could create yet another updater, that again checks if these fields are there, but I don't like the idea of creating an updater that fixes the updater that fixes the original updater.

I think we can get away with taking this patch, if we blog about how to fix the issue. Just to let you know up front, one would have to open the database with sqlite manager, change the db version back to v16, then let the upgraders run again normally. Its not too much to ask for a development version to my mind.
Comment 14 Martin Schröder [:mschroeder] 2009-11-24 04:52:47 PST
Comment on attachment 414239 [details] [diff] [review]
Fix - v1

r=mschroeder with misalignment in lines creating the statement fixed.
Comment 15 Philipp Kewisch [:Fallen] 2009-11-24 06:01:39 PST
Looks like I forgot to qref, that was fixed locally. I'll prepare a blog post and blog about this tomorrow when the nightlys are ready. Thanks for the quick review!

Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/24579aa4901a> and
comm-1.9.1 <http://hg.mozilla.org/releases/comm-1.9.1/rev/e38897976cd6>

-> FIXED
Comment 16 Philipp Kewisch [:Fallen] 2009-11-25 07:13:49 PST
Created attachment 414500 [details]
Extension to fix the Problem

This extension can be used to fix the issue, if your profile is already broken.
Comment 17 Philipp Kewisch [:Fallen] 2009-11-25 08:02:50 PST
*** Bug 531080 has been marked as a duplicate of this bug. ***
Comment 18 Philipp Kewisch [:Fallen] 2009-11-25 08:38:43 PST
Created attachment 414506 [details]
Extension to fix the Problem - v2

I missed checking the cache calendar. This version does a better job.
Comment 19 Patrick Fey 2009-11-25 09:14:57 PST
*** Bug 530944 has been marked as a duplicate of this bug. ***
Comment 20 Martin Schröder [:mschroeder] 2009-11-25 09:40:30 PST
*** Bug 531065 has been marked as a duplicate of this bug. ***
Comment 21 Kent James (:rkent) 2009-11-25 10:04:41 PST
I installed the extension v2, it reported that my profile was fine and needed no correction, but I still get the following in my DOS console at every startup. Maybe I have a different problem?

Error: mozStorage exception: createStatement failed, statement: 'INSERT INTO cal
_attendees   (cal_id, item_id, recurrence_id, recurrence_id_tz, attendee_id, com
mon_name, rsvp, role, status, type, is_organizer, properties) VALUES (0, :item_i
d, :recurrence_id, :recurrence_id_tz, :attendee_id, :common_name, :rsvp, :role,
:status, :type, :is_organizer, :properties)', error: 'table cal_attendees has no
 column named is_organizer' - [Exception... "Component returned failure code: 0x
80070057 (NS_ERROR_ILLEGAL_VALUE) [mozIStorageStatementWrapper.initialize]"  nsr
esult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: file:///C:/
Documents%20and%20Settings/kent/Application%20Data/Thunderbird/Profiles/1kqzgv3q
.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calStorag
eHelpers.jsm :: createStatement :: line 92"  data: no]
Error: mozStorage exception: createStatement failed, statement: 'INSERT INTO cal
_attendees   (cal_id, item_id, recurrence_id, recurrence_id_tz, attendee_id, com
mon_name, rsvp, role, status, type, is_organizer, properties) VALUES (2, :item_i
d, :recurrence_id, :recurrence_id_tz, :attendee_id, :common_name, :rsvp, :role,
:status, :type, :is_organizer, :properties)', error: 'table cal_attendees has no
 column named is_organizer' - [Exception... "Component returned failure code: 0x
80070057 (NS_ERROR_ILLEGAL_VALUE) [mozIStorageStatementWrapper.initialize]"  nsr
esult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: file:///C:/
Documents%20and%20Settings/kent/Application%20Data/Thunderbird/Profiles/1kqzgv3q
.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calStorag
eHelpers.jsm :: createStatement :: line 92"  data: no]
Comment 22 Philipp Kewisch [:Fallen] 2009-11-25 10:35:59 PST
Kent, if you could send me your local.sqlite I'd appreciate.
Comment 23 Stefan Sitter 2009-11-26 05:30:27 PST
*** Bug 531014 has been marked as a duplicate of this bug. ***
Comment 24 Pete Riley 2009-11-26 09:28:59 PST
Created attachment 414743 [details]
local.sqlite

After I installed v2 of this bug's extension and restarted TB, I got a dialog saying my profile was broken.  I clicked the Fix button and nothing happened so then I clicked the X to close it.  Now, every time I restart TB I get that dialog and it always says that my profile is broken.

I attached my local.sqlite db in a zip file cuz not sure if uploading it to bugzilla would change line terminators, etc.  My cache.sqlite is zero bytes.  I don't use storage calendars.  Using TB 3.0 rc1 and Lightning 2009-11-24.
Comment 25 Pete Riley 2009-11-26 09:42:43 PST
Error: ext is not defined
Source File: chrome://calendar-views/content/calendar-views.xml
Line: 107

Warning: Could not add recurrence_id, may already exist(cal_alarms: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.executeSimpleSQL]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://fix-storage-v17/content/fix-v17.js :: fix :: line 97"  data: no], db error:no such table: cal_alarms

Warning: Could not add recurrence_id_tz, may already exist(cal_alarms: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.executeSimpleSQL]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://fix-storage-v17/content/fix-v17.js :: fix :: line 106"  data: no], db error:no such table: cal_alarms

Warning: Could not add recurrence_id, may already exist(cal_attachments: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.executeSimpleSQL]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://fix-storage-v17/content/fix-v17.js :: fix :: line 97"  data: no], db error:duplicate column name: recurrence_id

Warning: Could not add recurrence_id_tz, may already exist(cal_attachments: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.executeSimpleSQL]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://fix-storage-v17/content/fix-v17.js :: fix :: line 106"  data: no], db error:duplicate column name: recurrence_id_tz

Warning: Could not add recurrence_id, may already exist(cal_relations: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.executeSimpleSQL]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://fix-storage-v17/content/fix-v17.js :: fix :: line 97"  data: no], db error:duplicate column name: recurrence_id

Warning: Could not add recurrence_id_tz, may already exist(cal_relations: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.executeSimpleSQL]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://fix-storage-v17/content/fix-v17.js :: fix :: line 106"  data: no], db error:duplicate column name: recurrence_id_tz

Can I just stop TB and delete local.sqlite and cache.sqlite to fix the problem?
Comment 26 Stefan Sitter 2009-11-26 13:07:30 PST
(In reply to comment #24)
> don't use storage calendars.  Using TB 3.0 rc1 and Lightning 2009-11-24.

This is the problem. You need at least the 2009-11-25 Lightning build that contains the fix from this bug. Using the 2009-11-24 build means that you will break your profile again and again.
Comment 27 Pete Riley 2009-11-26 16:11:49 PST
> You need at least the 2009-11-25 Lightning build that
> contains the fix from this bug.
I wasn't aware that this bug applied a patch to Lightning's source code.  I thought the bug just provided an extension to install.

In any case, I downloaded the nightly for 2009-11-26.  The first problem with this is that it breaks the compatibility with both the "Fix Storage Schema v17 0.2" extension and the "Year View 0.1" extension because it changes Lightning's version string from 1.0pre to 1.0b1pre.  I really think that one of the worse things about Mozilla software is these version strings that require end users to edit xpi files to make things work.  At the least I think these strings should only change like this:  0.8*, 0.9*, 1.0*.  Personally I use 3.* for Firefox and Thunderbird extensions and 1.* for Lightning to avoid the hassles.

However, I manually tried to fix that in the xpi files but could not.  Both the Fix Storage Schema and Year View extensions say "Requires additional items" in TB's Addons window and I don't know how to fix it.  So I don't know if my profile is still broken.
Comment 28 Kent James (:rkent) 2009-11-26 21:44:11 PST
'the Fix Storage Schema ... say(s) "Requires additional items" in
TB's Addons window and I don't know how to fix it'

I have the same experience.
Comment 29 Stefan Sitter 2009-11-26 21:55:33 PST
The version number has been decreased in preparation of the upcoming 1.0b1 release.

You can download the 1.0pre nightly build with the fix from Comment 15 at <http://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/2009/11/2009-11-25-04-comm-1.9.1/> or <http://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/2009/11/2009-11-25-05-comm-1.9.1/>.

If you want to use the repair extension linked here you'll need to replace "<em:minVersion>1.0pre" with "<em:minVersion>1.0b1pre" inside the install.rdf file.
Comment 30 Pete Riley 2009-11-27 04:58:57 PST
I changed the min version in the "requires" section of the XPIs to 1.0b1pre.  That "fixed" them.  However the Fix Storage Schema xpi continued to say that my profile was broken.  It doesn't work even with the nightly from 2009-11-26.

I stopped TB, deleted both sqlite files, and restarted TB.  They are now both zero bytes and the Fix Storage Schema says that my profile is not broken.  I'm assuming that everything is okay now.
Comment 31 Philipp Kewisch [:Fallen] 2009-11-27 13:24:47 PST
The b1pre thing will go away soon, we are in the process of releasing beta1 and release automation requires the version to be like that.

If you don't use local storage calendars at all, you should be fine with moving away or deleting both local.sqlite and calendar.sqlite. Afterwards the app will automatically rebuild the files.

I will be attaching a third version of the extension tomorrow that should fully repair all sorts of Problems with the storage db.
Comment 32 Andrew Jeffery 2009-11-29 01:01:35 PST
*** Bug 531592 has been marked as a duplicate of this bug. ***
Comment 33 mkm 2009-11-30 05:44:10 PST
I seem to have had the original problem and after a bit of fiddling with the versions I got the updater V2 to work with the 2009-11-28 nightly. I let it fix my profile and now I get a slightly different error message (line 420 instead of 380). This happens both when trying to access an existing local calendar (which I would like to salvage) and when creating a new one. Philipp, will V3 of the updater be able to fix this?

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageStatement.reset]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///C:/Dokumente%20und%20Einstellungen/mmaier/Anwendungsdaten/Thunderbird/Profiles/2ikoyllg.slt/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calStorageUpgrade.jsm :: ensureUpdatedTimezones :: line 420"  data: no]
Comment 34 mkm 2009-11-30 06:21:56 PST
I just noticed that something seems to have overwritten my local.sqlite five days ago, it now has 0 bytes. Deleting local.sqlite and cache.sqlite still does not allow me to create new local calendars, though.
Comment 35 Philipp Kewisch [:Fallen] 2009-11-30 12:05:30 PST
Created attachment 415205 [details] [diff] [review]
Extension to fix the Problem - v3

Interesting, Fabian also had an empty local.sqlite. I hope this didn't happen due to the extension. Since I don't drop any tables, I can't imagine why though.

This version should fix most all storage problems due to missing schema. Please read the big warning though, in case you get it.

mkm, what sort of errors are you getting after you deleted your cache/local.sqlite?
Comment 36 mkm 2009-12-01 00:31:19 PST
The error I get after having deleted cache/local.sqlite is exactly the same as before.

I would have liked to test the new updater, but it only shows an empty window. Moving away timezones.sqlite didn't help, either, it just left me without timezones and a different error message when creating new local calendars.

Philipp, I don't think the truncated local.sqlite is the fault of your extension. Mine had a modification date about five days prior to my trying to fix the problem.

Maybe it would be a good idea for lightning to make backups automatically before upgrading, similar to the .ics backups for remote calendars. I do know that its my own fault that I lost that calendar while trying a nightly, but something like this could also happen in a production version.
Comment 37 Martin Schröder [:mschroeder] 2009-12-01 08:28:50 PST
*** Bug 529626 has been marked as a duplicate of this bug. ***
Comment 38 Jie Zhang 2009-12-02 21:39:56 PST
I still see this bug with thunderbird3 rc2. I also see bug the following bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=489162

I don't know if it's caused by this one.

"Extension to fix the Problem - v3" does not help for me.
Comment 39 Philipp Kewisch [:Fallen] 2009-12-03 01:48:30 PST
Created attachment 415822 [details]
Extension to fix the Problem - v4

mkm, please try this one. This should fix the issue you have. If you get the big fat warning, please cancel the dialog and check your error console. If there is a warning that for ...cache.sqlite the versions don't match (but not for local.sqlite), then go ahead and restart and fix using the dialog anyway.
Comment 40 mkm 2009-12-03 03:57:08 PST
Philipp, thanks for your efforts, but still no luck.

I did get the warning (and a message that my profile was ok!), but since I have no local calendars any more, I just decided to delete local.sqlite/cache.sqlite (again). On the next startup I did not get the warning, but creating local calendars still does not work. I get the exact same error message as in comment #33.

On the next startup, I did get the warning again, with the following messages in the error log:

Error: Could not determine database version for: 'C:\Dokumente und Einstellungen\mmaier\Anwendungsdaten\Thunderbird\Profiles\2ikoyllg.slt\calendar-data\local.sqlite'. Unless it contains critical data, try moving this file out of the way

Error: [Exception... "Component returned failure code: 0x8052000e (NS_ERROR_FILE_IS_LOCKED) [mozIStorageStatementWrapper.execute]"  nsresult: "0x8052000e (NS_ERROR_FILE_IS_LOCKED)"  location: "JS frame :: file:///C:/Dokumente%20und%20Einstellungen/mmaier/Anwendungsdaten/Thunderbird/Profiles/2ikoyllg.slt/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///C:/Dokumente%20und%20Einstellungen/mmaier/Anwendungsdaten/Thunderbird/Profiles/2ikoyllg.slt/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calStorageCalendar.js :: cSC_deleteCalendar :: line 110"  data: no]
Source File: file:///C:/Dokumente%20und%20Einstellungen/mmaier/Anwendungsdaten/Thunderbird/Profiles/2ikoyllg.slt/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///C:/Dokumente%20und%20Einstellungen/mmaier/Anwendungsdaten/Thunderbird/Profiles/2ikoyllg.slt/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCachedCalendar.js
Line: 226

Error: DB error: database table is locked
exc: [Exception... "Component returned failure code: 0x8052000e (NS_ERROR_FILE_IS_LOCKED) [mozIStorageStatementWrapper.execute]"  nsresult: "0x8052000e (NS_ERROR_FILE_IS_LOCKED)"  location: "JS frame :: file:///C:/Dokumente%20und%20Einstellungen/mmaier/Anwendungsdaten/Thunderbird/Profiles/2ikoyllg.slt/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///C:/Dokumente%20und%20Einstellungen/mmaier/Anwendungsdaten/Thunderbird/Profiles/2ikoyllg.slt/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calStorageCalendar.js :: cSC_writeProperty :: line 1839"  data: no]

Error: [Exception... "Component returned failure code: 0x8052000e (NS_ERROR_FILE_IS_LOCKED) [mozIStorageStatementWrapper.execute]"  nsresult: "0x8052000e (NS_ERROR_FILE_IS_LOCKED)"  location: "JS frame :: file:///C:/Dokumente%20und%20Einstellungen/mmaier/Anwendungsdaten/Thunderbird/Profiles/2ikoyllg.slt/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///C:/Dokumente%20und%20Einstellungen/mmaier/Anwendungsdaten/Thunderbird/Profiles/2ikoyllg.slt/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calStorageCalendar.js :: cSC_writeProperty :: line 1839"  data: no]
Source File: file:///C:/Dokumente%20und%20Einstellungen/mmaier/Anwendungsdaten/Thunderbird/Profiles/2ikoyllg.slt/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///C:/Dokumente%20und%20Einstellungen/mmaier/Anwendungsdaten/Thunderbird/Profiles/2ikoyllg.slt/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calStorageCalendar.js
Line: 1839

This does not seem to be a general problem, I can create local calendars just fine in a new profile.
Comment 41 Jie Zhang 2009-12-03 05:12:56 PST
I just got a workaround. I removed abook-1.mab, abook.mab, calendar-data/, history.mab, pluginreg.dat, storage.sdb, urlclassifier2.sqlite, urlclassifier3.sqlite from my profile directory. And everything works for me now. ATTENTION: There might be data loss.
Comment 42 Philipp Kewisch [:Fallen] 2009-12-07 01:22:29 PST
*** Bug 533195 has been marked as a duplicate of this bug. ***
Comment 43 Patrizio Bassi 2009-12-10 12:00:24 PST
i migrated from thunderbird 2.0.23 with lighting 0.9 to thunderbird 3.0 lightining 1.0pre.

i keep on having:

Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageStatement.reset]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///usr/lib64/mozilla-thunderbird/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calStorageUpgrade.jsm :: ensureUpdatedTimezones :: line 380"  data: no]

even after the fix (on reboot the extension says my profile is not broken

i deleted all my calendars, but no way. can you help me?
Comment 44 Patrizio Bassi 2009-12-10 13:19:25 PST
Created attachment 416966 [details]
original database
Comment 45 Patrizio Bassi 2009-12-10 13:19:51 PST
Created attachment 416968 [details]
patched with sqlite3
Comment 46 Patrizio Bassi 2009-12-10 13:25:03 PST
hi, i attach my original database (should be empty).
i opened it and noticied it didn't contain all table patched by calStorageUpgrade.jsm

so i manually patched it, but now i'm having 
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.executeSimpleSQL]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///usr/lib64/mozilla-thunderbird/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///usr/lib64/mozilla-thunderbird/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calStorageCalendar.js :: anonymous :: line 219"  data: no], error: table cal_calendar_schema_version already exists
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.executeSimpleSQL]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///usr/lib64/mozilla-thunderbird/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/modules/calUtils.jsm -> file:///usr/lib64/mozilla-thunderbird/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calStorageCalendar.js :: anonymous :: line 219"  data: no]

then i removed the local.sqlite file and now it works.

can this help?
Comment 47 Martin Schröder [:mschroeder] 2009-12-14 05:09:49 PST
*** Bug 534592 has been marked as a duplicate of this bug. ***
Comment 48 Jonathan Ryshpan 2009-12-16 13:47:30 PST
Please check Fedora bug 
   https://bugzilla.redhat.com/show_bug.cgi?id=542736 
for a fix that has been used on Fedora Sunbird version 
   Mozilla Sunbird 1.0pre, Copyright (c) 1998 - 2009 mozilla.org
to make sure that the resolution there in Comment #5
   sqlite>ALTER TABLE cal_relations ADD recurrence_id INTEGER;
   ...
modifying the sqlite database doesn't conflict with repairs upstream.
Comment 49 Jon Roland 2009-12-17 09:19:39 PST
I am experiencing the same problem and don't want to have to go in an manually edit anything. Can someone report a fix that will work as a normal upgrade and that will restore all my lost calendar entries? I had many hundreds and don't want to have to recreate them all.
Comment 51 KitchM 2010-02-16 08:18:34 PST
What is this reference to "nightly" I keep reading.  This bug is in the current add-on for the current TB.  I'm not a tester, so I just use the released product.  If it doesn't start when TB does, I can't use it.  Has anyone got a fix for this yet, or is Lightning not yet working?

Thanks.
Comment 52 Philipp Kewisch [:Fallen] 2011-11-07 02:36:44 PST
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Comment 53 Philipp Kewisch [:Fallen] 2011-11-07 03:55:23 PST
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".

Note You need to log in before you can comment on or make changes to this bug.