YunoHost-Apps / trilium_ynh

Trilium package for YunoHost
https://github.com/zadam/trilium
GNU Affero General Public License v3.0
10 stars 9 forks source link

Database migration requires upgrade to v0.60.4 first #51

Open yelvington opened 11 months ago

yelvington commented 11 months ago

Describe the bug

After upgrading to 0.61.11~ynh1, it is impossible to log into Trilium. The app reports failure to sync. The web interface bounces me to the Yunohost SSO login page "Please log in to access this content."

Context

Steps to reproduce

sudo yunohost app upgrade trilium -u https://github.com/YunoHost-Apps/trilium_ynh/tree/master --debug

Attempting to use the resulting upgraded Trilium via the web interface sends the browser to the Yunohost app login page. Trilium is shown as an available app, but clicking simply reloads the page.

Logs

https://paste.yunohost.org/raw/oyutumekeg

yelvington commented 10 months ago

There was a Trilium DB schema change that may have been involved. I'm closing this issue with a description of how I fixed the problem.

  1. From the Trilium UI, right-click on the "root" and select "export."
  2. Export the entire system as an HTML zip file and save it locally.
  3. From the Yunohost UI, delete the entire Trilium application.
  4. From the Yunohost UI, make a fresh install of the current Trilium.
  5. Log in by going to the URL you specified in the installation dialog. This time the UI will ask for a password and not bounce you back to the Yunohost apps page.
  6. From the new Trilium UI, import your saved HTML zip file. Everything will repopulate properly.
tituspijean commented 4 months ago

Related: https://paste.yunohost.org/raw/ohakudozop

The package may need to add an intermediate upgrade step to properly perform the migration. Though it is a weird design choice not to include the migration in later releases.