Logging in via API not working anymore after update - "missing credentials parameter"

Hi yunohost-community,

I greet you from Kiel, Europe. Thanks for your time to read my issue! :slight_smile:

My YunoHost server

Hardware: Old computer (Zotac Mini PC, amd64)
YunoHost version: 4.3.2.2
I have access to my server : direct access via keyboard / screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Logging in yunohost-api does not work through the API anymore.
When I try to login, I get “Missing credentials parameter”.

What still works:
I do have direct access to my server. Logging in there and using the command line tools still works. Also, all my services still work. (matrix and xmpp messenger, nextcloud - matrix-coturn server does not work but it also did not work before, I did not get it running yet, even though port 5349 is forwarded for UDP and TCP)

Some background and diagnosis for my server:

I am using the server for more than one year now without major problems. The problems occurred right after trying to update and upgrade the last time. I did finish the updates and upgrades through the command line in the mean time though - latest update from just today, November 14th.

When typing in the command line “sudo yunohost diagnosis show” I get this log:
https://paste.yunohost.org/vopakaluza.swift

What I already tried:

a) I restarted my yunohost server.
b) I restarted the services yunohost-api, yunohost-firewall, synapse-coturn. This works with a “Success! Service ‘xyz’ restarted” feedback. Still, the diagnosis afterwards would not change.

I am not sure whether I provided all necessary information. If anything is missing, please let me know - I will provide it. Thanks for any advice in advance!

Warm greetings,
Adrian

Hi from Strasbourg, Europe :wave:

Meh I don’t understand why so many people experience this issue … The usual answer is to try to force refresh the browser cache (Ctrl+F5, or Ctrl+Shift+R) but many people reported that this did not fix the issue … Alternatively trying with a different browser, or in private browsing, but here again, people reporting that this did not fix the issue …

i don’t know how comfortable you are with tinkering, but if you want to investigate, open Firefox debugger with F12, go to network tab, then try to log in … you should see something like a POST /login request, and in the payload/request you should see that it contains credentials: your password

(and the bug supposedly is that it doesnt contains that credentials … which could happen if you were to be still using the code from yunohost-admin <= 4.2, but considering that you refreshed the cache and tried with other browsers, should not happen …)

1 Like

Hey Aleks,

thanks for the amazingly fast reply!! :slight_smile:

So, I tried the following:

  • logging in from Firefox
  • logging in from Firefox in private mode
  • logging in from Chromium
    All failed, same problem “Missing credentials parameter”.

When I open Firefox debugger with F12, I can see POST (under method) and login (under file).

In the request tab I see:
-----------------------------29336932152967151803248058267
Content-Disposition: form-data; name=“credentials”

my password
-----------------------------29336932152967151803248058267
Content-Disposition: form-data; name=“locale”

en
-----------------------------29336932152967151803248058267–

Does that give you any further ideas of what could be the issue? :slight_smile:

Greetings again,
Adrian

That’s still pretty mysterious unfortunately … But in relation to another bug : could it be that your password contains some accented chars maybe, or “non-regular special characters” … like, any special character that’s no in the ASCII range … for example # = { } - & " _ | ! ? are usual special characters, but stuff like  Ŀ ← Œ ¢ “ ⋅ arent ?

2 Likes

Hi Aleks,
that actually seems to have been the issue. It did contain special characters and after changing it I can access my api again. Thank you so much and sorry for that, I could have thought of this myself!!
Very happy greetings from Kiel,
Adrian

1 Like

Well this is definitely a bug though, using special chars should be fine :wink:

But thanks for confirming that this is what was causing the bug, now we have a pretty good idea of what’s happening to debug this

1 Like

(Bug is fixed in moulinette 4.3.2.1)

2 Likes

Hi Aleks,
thanks for the reply and fixing the bug. I’m again stunned by the speed of your replies and work!!
Warm greetings,
Adrian

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.