Thursday, July 06, 2023
apps@conference.yunohost.org
July
Mon Tue Wed Thu Fri Sat Sun
          1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
           

[02:14:25] <Yunohost Git/Infra notifications> App concrete5 goes down from level 8 to 6 in job [#16871](https://ci-apps.yunohost.org/ci/job/16871)
[06:51:49] <nicofrand> Hi! I have a user meeting an issue with node/nodejs. The kresusapp installs node 16+ with the yunohost helper but the version used is node*js* (not node) 12.2.2: https://paste.yunohost.org/raw/azuripital. He does not remember installing nodejs. Does that speak to anyone? Would that be safe to remove nodejs globally?
[08:51:34] <Mateusz Szymański> > also, can we have [dendrite v0.13](https://github.com/YunoHost-Apps/dendrite_ynh/pull/100) merged? I'm using it right now so it seems to work just fine :)

actually scratch that, I cannot see anything from that point :P
[09:37:21] <tituspijean[m]> I merged it this morning 😉
[09:37:22] <tituspijean[m]> Mmmh, I now see your wording from another perspective, is there anything wrong with that version Mateusz Szymański ?
[09:37:22] <Mateusz Szymański> Federation tester gets connection refused on port 8448, dendrite log says mere 'TLS handshake failed'. Trying to figure out what's the deal here
[09:37:39] <Mateusz Szymański> It was sending messages no problem, hence I assumed it works
[09:37:46] <Mateusz Szymański> it's only now that I checked if it actually gets anything back ;)
[09:38:02] <Mateusz Szymański> > Hi! I have a user meeting an issue with node/nodejs. The kresusapp installs node 16+ with the yunohost helper but the version used is node*js* (not node) 12.2.2: https://paste.yunohost.org/raw/azuripital. He does not remember installing nodejs. Does that speak to anyone? Would that be safe to remove nodejs globally?

much earlier in log:

```
2023-07-05 20:43:34,371: DEBUG - + n 16 --arch=arm64
2023-07-05 20:43:34,593: DEBUG - copying : node/16.20.1
2023-07-05 20:43:37,394: DEBUG - /opt/node_n/bin/n: line 744: /opt/node_n/bin/node: No such file or directory
2023-07-05 20:43:37,395: DEBUG - installed : (with npm 8.19.4)
2023-07-05 20:43:37,399: DEBUG - ++ sort --version-sort
2023-07-05 20:43:37,399: DEBUG - ++ find /opt/node_n/n/versions/node/16 /opt/node_n/n/versions/node/16.13.2 /opt/node_n/n/versions/node/16.14.0 /opt/node_n/n/versions/node/16.17.1 /opt/node_n/n/versions/node/16.19.1 /opt/node_n/n/versions/node/16.20.0 /opt/node_n/n/versions/node/16.20.1 -maxdepth 0
2023-07-05 20:43:37,401: DEBUG - ++ tail --lines=1
2023-07-05 20:43:37,406: DEBUG - + real_nodejs_version=/opt/node_n/n/versions/node/16.20.1
2023-07-05 20:43:37,407: DEBUG - ++ basename /opt/node_n/n/versions/node/16.20.1
2023-07-05 20:43:37,411: DEBUG - + real_nodejs_version=16.20.1
```
[09:38:42] <Mateusz Szymański> as if it failed to do **something** about node 16 which might or might not result in node 12 in `$PATH`
[09:39:17] <nicofrand> > <@orhtej2:matrix.org> as if it failed to do **something** about node 16 which might or might not result in node 12 in `$PATH`

I thought it was a check and then real_nodejs_version was OK…
[09:39:48] <Mateusz Szymański> > I thought it was a check and then real_nodejs_version was OK…

IDK, but sounds like a plausible explanation
[09:40:06] <nicofrand> OK, and how can I move forward with this then?
[09:40:31] <Mateusz Szymański> 1. figure out what is wrong here
2. Profit?
[09:40:58] <Mateusz Szymański> > <@titus:pijean.ovh> I merged it this morning 😉

worry not, 0.13.1 already released and is a recommended upgrade as per release notes ;)
[09:41:58] <nicofrand> > <@orhtej2:matrix.org> 1. figure out what is wrong here
> 2. Profit?

lol yeah but I don't know anything about the helper and environment so how do I figure it out
[09:42:51] <nicofrand> and if this is not a false positive then why wouldn't the helper fail instead of silently sending back the wrong version
[09:44:20] <Yunohost Git/Infra notifications> [nextcloud_ynh] @Thatoo closed [issue #588](https://github.com/YunoHost-Apps/nextcloud_ynh/issues/588): Nextcloud office stop working
[09:44:20] <Yunohost Git/Infra notifications> [nextcloud_ynh] @Thatoo [commented](https://github.com/YunoHost-Apps/nextcloud_ynh/issues/588#issuecomment-1623365442) on [issue #588](https://github.com/YunoHost-Apps/nextcloud_ynh/issues/588) Nextcloud office stop working: I just uninstall and then reinstall and it works again.
[09:47:08] <Mateusz Szymański> > and if this is not a false positive then why wouldn't the helper fail instead of silently sending back the wrong version

not sure if `n` is inhouse developed thing or has some upstream we may wish to check?
[09:47:34] <Mateusz Szymański> the line 744 at least in my version on my server would indicate the `node` was indeed not installed for some reason
[09:50:12] <Mateusz Szymański> `n` is up to date: https://github.com/YunoHost/yunohost/blob/7924bb2b28436e6be7949b559c9eaa22981b3de4/helpers/vendor/n/n#L64
[09:53:57] <Mateusz Szymański> ok, found node 12.x:

```
# /usr/bin/node --version
v12.22.12
```
[09:54:26] <Mateusz Szymański> persumably default for Debian 11
[09:56:29] <tituspijean[m]> Mateusz Szymański Regardring Dendrite, I actually had a weird issue upon upgrading: https://paste.yunohost.org/raw/rumetubogu
and upon restoring, I had to run `usermod -a -G ssl-cert dendrite` to allow the app read the ssl certs
you got absolutely no issue?
[09:57:15] <Mateusz Szymański> > <@titus:pijean.ovh> Mateusz Szymański Regardring Dendrite, I actually had a weird issue upon upgrading: https://paste.yunohost.org/raw/rumetubogu
> and upon restoring, I had to run `usermod -a -G ssl-cert dendrite` to allow the app read the ssl certs
> you got absolutely no issue?

I mean it upgraded so I haven't checked the logs, let me see.....
[09:58:24] <tituspijean[m]> Mateusz Szymański Regarding node / n / yarn, is it possible one of the packages calls for node in a specific way, bypassing the PATH we set for it?
[10:01:03] <Mateusz Szymański> > <@titus:pijean.ovh> Mateusz Szymański Regarding node / n / yarn, is it possible one of the packages calls for node in a specific way, bypassing the PATH we set for it?

if you look at log linked by nicofrand : https://paste.yunohost.org/raw/azuripital it's either kresus shouldn't have 8 stars or `n` did something funky
[10:03:30] <Mateusz Szymański> tituspijean: dafuq
```
Jul 06 12:02:46 dendrite[1182279]: time="2023-07-06T10:02:46.252285487Z" level=info msg="Starting external listener on :8008"
Jul 06 12:02:46 dendrite[1182279]: time="2023-07-06T10:02:46.253570469Z" level=info msg="Starting external listener on :8449"
```
[10:03:41] <Mateusz Szymański> 8449?
[10:05:01] <tituspijean[m]> I think I got it. yarn is being installed with apt for that app. This is now discouraged by yarn. The proper method would be (source: https://yarnpkg.com/getting-started/install#nodejs-1610)
```
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack prepare yarn@stable --activate
```
then, the right version of yarn should be available in the PATH
[10:06:47] <tituspijean[m]> > <@orhtej2:matrix.org> 8449?

It does not surprise me, when I was packaging Dendrite I still had a Synapse instance running, so the Dendrite app installation picked the next available port.
[10:09:38] <nicofrand> > <@titus:pijean.ovh> I think I got it. yarn is being installed with apt for that app. This is now discouraged by yarn. The proper method would be (source: https://yarnpkg.com/getting-started/install#nodejs-1610)
> ```
> ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable
> ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack prepare yarn@stable --activate
> ```
> then, the right version of yarn should be available in the PATH

OK I'll try it thx
[10:11:18] <nicofrand> > <@orhtej2:matrix.org> if you look at log linked by nicofrand : https://paste.yunohost.org/raw/azuripital it's either kresus shouldn't have 8 stars or `n` did something funky

It has 8 stars because it works on other servers 🤷‍♂️
[10:14:14] <Mateusz Szymański> > <@titus:pijean.ovh> Mateusz Szymański Regardring Dendrite, I actually had a weird issue upon upgrading: https://paste.yunohost.org/raw/rumetubogu
> and upon restoring, I had to run `usermod -a -G ssl-cert dendrite` to allow the app read the ssl certs
> you got absolutely no issue?

https://paste.yunohost.org/raw/fuhusukoya don't see anything wrong here
[10:35:20] <Mateusz Szymański> I found the difference in known-working and known-not working dendrite, it's up to contents of `domain.tld/.well-known/matrix/server` (working has :8449, not working :8448)
[10:35:43] <Mateusz Szymański> and this supposedly comes from value of `$tls_port` which is automagically derived somewhere from packaging v2
[10:35:52] <tituspijean[m]> > It has 8 stars because it works on other servers 🤷‍♂️

Nah, it has 8 stars because the CI successfully tested it for months. Its test is only opening the main page and checking it returns a HTTP 2xx code, it does not test any other feature.
[10:37:07] <tituspijean[m]> For Synapse and Dendrite, the "main" page is the root of the domain, which is not handled by the internal server of the apps. So we force it to HTTP 200 with a NGINX trick. 🫠
[10:46:46] <nicofrand> > <@titus:pijean.ovh> Nah, it has 8 stars because the CI successfully tested it for months. Its test is only opening the main page and checking it returns a HTTP 2xx code, it does not test any other feature.

Yeah, I mean if it failed to install like in the example above it would not have 8 stars
[10:50:07] <orhtej2> test
[10:52:06] <orhtej2> ok, it (dendrite 0.13) is alive again after I restarted NGINX so that reply from `.well-known/whatever` do not contain garbage
[10:58:23] <Mateusz Szymański> > Yeah, I mean if it failed to install like in the example above it would not have 8 stars

Ci does not test aarch64
[11:04:55] <nicofrand> > <@orhtej2:matrix.org> Ci does not test aarch64

So you think the node issue comes from arch too?
[11:21:57] <orhtej2> > So you think the node issue comes from arch too?

might as well be 🤷
[11:22:31] <orhtej2> test 🍄
[11:22:48] <orhtej2> huh, Cinny is crashing Firefox renderer when picking emoji
[11:22:49] <orhtej2> nice
[11:49:09] <nicofrand> ok, I'll try changing the yarn thing and then if it fails I think I'll just block this archi, so much issues…
[12:09:38] <Yunohost Git/Infra notifications> App calckey goes down from level 7 to 2 in job [#16886](https://ci-apps.yunohost.org/ci/job/16886)
[12:21:38] <nicofrand> > <@titus:pijean.ovh> I think I got it. yarn is being installed with apt for that app. This is now discouraged by yarn. The proper method would be (source: https://yarnpkg.com/getting-started/install#nodejs-1610)
> ```
> ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable
> ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack prepare yarn@stable --activate
> ```
> then, the right version of yarn should be available in the PATH

À ce niveau l'utilisateur n'est pas encore créé (ça arrive juste après), je tente sans le exec_as ?
[12:32:35] <nicofrand> that would mean that a user is created even if the dependencies fail to install
[12:32:35] <tituspijean[m]> move the user creation code right before this then 😉
[12:32:37] <nicofrand> sounds weird?
[12:34:04] <orhtej2> > that would mean that a user is created even if the dependencies fail to install

it's deprovisioned correctly if install fails
[12:34:10] <nicofrand> OK
[12:34:55] <tituspijean[m]> not really, but if it's only a matter of installing yarn, put my lines to line 156 and remove the apt instructions
[12:34:55] <nicofrand> `--force` or `-F` do not work to force an already uptodate app (I did not change the version yet), am I missing something?
[12:35:02] <nicofrand> maybe I should upgrade my VM
[12:35:28] <orhtej2> i.e. here: https://paste.yunohost.org/raw/xabicujibu

```
2023-07-03 22:05:51,455: INFO - [###############++...] > Removing the dedicated system user...
2023-07-03 22:05:51,456: DEBUG - + ynh_system_user_delete --username=monica
2023-07-03 22:05:51,467: DEBUG - + ynh_system_user_exists monica
2023-07-03 22:05:51,478: DEBUG - + getent passwd monica
2023-07-03 22:05:51,481: DEBUG - + deluser monica
2023-07-03 22:05:51,675: DEBUG - Removing user `monica' ...
2023-07-03 22:05:51,675: DEBUG - Warning: group `monica' has no more members.
2023-07-03 22:05:51,810: DEBUG - Done.
2023-07-03 22:05:51,812: DEBUG - + ynh_system_group_exists monica
2023-07-03 22:05:51,825: DEBUG - + getent group monica
```
[12:50:13] <nicofrand> nope, system upgrade did not help. How does one force an app upgrade now?
[12:53:39] <nicofrand> well, exec_as is not authorized anyway
[12:59:14] <orhtej2> > well, exec_as is not authorized anyway

authorized for what?
[12:59:37] <orhtej2> you need to set permissions on $install_dir first likely
[12:59:41] <nicofrand> to use corepack enable and so on (which creates a symlink etc)
[12:59:48] <orhtej2> ahhh
[12:59:57] <orhtej2> link?
[13:03:26] <nicofrand> sorry, it was in my VM. `Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -> '/opt/node_n/n/versions/node/18.16.1/bin/pnpm'`
[13:03:43] <nicofrand> I just executed it without exec_as
[13:04:10] <nicofrand> seems ok, we'll see this evening if that fixes the issue
[13:11:51] <@rosbeefandino:3cmr.fr> Is someone know how to sed something by multiple espaces. Like 's/x/ /' but it instead of replacing by 4spaces it replace by only one.
[13:17:37] <tituspijean[m]> > `--force` or `-F` do not work to force an already uptodate app (I did not change the version yet), am I missing something?

Can you share the full command you tried?
[13:24:34] <orhtej2> WFM

```sh
\$ echo abc | sed -e 's/b/ /'
a c
```
[13:24:46] <orhtej2> WFM

```sh
$ echo abc | sed -e 's/b/ /'
a c
```
[13:30:36] <@rosbeefandino:3cmr.fr> > WFM
>
> ```sh
> $ echo abc | sed -e 's/b/ /'
> a c
> ```

Don't know then I m certainly doing something wrong.
[13:31:39] <orhtej2> > <@rosbeefandino:3cmr.fr> Don't know then I m certainly doing something wrong.

what's your command, input and desired output?
[13:42:20] <@rosbeefandino:3cmr.fr> https://github.com/Gredin67/synapse_ynh/blob/config-panel/scripts/config
[13:42:36] <@rosbeefandino:3cmr.fr> In the line 99
[13:43:01] <@rosbeefandino:3cmr.fr> Replaced string should be 4spaces
[13:43:13] <@rosbeefandino:3cmr.fr> Before pattern.
[13:44:30] <@rosbeefandino:3cmr.fr> But after execution the yaml file replaced by sed command line 112 contains just one space
[14:12:33] <orhtej2> > <@rosbeefandino:3cmr.fr> In the line 99

here? https://github.com/Gredin67/synapse_ynh/blob/3a42d18fe2b89644b9b612a44a0c9a5a73e8477c/scripts/config#L99
[14:26:06] <@rosbeefandino:3cmr.fr> Yes
[18:52:56] <nicofrand> > <@titus:pijean.ovh> I think I got it. yarn is being installed with apt for that app. This is now discouraged by yarn. The proper method would be (source: https://yarnpkg.com/getting-started/install#nodejs-1610)
> ```
> ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack enable
> ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH corepack prepare yarn@stable --activate
> ```
> then, the right version of yarn should be available in the PATH

That does not seem to help :( : https://paste.yunohost.org/raw/ovefapaver
[20:10:14] <Yunohost Git/Infra notifications> @babolab forked apps to [babolab/apps-appflowy](https://github.com/babolab/apps-appflowy)
[20:34:18] <Yunohost Git/Infra notifications> [apps] @babolab opened [pull request #1692](https://github.com/YunoHost/apps/pull/1692): add appflowy
[20:39:16] <orhtej2> > That does not seem to help :( : https://paste.yunohost.org/raw/ovefapaver

it's still `n` failing:

```
2023-07-06 18:21:49,700: DEBUG - + n 18 --arch=arm64
2023-07-06 18:21:49,905: DEBUG - installing : node-v18.16.1
2023-07-06 18:21:50,197: DEBUG - mkdir : /opt/node_n/n/versions/node/18.16.1
2023-07-06 18:21:50,203: DEBUG - fetch : https://nodejs.org/dist/v18.16.1/node-v18.16.1-linux-arm64.tar.xz
2023-07-06 18:21:55,696: DEBUG - copying : node/18.16.1
2023-07-06 18:21:57,935: DEBUG - ERROR: npm v9.5.1 is known not to run on Node.js v12.22.12. You'll need to
2023-07-06 18:21:57,936: DEBUG - upgrade to a newer Node.js version in order to use this version of npm. This
2023-07-06 18:21:57,936: DEBUG - version of npm supports the following node versions: `^14.17.0 || ^16.13.0 ||
2023-07-06 18:21:57,936: DEBUG - >=18.0.0`. You can find the latest version at https://nodejs.org/.
```
[20:43:52] <Yunohost Git/Infra notifications> [apps] @Tagadda [commented](https://github.com/YunoHost/apps/pull/1692#issuecomment-1624286353) on [issue #1692](https://github.com/YunoHost/apps/pull/1692) add appflowy: AppFlowy is a desktop software and does not have a web interface at the moment. See https://github.com/AppFlowy-IO/AppFl...
[20:43:56] <Yunohost Git/Infra notifications> [apps] @Tagadda closed [pull request #1692](https://github.com/YunoHost/apps/pull/1692): add appflowy
[20:48:39] <nicofrand> > it's still `n` failing:
> ```
> 2023-07-06 18:21:49,700: DEBUG - + n 18 --arch=arm64
> 2023-07-06 18:21:49,905: DEBUG - installing : node-v18.16.1
> 2023-07-06 18:21:50,197: DEBUG - mkdir : /opt/node_n/n/versions/node/18.16.1
> 2023-07-06 18:21:50,203: DEBUG - fetch : https://nodejs.org/dist/v18.16.1/node-v18.16.1-linux-arm64.tar.xz
> 2023-07-06 18:21:55,696: DEBUG - copying : node/18.16.1
> 2023-07-06 18:21:57,935: DEBUG - ERROR: npm v9.5.1 is known not to run on Node.js v12.22.12. You'll need to
> 2023-07-06 18:21:57,936: DEBUG - upgrade to a newer Node.js version in order to use this version of npm. This
> 2023-07-06 18:21:57,936: DEBUG - version of npm supports the following node versions: `^14.17.0 || ^16.13.0 ||
> 2023-07-06 18:21:57,936: DEBUG - >=18.0.0`. You can find the latest version at https://nodejs.org/.
> ```

Yes, unrelated to the way yarn is installed
[20:48:58] <nicofrand> I wonder how other apps deal with this
[20:49:09] <orhtej2> it fails before `yarn` runs
[20:49:35] <orhtej2> > I wonder how other apps deal with this

IDK, what is a known `node` app that builds on RBPi?
[20:49:59] <nicofrand> I don't know either :/
[21:18:53] <orhtej2> on aarch64 it says

```
[21:20:14] <orhtej2> if you diff it installs under different roots
[21:35:24] <orhtej2> @nicofrand You get past https://github.com/YunoHost/yunohost/blob/7924bb2b28436e6be7949b559c9eaa22981b3de4/helpers/nodejs#L111 yet old `node` remains, can you ssh in and type `which node`?