Etherpad_mypads upgrade failed : tar: Exiting with failure

What type of hardware are you using: dedicated ovh serveur
What YunoHost version are you running: 12.1.17.1
What app is this about: etherpad_mypads

Describe your issue

etherpad_mypads upgrade (de 1.8.4~ynh2 à 1.9.1~ynh3) faile with the following error :

2025-09-04 19:04:51,764: DEBUG - + tar --extract --file=/var/cache/yunohost/download/etherpad_mypads/main --directory=/var/www/etherpad_mypads --strip-components 1
2025-09-04 19:04:51,770: WARNING - tar: bin: Cannot create symlink to ‘src/bin’: File exists
2025-09-04 19:04:51,820: WARNING - tar: tests: Cannot create symlink to ‘src/tests’: File exists
2025-09-04 19:04:51,821: WARNING - tar: Exiting with failure status due to previous errors
2025-09-04 19:04:51,821: DEBUG - + ynh_exit_properly
2025-09-04 19:04:51,821: DEBUG - + local exit_code=2
2025-09-04 19:04:51,821: DEBUG - + [[ upgrade =~ ^install$|^upgrade$|^restore$ ]]
2025-09-04 19:04:51,822: DEBUG - + '[' 2 -eq 0 ']'
2025-09-04 19:04:52,426: ERROR - Failed to upgrade etherpad_mypads: An error occurred inside the app upgrade script

i tried to “remove” the bin and tests folders after stoping the etherpad_mypad systemd service but obviously upgrade failed anyway.

is it the upgrade script which does not clean properly the install directory before installing new sources ? is it the tar command which is not called properly (without --overwrite option) ?

is the tar error irrelevant here, if yes, why does the upgrade fail ?

what can i do ?
please help

Share relevant logs or error messages

There is symbolic links for these 2 folders

ls -l /var/www/etherpad_mypads/
total 1252
-rw-r-----   1 etherpad_mypads etherpad_mypads     64 Aug  4  2022 APIKEY.txt
lrwxrwxrwx   1 etherpad_mypads etherpad_mypads      7 Jun 26  2023 bin -> src/bin
-rw-rw----   1 etherpad_mypads etherpad_mypads  60229 Jun 26  2023 CHANGELOG.md
-rw-rw----   1 etherpad_mypads etherpad_mypads   8922 Jun 26  2023 CONTRIBUTING.md
-rw-------   1 etherpad_mypads etherpad_mypads   1627 Dec 17  2023 credentials.json
drwxrwx---   6 etherpad_mypads etherpad_mypads   4096 Jun 26  2023 doc
-rw-rw----   1 etherpad_mypads etherpad_mypads   3683 Jun 26  2023 Dockerfile
-rw-rw----   1 etherpad_mypads etherpad_mypads  11353 Jun 26  2023 LICENSE
-rw-rw----   1 etherpad_mypads etherpad_mypads   1573 Jun 26  2023 make_docs.js
-rw-rw----   1 etherpad_mypads etherpad_mypads    849 Jun 20  2023 Makefile
drwxrwx--- 582 etherpad_mypads etherpad_mypads  20480 Nov 10  2024 node_modules
-rw-r--r--   1 etherpad_mypads etherpad_mypads 862529 Dec 17  2023 package-lock.json
-rw-rw----   1 etherpad_mypads etherpad_mypads  12254 Jun 26  2023 README.md
-rw-rw----   1 etherpad_mypads etherpad_mypads    118 Jun 26  2023 SECURITY.md
-rw-r-----   1 etherpad_mypads etherpad_mypads     64 Aug  4  2022 SESSIONKEY.txt
-rw-------   1 etherpad_mypads etherpad_mypads  19834 Nov 10  2024 settings.json
-rw-rw----   1 etherpad_mypads etherpad_mypads  23827 Jun 26  2023 settings.json.docker
-rw-------   1 etherpad_mypads etherpad_mypads  17812 Dec 17  2023 settings.json.origin
-rw-rw----   1 etherpad_mypads etherpad_mypads  21490 Jun 26  2023 settings.json.template
drwxrwx---   9 etherpad_mypads etherpad_mypads   4096 Jun 26  2023 src
-rw-rw----   1 etherpad_mypads etherpad_mypads    695 Jun 26  2023 start.bat
lrwxrwxrwx   1 etherpad_mypads etherpad_mypads      9 Jun 26  2023 tests -> src/tests
drwxrwx---   2 etherpad_mypads etherpad_mypads 163840 Jul 23 10:59 var

and ?

but nope, not on my instance :

$ ls /var/www/etherpad_mypads
total 508K
4.0K -rw-r--r--   1 etherpad_mypads etherpad_mypads   64 Jan 28  2019 APIKEY.txt
4.0K drwxrwxr-x   4 etherpad_mypads etherpad_mypads 4.0K May 15  2020 bin
 32K -rw-rw-r--   1 etherpad_mypads etherpad_mypads  29K May 15  2020 CHANGELOG.md
 12K -rw-rw-r--   1 etherpad_mypads etherpad_mypads 8.1K May 15  2020 CONTRIBUTING.md
4.0K -rw-------   1 etherpad_mypads etherpad_mypads 1.6K Apr 29  2021 credentials.json
4.0K drwxrwxr-x   6 etherpad_mypads etherpad_mypads 4.0K May 15  2020 doc
4.0K -rw-rw-r--   1 etherpad_mypads etherpad_mypads 1.7K May 15  2020 Dockerfile
 12K -rw-rw-r--   1 etherpad_mypads etherpad_mypads  12K May 15  2020 LICENSE
4.0K -rw-rw-r--   1 etherpad_mypads etherpad_mypads  837 May 15  2020 Makefile
 12K drwxr-xr-x 252 etherpad_mypads etherpad_mypads  12K Apr 29  2021 node_modules
328K -rw-r--r--   1 etherpad_mypads etherpad_mypads 326K Aug  1  2020 package-lock.json
8.0K -rw-rw-r--   1 etherpad_mypads etherpad_mypads 7.4K May 15  2020 README.md
4.0K -rw-r--r--   1 etherpad_mypads etherpad_mypads   64 Jan 28  2019 SESSIONKEY.txt
 20K -rw-r--r--   1 etherpad_mypads etherpad_mypads  17K Apr 29  2021 settings.json
 20K -rw-rw-r--   1 etherpad_mypads etherpad_mypads  19K May 15  2020 settings.json.docker
 20K -rw-rw-r--   1 etherpad_mypads etherpad_mypads  17K May 15  2020 settings.json.template
4.0K drwxrwxr-x   7 etherpad_mypads etherpad_mypads 4.0K Apr 29  2021 src
4.0K -rw-rw-r--   1 etherpad_mypads etherpad_mypads   51 May 15  2020 start.bat
4.0K drwxrwxr-x   5 etherpad_mypads etherpad_mypads 4.0K May 15  2020 tests
4.0K drwxrwxr-x   2 etherpad_mypads etherpad_mypads 4.0K Sep  4 09:50 var

Hummm… is a quiet old version 1.8.4…
The actual version 1.9.1 is here since few years.

Have you try yunohost app upgrade etherpad_mypads --debug --force ?

yes, same result

Ok,
Could you try upgrade to this commit ( version 1.8.18 ), first create a backup to be sure…

yunohost app upgrade etherpad_mypads -u https://github.com/YunoHost-Apps/etherpad_mypads_ynh/tree/cb3c63914a47a3b5189226737da56d915a5e002b

tried, same result

how does the ynh apps release system works ? I thought about upgrading first to intermediate release, but i can’t find any release nor tag on github …

it was the idea with 1.8.18…

Not sure is the solution…

The problem seems still the symslinks here…

Perhaps you can try this:

  • do first a backup.
  • stop the service etherpad_mypads
yunohost service stop etherpad_mypads
  • mv the files bin and tar on the folder src
mv /var/www/etherpad_mypads/bin /var/www/etherpad_mypads/src/bin
mv /var/www/etherpad_mypads/tests /var/www/etherpad_mypads/src/tests
  • recreate the symbolinks
ln -sf /var/www/etherpad_mypads/src/bin /var/www/etherpad_mypads/bin
ln -sf /var/www/etherpad_mypads/src/tests /var/www/etherpad_mypads/tests
chown  etherpad_mypads:  /var/www/etherpad_mypads/tests
chown etherpad_mypads: /var/www/etherpad_mypads/bin
chown -R etherpad_mypads: /var/www/etherpad_mypads/
  • And try do the upgrade

About the search for oldest version, it is looking for on the commits, explicitly the ones merged from testing… and then «Browse the repisotirory at this point» and read the manifest.toml where the version is edited… It can take long time…

  • I have review…

ok so now i have npm integrity error …

2025-09-07 18:56:05,342: DEBUG - npm ERR! sha1-y+vouKCHn0ypcMPWm9V44pHW6DU= integrity checksum failed when using sha1: wanted sha1-y+vouKCHn0ypcMPWm9V44pHW6DU= but got sha512-iY4+J8D+S5OP6dP9bSomJfN7zIZMcsO8h7J+EsxXod+iUpnQXmIIYsb9+Ui1Fz4KFiGbMDSaDP6Ipqz/l/1hmA== sha1-m+EdkJEyAkYaXXAYLWEDNfHAKs4=. (33035 bytes)

with both releases

i think i may be better removing the app, installing last version from scratch, restoring the db and, some how, upgrading the db. Is it doable ?

So,

  1. i made a backup of the app with ynh,
  2. removed the app with ynh,
  3. installed the last version from scratch with ynh,
  4. stopped the service systemctl stop etherpad_mypads,
  5. emptied the mysql db with phpmyadmin
  6. imported the old db mysql -uroot -p etherpad_mypad < backuped_db.sql
  7. restarted the app systemctl start etherpad_mypads

so far so good, everything seems to work, all my pads are alive.