YunoHost-Apps / kresus_ynh

Kresus (personal finance manager) for YunoHost
https://kresus.org/
GNU Affero General Public License v3.0
20 stars 20 forks source link

0.20.1~ynh3 upgrade : Please install Woob 3.5 or later #187

Open Stefal opened 6 months ago

Stefal commented 6 months ago

Describe the bug

After the 0.20.1~ynh3 upgrade, I have this message Please install Woob 3.5 or later. I know that Woob 3.6 was installed before the update.

Context

Logs

logs:
  - 2024-04-29 20:35:52,144: DEBUG - + log_path=systemd
  - 2024-04-29 20:35:52,144: DEBUG - + timeout=300
  - 2024-04-29 20:35:52,145: DEBUG - + '[' start == stop ']'
  - 2024-04-29 20:35:52,145: DEBUG - + [[ -n Server is ready ]]
  - 2024-04-29 20:35:52,145: DEBUG - ++ mktemp
  - 2024-04-29 20:35:52,169: DEBUG - + local templog=/tmp/tmp.pC1YZwLmd1
  - 2024-04-29 20:35:52,170: DEBUG - + '[' systemd == systemd ']'
  - 2024-04-29 20:35:52,171: DEBUG - + local pid_tail=273354
  - 2024-04-29 20:35:52,172: DEBUG - + '[' start == reload ']'
  - 2024-04-29 20:35:52,172: DEBUG - + journalctl --unit=kresus --follow --since=-0 --quiet
  - 2024-04-29 20:35:52,174: DEBUG - ++ date --utc --rfc-3339=seconds
  - 2024-04-29 20:35:52,175: DEBUG - ++ cut -d+ -f1
  - 2024-04-29 20:35:52,182: DEBUG - + local 'time_start=2024-04-29 18:35:52 UTC'
  - 2024-04-29 20:35:52,183: DEBUG - + systemctl start kresus
  - 2024-04-29 20:35:52,206: DEBUG - + [[ -n Server is ready ]]
  - 2024-04-29 20:35:52,207: DEBUG - + set +x
  - 2024-04-29 20:36:02,755: DEBUG - + echo 'The service kresus has correctly executed the action start.'
  - 2024-04-29 20:36:02,761: DEBUG - + break
  - 2024-04-29 20:36:02,761: DEBUG - + set -x
  - 2024-04-29 20:36:02,762: DEBUG - + '[' 1 -ge 3 ']'
  - 2024-04-29 20:36:02,762: DEBUG - + '[' 1 -eq 300 ']'
  - 2024-04-29 20:36:02,762: DEBUG - + ynh_clean_check_starting
  - 2024-04-29 20:36:02,762: DEBUG - + '[' -n 273354 ']'
  - 2024-04-29 20:36:02,762: DEBUG - + kill -SIGTERM 273354
  - 2024-04-29 20:36:02,763: DEBUG - + '[' -n /tmp/tmp.pC1YZwLmd1 ']'
  - 2024-04-29 20:36:02,763: DEBUG - + ynh_secure_remove --file=/tmp/tmp.pC1YZwLmd1
  - 2024-04-29 20:36:02,764: DEBUG - + local legacy_args=f
  - 2024-04-29 20:36:02,771: DEBUG - + args_array=(['f']='file=')
  - 2024-04-29 20:36:02,771: DEBUG - + local -A args_array
  - 2024-04-29 20:36:02,774: DEBUG - + local file
  - 2024-04-29 20:36:02,774: DEBUG - + ynh_handle_getopts_args --file=/tmp/tmp.pC1YZwLmd1
  - 2024-04-29 20:36:02,774: DEBUG - + set +o xtrace
  - 2024-04-29 20:36:02,774: INFO - The service kresus has correctly executed the action start.
  - 2024-04-29 20:36:02,784: DEBUG - + set +o xtrace
  - 2024-04-29 20:36:02,818: DEBUG - + ynh_script_progression '--message=Upgrade of kresus completed' --last
  - 2024-04-29 20:36:02,818: DEBUG - + set +o xtrace
  - 2024-04-29 20:36:02,986: DEBUG - + set +o xtrace
  - 2024-04-29 20:36:03,025: DEBUG - + echo '! Helper used in legacy mode !'
  - 2024-04-29 20:36:03,026: DEBUG - + set +x
  - 2024-04-29 20:36:03,030: DEBUG - + echo '[####################] > Upgrade of kresus completed'
  - 2024-04-29 20:36:03,031: DEBUG - + set -o xtrace
  - 2024-04-29 20:36:03,031: INFO - [####################] > Upgrade of kresus completed
  - 2024-04-29 20:36:03,032: DEBUG - + ynh_exit_properly
  - 2024-04-29 20:36:03,032: DEBUG - + local exit_code=0
  - 2024-04-29 20:36:03,032: DEBUG - + [[ upgrade =~ ^install$|^upgrade$|^restore$ ]]
  - 2024-04-29 20:36:03,033: DEBUG - + rm -rf /var/cache/yunohost/download/
  - 2024-04-29 20:36:03,047: DEBUG - + '[' 0 -eq 0 ']'
  - 2024-04-29 20:36:03,048: DEBUG - + exit 0
  - 2024-04-29 20:36:04,050: DEBUG - Checking that required services are up and running...
  - 2024-04-29 20:36:09,065: SUCCESS - kresus mis à jour
metadata:
  ended_at: 2024-04-29 20:36:09
  env:
    YNH_APP_ACTION: upgrade
    YNH_APP_BASEDIR: /var/cache/yunohost/app_tmp_work_dirs/app_8kb29q2x
    YNH_APP_CURRENT_VERSION: 0.20.1~ynh2
    YNH_APP_ID: kresus
    YNH_APP_INSTANCE_NAME: kresus
    YNH_APP_INSTANCE_NUMBER: 1
    YNH_APP_MANIFEST_VERSION: 0.20.1~ynh3
    YNH_APP_PACKAGING_FORMAT: 2.0
    YNH_APP_UPGRADE_TYPE: UPGRADE_PACKAGE
    YNH_ARCH: amd64
    YNH_DEBIAN_VERSION: bullseye
  error: None
  interface: api
  operation: app_upgrade
  parent: None
  related_to:
    - app
    - kresus
  started_at: 2024-04-29 20:29:24
  success: True
  yunohost_version: 11.2.11.3
metadata_path: /var/log/yunohost/categories/operation/20240429-182924-app_upgrade-kresus.yml
name: 20240429-182924-app_upgrade-kresus

I've tried to remove and reinstall Kresus, with the same result.

I've try this :

admin@yuno:~$ sudo yunohost app shell kresus
....
kresus@yuno:~$ woob --version
woob v3.6 Copyright(C) 2010-2024 Romain Bignon

kresus@yuno:~$ woob --help
usage: woob [--version] <command> [<args>]

Use one of this commands:
Instruction non permise
nicofrand commented 6 months ago

woob is installed in a virtualenv, so it makes sense. To access it through CLI you probably need to do something like https://github.com/YunoHost-Apps/kresus_ynh/blob/master/scripts/install#L69.

Stefal commented 6 months ago

It looks like the venv is already activated when the shell starts

If I activated manually I've got the same results:

kresus@yuno:~$ source venv/bin/activate
(venv) woob --version
woob v3.6 Copyright(C) 2010-2024 Romain Bignon
(venv) woob --help
usage: woob [--version] <command> [<args>]

Use one of this commands:
Instruction non permise
(venv)

Maybe it's the normal behaviour with this shell, I don't really understand how it works inside YunoHost.

nicofrand commented 6 months ago

OK, so, what is the actual issue?

Stefal commented 6 months ago

Kresus doesn't work image

nicofrand commented 6 months ago

Can you provide kresus' logs then please?

Stefal commented 6 months ago

This is what I have in /var/log/kresus/kresus.log

[2024-04-29T22:04:59.409] [INFO] HTTP - GET /kresus/api/all/ - 200 (1937 ms)
[2024-04-29T22:36:32.840] [INFO] apply-config - Running Kresus with the following parameters:
[2024-04-29T22:36:33.105] [INFO] apply-config - NODE_ENV = production
[2024-04-29T22:36:33.106] [INFO] apply-config - KRESUS_LOGIN = user
[2024-04-29T22:36:33.106] [INFO] apply-config - KRESUS_DIR = /home/yunohost.app/kresus
[2024-04-29T22:36:33.106] [INFO] apply-config - KRESUS_USER_ID = null
[2024-04-29T22:36:33.107] [INFO] apply-config - PORT = 58638
[2024-04-29T22:36:33.107] [INFO] apply-config - HOST = 127.0.0.1
[2024-04-29T22:36:33.107] [INFO] apply-config - KRESUS_PYTHON_EXEC = /var/www/kresus/venv/bin/python
[2024-04-29T22:36:33.107] [INFO] apply-config - KRESUS_URL_PREFIX = /kresus
[2024-04-29T22:36:33.108] [INFO] apply-config - KRESUS_SALT = (hidden)
[2024-04-29T22:36:33.108] [INFO] apply-config - KRESUS_FORCE_DEMO_MODE = false
[2024-04-29T22:36:33.108] [INFO] apply-config - KRESUS_WOOB_DIR = null
[2024-04-29T22:36:33.108] [INFO] apply-config - KRESUS_WOOB_SOURCES_LIST = null
[2024-04-29T22:36:33.109] [INFO] apply-config - KRESUS_EMAIL_TRANSPORT = smtp
[2024-04-29T22:36:33.109] [INFO] apply-config - KRESUS_EMAIL_SENDMAIL_BIN = null
[2024-04-29T22:36:33.109] [INFO] apply-config - KRESUS_EMAIL_FROM = kresus@redacted.tld
[2024-04-29T22:36:33.109] [INFO] apply-config - KRESUS_EMAIL_HOST = 127.0.0.1
[2024-04-29T22:36:33.109] [INFO] apply-config - KRESUS_EMAIL_PORT = 25
[2024-04-29T22:36:33.109] [INFO] apply-config - KRESUS_EMAIL_USER = kresus
[2024-04-29T22:36:33.109] [INFO] apply-config - KRESUS_EMAIL_PASSWORD = (hidden)
[2024-04-29T22:36:33.110] [INFO] apply-config - KRESUS_EMAIL_FORCE_TLS = false
[2024-04-29T22:36:33.110] [INFO] apply-config - KRESUS_EMAIL_REJECT_UNAUTHORIZED_TLS = false
[2024-04-29T22:36:33.110] [INFO] apply-config - KRESUS_APPRISE_API_BASE_URL = null
[2024-04-29T22:36:33.110] [INFO] apply-config - KRESUS_AUTH = null
[2024-04-29T22:36:33.110] [INFO] apply-config - KRESUS_LOG_FILE = /var/log/kresus/kresus.log
[2024-04-29T22:36:33.110] [INFO] apply-config - KRESUS_DB_TYPE = postgres
[2024-04-29T22:36:33.110] [INFO] apply-config - KRESUS_DB_LOG = error
[2024-04-29T22:36:33.110] [INFO] apply-config - KRESUS_DB_SQLITE_PATH = null
[2024-04-29T22:36:33.111] [INFO] apply-config - KRESUS_DB_HOST = localhost
[2024-04-29T22:36:33.111] [INFO] apply-config - KRESUS_DB_PORT = 5432
[2024-04-29T22:36:33.111] [INFO] apply-config - KRESUS_DB_USERNAME = kresus
[2024-04-29T22:36:33.111] [INFO] apply-config - KRESUS_DB_PASSWORD = (hidden)
[2024-04-29T22:36:33.111] [INFO] apply-config - KRESUS_DB_NAME = kresus
[2024-04-29T22:37:01.617] [INFO] models/index - database is ready
[2024-04-29T22:37:01.739] [INFO] models/index - User has id 1
[2024-04-29T22:37:01.740] [INFO] init - Starting bank accounts polling et al...
[2024-04-29T22:37:01.745] [INFO] poller - > Next check of accounts on 30/04/2024 at 03:07:00
[2024-04-29T22:37:01.747] [INFO] poller - Checking accounts and transactions for all accesses...
[2024-04-29T22:37:01.927] [INFO] poller - All accounts have been polled.
[2024-04-29T22:37:01.928] [INFO] poller - Maybe sending reports...
[2024-04-29T22:37:01.934] [INFO] report-manager - Checking if user has enabled daily report...
[2024-04-29T22:37:01.971] [INFO] report-manager - User hasn't enabled daily report.
[2024-04-29T22:37:01.972] [INFO] report-manager - Checking if user has enabled weekly report...
[2024-04-29T22:37:01.987] [INFO] report-manager - User hasn't enabled weekly report.
[2024-04-29T22:37:01.987] [INFO] poller - Reports have been sent.
[2024-04-29T22:37:01.987] [INFO] init - Server is ready, let's start the show!
[2024-04-29T22:41:38.718] [INFO] providers/woob - Calling woob: command version...
[2024-04-29T22:41:42.690] [INFO] providers/woob - exited with code null.
[2024-04-29T22:41:42.691] [ERROR] providers/woob - When getting Woob version: Error: Process exited with non-zero error code null. Unknown error. Stderr was:

[2024-04-29T22:41:42.745] [INFO] HTTP - GET /kresus/api/all/ - 200 (4118 ms)
bnjbvr commented 6 months ago

Are you running software in some kind of sandbox?

Is this an ARM CPU, and if so, are you using the right package compiled for your specific target architecture? Initial message states it's an x86 machine. Is this by chance an x86 32 bits machine, and you're trying to use the 64-bits version?

Stefal commented 6 months ago

Are you running software in some kind of sandbox?

No, just Yunohost with Kresus and VaultWarden

~Is this an ARM CPU, and if so, are you using the right package compiled for your specific target architecture?~ Initial message states it's an x86 machine. Is this by chance an x86 32 bits machine, and you're trying to use the 64-bits version?

It's a 64-bits release:

admin@yuno:~$ uname -a
Linux yuno.redacted.tld 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 GNU/Linux
bnjbvr commented 6 months ago

Ah sorry, no ideas; it's super weird to get an "instruction non permise" error. It'd be nice to understand whether it's coming from Python  or the CPU.

One thing to try out to remove the Python possibility: can you remove and re-create the woob directory entirely? (or maybe remove and reinstall Kresus, since it ought to remove the Python dir) In particular, I wonder if removing the .pyc files everywhere in the Woob's directories would be sufficient.

nicofrand commented 6 months ago

Can you give more info regarding the VM? And its host?

mattmofr commented 6 months ago

Sorry, I deleted my comment due to anonymization issues. I'll post it again as soon as I have some time.