YunoHost-Apps / lychee_ynh

Lychee package for YunoHost
https://lycheeorg.github.io/
GNU General Public License v3.0
10 stars 2 forks source link

Upgrade/Install to 5.0.0 breaking, needed to manually run npm to resolve. #89

Closed ColonelBuendia closed 2 months ago

ColonelBuendia commented 8 months ago

Describe the bug

After upgrading to 5.0, the app threw a 500 HttpException - Vite manifest not found, please execute 'npm run dev' error and would not load. I tried installing a second copy and got a similar error.

I eventually resolved it by taking the not so subtle hint from the error page, and running npm i; npm run build. This took me longer to get to than I would like to admit.

Context

Steps to reproduce

  1. Go to system update page
  2. Take the 5.0 upgrade from Lychee
  3. Recieve 500 error on Lychee installation

Expected behavior

Upgrade works from the webadmin

Logs

output from update log 20231226-070435-app_upgrade-lychee.yml

ended_at: 2023-12-26 07:04:57.310422
env:
  YNH_APP_ACTION: upgrade
  YNH_APP_BASEDIR: /var/cache/yunohost/app_tmp_work_dirs/app_bttb5chg
  YNH_APP_CURRENT_VERSION: 4.13.0~ynh1
  YNH_APP_ID: lychee
  YNH_APP_INSTANCE_NAME: lychee
  YNH_APP_INSTANCE_NUMBER: '1'
  YNH_APP_MANIFEST_VERSION: 5.0.0~ynh1
  YNH_APP_PACKAGING_FORMAT: '2.0'
  YNH_APP_UPGRADE_TYPE: UPGRADE_APP
  YNH_ARCH: amd64
  YNH_DEBIAN_VERSION: bullseye
error: null
interface: api
operation: app_upgrade
parent: null
related_to:
- - app
  - lychee
started_at: 2023-12-26 07:04:35.107269
success: true
yunohost_version: 11.2.8.2

output from second install log /var/log/yunohost/categories/operation/20231226-175809-app_install-lychee.yml

args:
  app: lychee
  force: false
  label: undefined
  no_remove_on_failure: false
ended_at: 2023-12-26 17:58:38.514685
env:
  YNH_APP_ACTION: install
  YNH_APP_ARG_DOMAIN: __my arbitrary domain was here__
  YNH_APP_ARG_INIT_MAIN_PERMISSION: visitors
  YNH_APP_ARG_PATH: /lycheeDVA
  YNH_APP_BASEDIR: /var/cache/yunohost/app_tmp_work_dirs/app_nxrhagpb
  YNH_APP_ID: lychee
  YNH_APP_INSTANCE_NAME: lychee__2
  YNH_APP_INSTANCE_NUMBER: '2'
  YNH_APP_MANIFEST_VERSION: 5.0.0~ynh1
  YNH_APP_PACKAGING_FORMAT: '2.0'
  YNH_ARCH: amd64
  YNH_DEBIAN_VERSION: bullseye
error: null
interface: api
operation: app_install
parent: null
related_to:
- - app
  - lychee
started_at: 2023-12-26 17:58:09.569198
success: true
yunohost_version: 11.2.8.2

Additional notes

Thanks for maintaining this app here and making it play nice with yunohost, I've been using it seamlessly for a long time, and It's greatly appreciated.

ericgaspar commented 7 months ago

a fix can be tested here:

sudo yunohost app upgrade lychee -u https://github.com/YunoHost-Apps/lychee_ynh/tree/testing --force
ColonelBuendia commented 7 months ago

I upgraded to 5.0.2~ynh1, my existing install where I had manually run npm continued to work but new installs do not for me. I get an app-4f04a10b.js:19 Uncaught ReferenceError: Alpine is not defined error in the console and cannot interact with the sire past the make an admin account page.

I also got a 403 on some of the css, and thought that might have been it, but after resolving the permissions on it to lychee__2:www-data I still had the same Alpine error.

cocofil commented 6 months ago

a fix can be tested here:

sudo yunohost app upgrade lychee -u https://github.com/YunoHost-Apps/lychee_ynh/tree/testing --force

no way doesn't work https://paste.yunohost.org/raw/fusevoyepe

ericgaspar commented 2 months ago

We are using a prebuild version now. #117 should fix the issue