Galène / Galene error 500 couldn't fetch groups

What type of hardware are you using: VPS bought online
What YunoHost version are you running: YunoHost 12.0.10 (stable)
How are you able to access your server: SSH
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: No. I just made a new subdomain and installed - and got an SSL automagically, which was wonderful

Describe your issue

I am trying to install galena and it seemed successful.
But when I try to use it, it breaks on the login page with
‘Public groups
Couldn’t fetch groups: Error: 500’

If I put the only group name I made in, which is yh ‘users only’, like example.com/group/groupname, it says
Internal server error

The log seems to say that there is a ‘{’ missing for a ‘}’ that it found in a json file, but i have carefully looked at any relevant file I learned from gitlab.
systemd config,
/home/yunohost.app/galene/groups and
/var/www/galene/live/data
I even checked /opt from an old post on here.

Share relevant logs or error messages

https://paste.yunohost.org/efacibibur

The error indicates that there’s a syntax error in the file groupname.json. Please find the file and validate it carefully.

I’ll add the file name to the error message in the next version of Galene.

I just found the reason: the password file was empty, one has to add a password like this:

nano /var/www/galene/live/data/config.json

{
    "canonicalHost": "galene.example.com",
    "proxyURL": "https://galene.example.com",
    "users": {
        "admin": {
            "permissions": "admin",
            "password":"1234" 
        }
    }
}

Ah, right. The global config can be absent, but it cannot be an empty file, if it exists, it must be correctly formatted JSON.

Thank you! :slight_smile:
I just counted bra/kets and didn’t know a plain text passwd was supposed to be there.
So.
I entered one there and that error went away, only to be replaced by another 500 for the group name, which I also knew existed: same problem. Fixed. :slight_smile:
So after I entered a passwd there too and now the page came up! I’m very excited, as you can tell.
Thanks very much for getting back to me.
To recap, I didn’t make those files. They were made during the installation process by the script.

Next up, even though I had to login to yunohost to get to the page, it says I’m not authorized to log into the group now…


OK. ‘op’ is operator I read that.
I did make a group named ‘relationship’ during the install. These files do not look the same to me.
My expectation was that I’d be able to make groups and that any user on the system would be able to log in with their yunohost credentials, but I’m wrong. I don’t know how this is supposed to work now. It looks like should make my own text db (preferably using bcrypt) passwd file. Sorry. Lost again - I’m good at that.
p.s. I changed my plain text passwd to ‘1234’ just for the screenshot.

Here’s the smallest screenshot I could make and still have all the columns.
Gotta be fast to catch that red error popup! :slight_smile:


Baby steps. I’m sure it will work eventually just fine.
I’m so happy to find Galene, b/c jitsi is far too heavy for my little €4/mo vps and my fiance is UTC+0 and I’m UTC-8… This will be great for us!

My expectation was that I’d be able to make groups and that any user on the system would be able to log in with their yunohost credentials

I know that is possible, but I’m a little vague on the details (I am the upstream developer of Galene, a different person is doing the integration of Galene into Yunohost). @ericg, perhaps you could help this user?

You should have an automatically created group called YunoHost_Users that does just that.

The group file is located here:
/home/yunohost.app/galene/groups/YunoHost_Users.json

Hi Eric. The group generation during install might be broken. After install (YNH 12, Galene 0.96.2~ynh1), neither the YunoHost_Users group nor the one chosen at install appears in the Public groups list. Setting a password for the admin user in /var/www/galene/live/data/config.json and a password in the personalized group definition file seems to correct the problem.

mmmh, you are right, I reinstalled and I get Couldn't fetch groups: Error: 500 error… :confused:

Apparently,
password_hash=$(echo $($install_dir/galenectl hash-password $password)) is not generating the hash password.
@jch I am using galenectl correctly?

Edit: Ah, I see that the -password option is needed. so password_hash=$(echo $($install_dir/galenectl hash-password -password $password)) should correct the issue.

Edit2: it should be fixed with password_hash=$(HOME=$install_dir $install_dir/galenectl hash-password -password $password)

There is a fix to be tested in the testing branch:
sudo yunohost app upgrade galene -u https://github.com/YunoHost-Apps/galene_ynh/tree/testing --force

1 Like

Didn’t work here, probably because I have a in my password :smiling_imp: (the first space might be the culprit, too).

Upgrade fails here:

DEBUG - ++ /var/www/galene/galenectl hash-password -password 'abcde'\''f' ghij lmopq 

I think you need to say

password_hash=$($install_dir/galenectl hash-password -password "$password")

in order to correctly handle passwords with spaces and other special characters. I don’t think you need the echo.

2 Likes

Testing branch now works like a charm!

Thank you very much everyone!
I will uninstall, force testing branch and try again :slight_smile:

the fix is on master now. it will be available soon

1 Like

OK. I’ve uninstalled already, so I’ll just wait for a few days.
Thanks so much everyone!

Soon is now, I installed today’s version and it works.

1 Like

Sadly, another 500.
N.B. I thought I was going to install testing, so I made a point of deleting the galene dir in yuno.apps. Then I got the mail that it was going to main, so I didn’t install from testing.
So, this is the result of going to a clean container in librewolf, going to the galene.klemtu.ca subdomain. The sso popped properly. I logged in ok. Saw ‘couldn’t fetch groups’, clicked join on the ‘Just_Us’ group I typed in and this is it:

/home/yunohost.app/galene/groups/Just_Us.json 215/215 100%
{
“users”:{
“gemlog”:{
“permissions”:“op”,
“password”:
}
},
“description”:“Just us.”,
“public”:true,
“allow-recording”:true,
“auto-subgroups”:true
}

=============

/home/yunohost.app/galene/groups/YunoHost_Users.json 236/236 100%
{
“description”: “YunoHost User Group”,
“public”: true,
“authServer”: “https://galene.klemtu.ca/auth/”,
“authKeys”: [
{“alg”:“HS256”,“k”:“xxxxxxxx-uCT8”,“key_ops”:[“sign”,“verify”],
“kty”:“oct”}
]
}

Fun, fun! :slight_smile:

You shouldn’t share keys, especially the ones next to authentication.
Anyway, just change it in your server.
What version did you install?