Closed Bug 450256 Opened 16 years ago Closed 16 years ago

Upgrade nightly build 0.9pre, restart results in error (Data incompatible)

Categories

(Calendar :: Provider: Local Storage, defect)

defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: peter, Unassigned)

References

Details

(Whiteboard: [has workaround, see comment #11 and comment #16])

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
Build Identifier: 

Just upgraded through automatic mechanism and when restarting an error message box is shown 4 times:
The calendar data in your profile was updated by a newer version of Calendar, and continuing will probably cause the information to be lost or corrupted. Calendar will now quit.

After that an error message is displayed on the CLI:
Error: [Exception... "'[JavaScript Error: "Components is not defined" {file: "chrome://calendar/content/calendar-statusbar.js" line: 128}]' when calling method: [calIStatusObserver::calendarCompleted]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: file:///opt/sunbird/components/calCompositeCalendar.js :: anonymous :: line 530"  data: yes]


Reproducible: Didn't try

Steps to Reproduce:
1.
2.
3.
What Sunbird build do you use (exact Build ID)? 
What Sunbird build do you used before (exact Build ID)? 

There was a database schema upgrade a few days ago that was backed out one day later. Maybe you installed your previous build between those changes. In that case I'd recommend to restore a backup of your database file or delete it to recreate it from scratch.
The application isn't starting, so I can't check the about page.
I upgraded today Aug,12 2008 around 09:00 Am EST.

The previous version was updated yesterday.

I just downloaded the full version from the FTP:
File:sunbird-0.9pre.en-US.linux-i686.tar.gz  	8514 KB  	08/12/2008  	03:03:00 AM
Gives the same error.
When I create a new profile the application starts up fine.
Severity: critical → blocker
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-calendar0.9?
Yes, I downloaded the 2008-08-12 Linux-i686 en-US nightly from latest-mozilla1.8 on the FTP site. Yesterday's nightly (which I used until today IIRC) now gives the same error. Going back to the 2008-08-10-19 nightly (which means hunting for the right FTP directory) it loads OK.
Version: unspecified → Sunbird 0.8
Tony, I doubt that you updated from Sunbird 0.8 and I doubt that you see the issue if updating from Sunbird 0.8 to a nightly build. It just happened that you used a nightly build containing the changes from Bug 446303. That changes were backed out as written in Comment #1. Therefore no release blocker, just usual nightly testing business.
I just saw that a different database schema change was checked in for Bug 449401 a few hours ago. That means you'll have to restore or recreate the database file in any case.
(In reply to comment #5)
> Tony, I doubt that you updated from Sunbird 0.8 and I doubt that you see the
> issue if updating from Sunbird 0.8 to a nightly build. It just happened that
> you used a nightly build containing the changes from Bug 446303. That changes
> were backed out as written in Comment #1. Therefore no release blocker, just
> usual nightly testing business.
> 

I update approx. every 24 hours by installing the next .tar.gz from latest-mozilla1.8 on the FTP server. I saw this issue today, updating from the previous branch-nightly. For reference, my install procedure consists of

rm -Rvf /usr/local/sunbird
tar -zxvC /usr/local -f sunbird-0.9pre.en-US.linux-i686.tar.gz

The reason I set this bug's Version to 0.8 is that this is not a Trunk build and there is no "better" Version label for 0.9pre. The way I see it, today's 0.9pre nightly is the latest build on the 0.8 Branch.
Component: Sunbird Only → Provider: Local Storage
OS: Linux → All
QA Contact: sunbird → storage-provider
Hardware: PC → All
Version: Sunbird 0.8 → unspecified
(In reply to comment #6)
> I just saw that a different database schema change was checked in for Bug
> 449401 a few hours ago. That means you'll have to restore or recreate the
> database file in any case.
> 

How do I do that?
Does this change means that I cannot use any future branch-nightlies unless I re-create my profile (and all calendars and settings) from scratch?
Component: Provider: Local Storage → Sunbird Only
OS: All → Linux
Hardware: All → PC
Version: unspecified → Sunbird 0.8
In reply to comment #8
Bug 450287 is for Lightning, so this issue cannot be Sunbird-only.
Component: Sunbird Only → General
QA Contact: storage-provider → general
If you are using a nightly build without having a backup I'd recommend the following:

1. Downgrade to the 2008-08-10 nightly build (Sb: use an older package, Tb: start in safe mode (http://kb.mozillazine.org/Safe_mode) and reinstall the older .xpi)
2. Export all local calendars to the iCalendar format
3. Note the URLs of the remote calendars
4. Install the 2008-08-11 nightly build (Sb/Tb will not start afterwards)
5. Delete the database file storage.sdb from your Sb/Tb profile folder
6. Start Sb/Tb - database file should be recreated
7. Recreate/Resubscribe calendars and import the .ics-files from step 2
Component: General → Provider: Local Storage
OS: Linux → All
QA Contact: general → storage-provider
Hardware: PC → All
Version: Sunbird 0.8 → unspecified
in reply to comment #11
ah, OK; and I see you restored the changes which I unwittingly undid in a previous mid-air collision -- sorry for that.
(In reply to comment #11)
> If you are using a nightly build without having a backup I'd recommend the
> following:
> 
> 1. Downgrade to the 2008-08-10 nightly build (Sb: use an older package, Tb:
> start in safe mode (http://kb.mozillazine.org/Safe_mode) and reinstall the
> older .xpi)
> 2. Export all local calendars to the iCalendar format
> 3. Note the URLs of the remote calendars
> 4. Install the 2008-08-11 nightly build (Sb/Tb will not start afterwards)
> 5. Delete the database file storage.sdb from your Sb/Tb profile folder
> 6. Start Sb/Tb - database file should be recreated
> 7. Recreate/Resubscribe calendars and import the .ics-files from step 2
> 


If the database schema is changed, the data should automatically be migrated to the new schema.  Even for nightly builds; or at least warn the user that a DB schema change has been made.  This will be important especially when 0.9 is released.

When I restore to the 
In reply to comment #13
I'm starting to dimly understand what happened: a schema change was made and Sb migrated the data; then the same chage was rolled back, and that's what tripped down the next nightly. Or maybe I misunderstand.
Yes, that is the story. The 20080810 nightly build upgraded the database format and the 20080811 nightly build reverted to the format used in 20080809 and before.
OK, the workaround in comment #11 worked with a minor change: at step 7, just use "File => Open Calendar File" on the locally-saved calendars from step 2, then check the "Properties" of the calendars (e.g. to restore their distinctive colours).
Whiteboard: [has workaround, see comment #11 and comment #16]
Stefan pointed out correctly that I've backed out a schema change, thus the profiles upgraded with monday's nightly have become corrupt.
I'll blog and will stress that nightly development versions are for testing (not for production use) and might break your data.
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: blocking-calendar0.9? → blocking-calendar0.9-
Resolution: --- → INVALID
(In reply to comment #17)
> Stefan pointed out correctly that I've backed out a schema change, thus the
> profiles upgraded with monday's nightly have become corrupt.
> I'll blog and will stress that nightly development versions are for testing
> (not for production use) and might break your data.
> 

IMHO, "corrupt" may be a little too strong: the format of the data was altered, but the data could be retrieved, albeit in no obvious fashion.

BTW, live-testing (testing by using the program on real data and not by following preset tests) is a necessary step before a release can be published; when something untoward happens during such live-testing it should be reported as a bug so that it can be investigated. If the bug happens to be due to having downloaded a build produced "at the wrong time" so that nothing more needs to be done to the source, well, so much the better.
I updated to build of Aug 13, 2008 and the program starts but missing certain local calendars, not all local calendars are missing. All my tasks are missing as well. Solution in comment #11 can be used for calendars but I would still be missing tasks.
Using a build of Aug 10, 2008 shows everything.
(In reply to comment #19)
Peter, you can't use the database from the 20080810 builds in any case. See Comment #6 above. The 20080813 build uses the same new version number as the 20080810 build did and therefore Sunbird/Lightning starts. But the database format is very different.
(In reply to comment #20)
I understand Stefan.
Does this mean this bug has to be closed now? The database format has changed and from now on the builds won't be able to read or convert the older database formats?
You need to log in before you can comment on or make changes to this bug.