Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error messages for schema upgrade #6328

Closed
mixxxbot opened this issue Aug 22, 2022 · 16 comments
Closed

Better error messages for schema upgrade #6328

mixxxbot opened this issue Aug 22, 2022 · 16 comments
Labels
Milestone

Comments

@mixxxbot
Copy link
Collaborator

Reported by: daschuer
Date: 2012-03-23T19:48:17Z
Status: Fix Released
Importance: Low
Launchpad Issue: lp963408
Attachments: schema_update_error_msg.patch, schema_update_error_msg2.patch


If the schema.xml is outdated, the following error messages appears:

"
Unable to upgrade your database schema to version x.
Your mixxx.db file may be corrupt.
Try renaming it and restarting Mixxx.
"

This is confusing because the mixxx.db is actual in a fine state.

The attached patch against lp:mixxx #⁠2994 gives following message in this case:

Unable to upgrade your database schema to version x
Your <path to schema.xml> file may be outdated.
@mixxxbot mixxxbot added the bug label Aug 22, 2022
@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2012-03-23T19:48:17Z
Attachments: schema_update_error_msg.patch

@mixxxbot
Copy link
Collaborator Author

Commented by: esbrandt
Date: 2012-04-06T10:30:16Z


Agree, the current error message is not helpful. But is the new one really better? We should provide a solution to the user if possible.

Is there is a helpful wiki/manual page we can link to? If not how would a solution to this error look like?

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2012-04-06T14:42:06Z


Hi jus,

the patch is better because it distinguishes the two cases:

Unable to upgrade your database schema to version x.
Your mixxx.db file may be corrupt.
Try renaming it and restarting Mixxx.

and

Unable to upgrade your database schema to version x
Your schema.xml file may be outdated.

I agree, it would be even better to add a wiki link for both cases.

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2012-06-11T19:30:13Z
Attachments: schema_update_error_msg2.patch


Updated patch with a third case, missing or invalid schema file.

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2012-06-20T22:35:14Z


The patch looks good but I'm wary of updating the strings this late on such an important error message. I'd almost rather have a properly translated bad error message than English good error messages. What do you think?

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2012-06-21T05:35:38Z


Hi RJ,

I understand your concerns.
But I am sure there must be only a petty minority of our users which are
not able to figured out what this untranslated error message means.
This error message will usually not appear, but if, than the original
translated message is totally misleading in some cases.

2012/6/21 RJ Ryan <email address hidden>

The patch looks good but I'm wary of updating the strings this late on
such an important error message. I'd almost rather have a properly
translated bad error message than English good error messages. What do
you think?

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/963408

Title:
Better error messages for schema upgrade

Status in Mixxx:
In Progress

Bug description:
If the schema.xml is outdated, the following error messages appears:

"
Unable to upgrade your database schema to version x.
Your mixxx.db file may be corrupt.
Try renaming it and restarting Mixxx.
"

This is confusing because the mixxx.db is actual in a fine state.

The attached patch against lp:mixxx #⁠2994 gives following message in
this case:

Unable to upgrade your database schema to version x
Your file may be outdated.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mixxx/+bug/963408/+subscriptions

@mixxxbot
Copy link
Collaborator Author

Commented by: esbrandt
Date: 2012-06-21T06:05:28Z


The goal is to provide assistance to the user in case the error occurs which the current message certainly does not - translated or not. Imo it is better to have a correct error message in english than to have a nicely translated but incorrect error message in the local language. +1 for inclusion in 1.11.

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2012-06-21T17:06:29Z


Sounds good to me -- patch committed. Thanks!

@mixxxbot
Copy link
Collaborator Author

Issue closed with status Fix Released.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
@mixxxbot mixxxbot added this to the 1.11.0 milestone Aug 24, 2022
@sven-simulacrum
Copy link

sven-simulacrum commented Feb 25, 2024

hallo

I am getting this message installing Mixxx 2.4 on Mac OS 10.14.6 Mojave, Intel 2,7 GHz Intel Core i5. I certainly do not understand how to fix it from what is in this thread above.

Unable to upgrade your database schema to version 39
Your mixxxdb.sqlite file may be corrupt.
Try renaming it and restarting Mixxx.
For help with database issues consult:
https://www.mixxx.org/support

@daschuer
Copy link
Member

Please post your mixxx.log
https://github.com/mixxxdj/mixxx/wiki/Finding-the-mixxx.log-file

@sven-simulacrum
Copy link

sven-simulacrum commented Feb 25, 2024

mixxx.log

@sven-simulacrum
Copy link

Did that work? Apologies, I’m not often on this list. Still having trouble installing…not sure what to do about it.

@daschuer
Copy link
Member

That is strange:

Info [Main]: SchemaManager - Upgrading database schema from version 0 to version 32
Info [Main]: SchemaManager - Upgrading to database schema to version 1 : "The base schema for the Mixxx SQLITE database."
Critical [Main]: FwdSqlQuery - Failed to prepare "CREATE TABLE Playlists (\n        id INTEGER primary key,\n        name varchar(48),\n        position INTEGER,\n        hidden INTEGER DEFAULT 0 NOT NULL,\n        date_created datetime,\n        date_modified datetime)" : QSqlError("1", "Unable to execute statement", "table Playlists already exists")
Critical [Main]: SchemaManager - Failed to upgrade database schema from version 0 to version 1

It looks like that the very first attempt of creating a mixxx.dbsqlite fails.

Can you please file a new GitHub issue. I am not a macOS developer hopefully someone else is jumping in.
Can this be a permission issue?

Mixxx should check and report this if the case.

@sven-simulacrum
Copy link

Yes this is correct. It fails on the very first attempt. It happened when I was trying to upgrade to the current stable version (2.4.0). Also, I can also no longer re-install an earlier version without getting the same error. Sure I will file a new issue.

@daschuer
Copy link
Member

#12894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants