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

More info for "unknown profile version" error message #2361

Merged
merged 6 commits into from
Feb 3, 2020

Conversation

miciasto
Copy link
Contributor

@miciasto miciasto commented Jan 24, 2020

Resolves #2280

Changes

Adds version information to profile error message
Add profile error message to log

Error message:
version-error

About box:
about

Log messages

2020-01-19 03:31:18: "Database was open successfully"
2020-01-19 03:31:18: "Checking for database schema update..."
2020-01-19 03:31:18: "Current database version", "28"
2020-01-19 03:31:18: "Cannot convert database from version 28 to 27"

Tests

Tested manually on

  • Electron (error msg, log msg, about box)
  • CliClient (error msg, log msg)
  • Mobile (error msg, but did not check log msg because not sure where to find it)

Comments

For further details see previous abandoned pull request #2313

Comment on lines 318 to 319
this.logger().error(`Cannot convert database from version ${fromVersion} to ${existingDatabaseVersions[existingDatabaseVersions.length-1]}`);
throw new Error(`Unknown profile version. Most likely this is an old version of Joplin, while the profile was created by a newer version. Please upgrade Joplin at https://joplinapp.org and try again.\nJoplin version: ${shim.appVersion()}\nProfile version: ${fromVersion}\nExpected version: ${existingDatabaseVersions[existingDatabaseVersions.length-1]}`);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't put the logger().error statement as I expect the exception will already show up in the log. Or if it doesn't, maybe that's what should be fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Also confirmed the exception isn't appearing in either log file.

@laurent22 laurent22 merged commit f428cc2 into laurent22:master Feb 3, 2020
@laurent22
Copy link
Owner

Thanks!

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

Successfully merging this pull request may close these issues.

Add more info to the "Unknown profile version" dialog box
2 participants