Unable to Log into Gancio

I have searched the forum for similar issues

on

This category is for issues regarding specific apps, NOT general issues with YunoHost.

on

This form is written in English but feel free to write in French if you’re more comfortable!

on

What app is this about, and its version

Gancio 1.28.2~ynh2

What YunoHost version are you running

12.1.41.2

What type of hardware are you using

Raspberry Pi 3, 4+

Describe your issue

I currently am unable to log into Gancio with user I’ve referenced other posts about the same topic so far and still am unable to log in. Here’s what I’ve done so far:

  1. Install via the Application tab on the admin panel with a email and password selected
  2. Post install, unable to log in
  3. Checked Gancio Users table in DB, no user is created.
  4. Using other posts, create users, one ‘admin’ and one ‘user’ with emails of format [user]@[my domain] and a provided password using the gancio CLI via ./server/cli.js users create
  5. Checked Users table in DB again, both users exist in the table, and are active (Note: the admin user has no value in the “is_admin” column)
  6. Attempted to login with both users, error “Could not log in. Check your login info.”
  7. Network tab shows “403” for /api/user. /api/login returns 200
  8. Nginx logs show no errors
  9. Tried logging in via incognito tab, same error
  10. Tried changing the password via the CLI, same error with the new password
  11. Forced-upgrade to see if new accounts got picked up, same login error

Curious what I could be missing here!

Share relevant logs or error messages

See section above

Do the following command return your users list with their respective role ?

# via gancio shell
server/cli.js users list

Yes it does. I’m able to enable/disable the accounts and change their roles
via the CLI as well.

@ValiantJaguar52

I think you removed the visitors permission, right ? If so, restore it and remove cookies before retrying to log in.

I haven’t edited the permission in the yunohost config. It has all_users and visitors permissions. I also tried it via incognito mode which has no existing cookies stored.

In the incognito browser window I tried:

  • accessing gancio via the dashboard after logging into yunohost
  • accessing gancio via the direct url while not logged in.

Both situations give the same could not log in error unfortunately.

As an experiment, I manually updated the “is_admin” column in the Users table to be set to true for my admin user (when I created my admin user via the CLI that column was not set). And that didn’t seem to work either :neopossum_thinking:

Do you still get the same error 403 ?

Mybe it’s a similar problem as it was in mobilizon.
Try if it works after first logging out of the yunohost sso.
Or potential workaround, if not able to fix the SSO, then maybe…
yunohost app setting gancio main.auth_header -v false && yunohost app ssowatconf

Can you test with a fake account ?
Such as

yunohost app shell gancio
server/cli.js users create user@fake.eu Test123! admin

Somehow that worked :sweat_smile: Created the fake account and was able to login…

After logging in, I reset the password for my already existing admin account via the CLI and I was able to login with that account now…

Thanks for stepping through this with me. I have no idea what was happening here (good luck to anyone reading this thread later on) :sob:

Yes, the 403 led me to believe initially that maybe something in the DB was misconfigured and the app was unable to ID what permissions the user should have. The dead end on this for me was that a) I didn’t see any explicit 403 returns in the gancio source and b) couldn’t find if and/or how the yunohost SSO was integrated as the latest gancio source has dropped oauth support and I hadn’t picked through previous commits yet to see what the current YH version source could look like.

In hopes to get better understanding of the error, I went ahead and tried a few more scenarios only to get more odd behavior! Here’s what I tried:

Scenario 1: I created a user on gancio for a friend that does not have a user on the yunohost sso. They are able to log in (no header workaround run yet)

Scenario 2: I opened an incognito window (brave browser) and attempted to login, got the same 403. Ran tmb’s workaround and tried again but got the same error.

All of the following were tested after running Tmb’s workaround command:

Scenario 3: Tried logging in via brave browser (not logged into yunohost) and was able to do so successfully

Scenario 4: Tried logging in via duckduckgo browser and was able to do so successfully.

I wasn’t able to log in until I created the fake user, but I didn’t try in other browsers before creating it to see if that had any affect.

Yes it is (or at least everything points to this). But that command only adds a key “main.auth_header” and doesn’t change auth_header value.

@ValiantJaguar52 Try upgrading from testing branch and let us know.

yunohost app upgrade gancio -u https://github.com/YunoHost-Apps/gancio_ynh/tree/testing

Ok! Updated gancio and was able to login in the incognito window :saluting_face:

Uh, I see, surprise. Is there some way to use the yunohost command also to set a value within an array/dict?