Upgrade Actual app failed and uninstalled - error with yarn and corepack

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.14
What app is this about: Actual

Describe your issue

Hello !

I’ve tried to upgrade Actual app from the webadmin last week but it failed and removed the app entirely (which I found quite upseting that it didn’t just rollback). Now I don’t have access to the app at all.
I’ve tried to reinstall it either from the pre-upgrade backup or from scratch but both solutions didn’t work.

From the logs the issue seems to come from yarn and/or corepack but I have no clue what to do from this.

My diagnosis shows 2 issues :

  • Internet connectivity : The server does not have working IPv6. (I used to have it)
  • DNS records : Some DNS records are missing or incorrect for domain cheesedev.com (category basic) (those related to IPv6)

I don’t know how this may interact with the fact that I cannot request https://repo.yarnpkg.com/tags.

Thanks in advance for your help!

Share relevant logs or error messages

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

Hello,

Can you curl -I https://repo.yarnpkg.com ?

Yes, that’s what I get :

$ curl -I https://repo.yarnpkg.com

HTTP/2 400 
date: Sun, 13 Apr 2025 18:51:39 GMT
content-type: text/plain; charset=utf-8
content-length: 20
cf-ray: 92fd27f2f8f0dbbd-FRA
cf-cache-status: DYNAMIC
accept-ranges: bytes
access-control-allow-origin: *
expires: Sun, 13 Apr 2025 18:56:39 GMT
strict-transport-security: max-age=31536000
vary: Authorization,Accept-Encoding,Origin
via: 1.1 varnish
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
cross-origin-resource-policy: cross-origin
x-cache: MISS
x-cache-hits: 0
x-content-type-options: nosniff
x-fastly-request-id: 3eee25f8d91d35665b40c3521657f1484dc5093f
x-frame-options: deny
x-github-request-id: 5E42:2C2961:3180F3:374D57:67FC07BB
x-served-by: cache-fra-eddf8230111-FRA
x-timer: S1744570299.413766,VS0,VE84
x-xss-protection: 1; mode=block
server: cloudflare

I’ve also tried to install the app via the CLI (yunohost app install actual) or restore the pre-upgrade backup (yunohost backup restore actual-pre-upgrade1) but I get the same error that stops the process and uninstall the app.

Ok. Normally, if you try this :

PATH=/opt/node_n/n/versions/node/18/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

and

export DEBUG=corepack

and then run:

corepack prepare yarn@latest --activate

same error (Internal Error: Error when performing the request to https://repo.yarnpkg.com/tag) should occur :face_with_diagonal_mouth:, right ? (and with helpful verbose output I hope)

So let’s see if running

corepack cache clean

will allow to run as expected

corepack prepare yarn@latest --activate

Once you’re done, simply close and reopen your session to return to your normal path.

You could also check if the app and all its folders and data were fully removed or not (see /var/log/yunohost/categories/operation/2025xxxxxxxxxxx-app_remove-actual.yml if purge is shown as “true” or “false”)

Hi @otm33 ! Thanks for your support, I’ve tried all the steps you’ve told.

Indeed when I run corepack prepare yarn@latest --activate after the 2 steps i get the same error.

I ran the corepack cache clean command and tried again but still get the same error.

I ended the session and open it back and then check the logs. In /var/log/yunohost/categories/operation/ I’ve got plenty related to actual (due to my numerous tentatives…).
I checked the last one cat 20250413-191117-app_remove-actual.yml and this is what I got :

args:
  app: actual
  force_workdir: /home/yunohost.backup/tmp/actual-pre-upgrade1/apps/actual/settings
ended_at: 2025-04-13 19:11:26.921052
env:
  BASH_XTRACEFD: '7'
  YNH_APP_ACTION: remove
  YNH_APP_BASEDIR: /var/cache/yunohost/app_tmp_work_dirs/app_p7yzrjbc
  YNH_APP_ID: actual
  YNH_APP_INSTANCE_NAME: actual
  YNH_APP_INSTANCE_NUMBER: '1'
  YNH_APP_MANIFEST_VERSION: 25.3.1~ynh1
  YNH_APP_PACKAGING_FORMAT: '2.0'
  YNH_APP_PURGE: '0'
  YNH_ARCH: amd64
  YNH_CWD: /var/cache/yunohost/app_tmp_work_dirs/app_p7yzrjbc/scripts
  YNH_DEBIAN_VERSION: bookworm
  YNH_DEFAULT_PHP_VERSION: '8.2'
  YNH_HELPERS_VERSION: '2.1'
  YNH_INTERFACE: cli
  YNH_STDRETURN: /tmp/tmpug76zm5b/stdreturn
error: null
interface: cli
operation: app_remove
parent: null
related_to:
- - app
  - actual
started_at: 2025-04-13 19:11:17.672804
success: true
yunohost_version: 12.0.14

I don’t see anything related to purge.

Hi !

First, do you use a proxy ?

Could you try (in a new user’ session) this :

PATH=/opt/node_n/n/versions/node/18/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export DEBUG=corepack
corepack cache clear
unset HTTPS_PROXY
unset HTTP_PROXY
export NO_PROXY="localhost,127.0.0.1,registry.yarnpkg.com,repo.yarnpkg.com"

?
And then retry

corepack prepare yarn@latest --activate

I’m using a VPS, so just to be sure: when you’re saying

in a new user’ session

you mean that I have to log out and login again?
Or do I have to create another user for the steps?

Using my regular login I’ve tried those steps and still it gives me the same error…

Yes, it’s important to make sure that the env is reset between two tries. If you’re root running exit and su is enough.
To check proxy : env | grep -i proxy
Need to understand why corepack can’t reach https://repo.yarnpkg.com/tags, whereas curl can :face_with_diagonal_mouth:

If proxy isn’t involved it might be related to your ipv6 issue.
Could you try

PATH=/opt/node_n/n/versions/node/18/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

(again…)

and then

node -e "require('dns').lookup('repo.yarnpkg.com', console.log)"

and

node -e "require('dns').lookup('repo.yarnpkg.com', console.log)"

Well it seems I don’t have a proxy because env | grep -i proxy doesn’t give me anything.

When I run node -e "require('dns').lookup('repo.yarnpkg.com', console.log)" I get the following result:

null 2606:4700::6810:a978 6

The last 2 commands you sent were the same, was it on purpose?

It was a mistake : the 2nd one should have been node -e "require('dns').resolve('repo.yarnpkg.com', console.log)"

The output shows that corepack uses ipv6 with lookup method for dns.

Hope…

PATH=/opt/node_n/n/versions/node/18/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export NODE_OPTIONS="--dns-result-order=ipv4first"
corepack prepare yarn@latest --activate

Wouhou it worked!

Apparently it was indeed because of the IPv6 issue… which may be my next one ^^

I was able to restore the pre-upgrade backup, thanks a lot!