-
Hey there, I'm using a client based on go-xmpp to connect to my own ejabberd and I'm experiencing a crash within ejabberd's supervisor:
I have tested the exact same connection towards a different XMPP server and there it works flawlessly. I'm not sure if this is an actual bug or if I'm simply holding it wrong. Maybe someone here could point me towards some first steps for debugging this issue? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Update! Problem reported and fixed in #4428 This part of the error message is relevant: ** {badarg,[{base64,dec_bin,8,
[{file,"base64.erl"},
{line,500},
{error_info,#{cause => {3,integer,type,bad},
function => format_bs_fail,
module => erl_erts_errors}}]},
{xmpp_sasl_scram,mech_step,2,
[{file,"src/xmpp_sasl_scram.erl"},{line,155}]}, The xmpp erlang library received the scram details from ejabberd, and then in line 155 it calls base64:decode/1 to decode it, and that crashes. I try this myself manually, and works: Configure ejabberd: hosts:
- localhost
- 日本語
auth_password_format: scram Then register account, check password: $ _build/relive/ejabberdctl register user3 日本語 asd
...
$ _build/relive/ejabberdctl check_password user3 日本語 asd
$ echo $?
0 And login with Gajim:
Let's check the database content: ejabberdctl debug
...
ejabberd_auth:get_password(<<"user3">>, unicode:characters_to_binary("日本語")).
[{scram,<<"d7IeZUtUevnhEUBcMT5ZFV/SXo8=">>,
<<"OqHdJWQWmt2XN1vC47ZjZV1Pdx0=">>,
<<"WM6jG3rDm3jwacpzyuenWg==">>,sha,4096}]
base64:decode(<<"d7IeZUtUevnhEUBcMT5ZFV/SXo8=">>).
<<119,178,30,101,75,84,122,249,225,17,64,92,49,62,89,21,
95,210,94,143>> What difference in configuration do you have? Maybe added some options for SASL or SCRAM that I miss to reproduce the problem? If you try manually to get tthe password bits and decode base64 like I did... does it work or fail to decode? |
Beta Was this translation helpful? Give feedback.
-
@badlop thank you very much for this! It turned out that my configuration didn't have As a side note, this was on a regular domain. I however appreciate you testing it with a unicode domain to rule things out! Long story short, it appears that the process crashes when it is configured to store the plain password. While switching to Also, on a second thought, it might make sense to reevalutate the default ( What do you think? |
Beta Was this translation helpful? Give feedback.
-
Being more precise: it crashes only in your setup. I've setup ejabberd from git master, default configuration with no changes at all. Both Tkabber and Gajim can login correctly:
In your crash case there are more factors involved, probably related to your configuration, or your client, that you haven't shared, and consequently the problem cannot be reproduced or investigated. If you provide details that help to reproduce the problem, then it could be investigated. |
Beta Was this translation helpful? Give feedback.
Update! Problem reported and fixed in #4428
This part of the error message is relevant:
The xmpp erlang library received the scram details from ejabberd, and then in line 155 it calls base64:decode/1 to decode it, and that crashes.
I try this myself manually, and works:
Conf…