Error when authenticating
Closed this issue · 4 comments
iamucil commented
I've got this error when authenticating into my xmpp server.
GenServer #PID<0.191.0> terminating
** (FunctionClauseError) no function clause matching in anonymous fn/2 in Romeo. Auth.success?/1
(romeo) lib/romeo/auth.ex:91: anonymous fn(%Romeo.Connection{component: fals e, features: %Romeo.Connection.Features{amp?: false, compression?: false, mechan isms: ["PLAIN"], registration?: false, stream_management?: false, tls?: false}, host: 'xmpp.dev.radiumchat.net', jid: "52eeee5d43f2@radiumchat.net", legacy_tls: false, nickname: "", owner: #PID<0.185.0>, parser: #Reference<0.21324546.708444 164.221664>, password: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjcyNTc5MjI3ZmFiYmI5NWVjMTFm NjQzMGQ4MjAxMWU2NDMzYWM1MDMiLCJ0eXAiOiJKV1QifQ.eyJpYXQiOjE1MzUwODM1MDMsInN1YiI6I jUyZWVlZTVkNDNmMiIsInRlcm1pbmFsIjoiYjg3Y2E4NjAzMGRmIn0.QnL9eMcgUPXgVjomzWd4cEoK8 Nj32Q8UIoZeGIGj9bmJhYwb74r3ffNGqxeRVxymb4mg1s4Spx1ZtEA0IQq_mdxX77Pu2-SuZIoJxLsdb 7WLURZQmaq7acjx1K45uVbYWyyXghv8UOt7k2QURj6eUN1Dp4Rk0camZwxr2RDU4rQ", port: 5222, preferred_auth_mechanisms: [], require_tls: false, resource: "", rooms: [], soc ket: {:gen_tcp, #Port<0.7>}, socket_opts: [], ssl_opts: [], stream_id: "QM-dvX-Z SG-BqKhEB_trxQ", timeout: 5000, transport: Romeo.Transports.TCP}, "\n") in Romeo .Auth.success?/1
(romeo) lib/romeo/auth.ex:62: Romeo.Auth.do_authenticate/2```
scrogson commented
Seems like the output is cut off...can you paste the output with more data?
iamucil commented
I tried login using xmpp client with this credential too and succeed. Did I missing something? Thanks
05:59:54.445 [debug] [52eeea5d43f2@radiumchat.net][INCOMING] "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en' id='0G8bGranS2Gj4SDdUe9hGQ' from='radiumchat.net'>\n<stream:features><mechanisms xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"><mechanism>PLAIN</mechanism></mechanisms></stream:features>\n<iq xmlns=\"jabber:client\" id=\"iq-1\" type=\"get\" from=\"radiumchat.net\" to=\"\"><query xmlns='jabber:iq:version'/></iq>"
05:59:54.454 [info] Authenticating with PLAIN
05:59:54.498 [debug] [52eeea5d43f2@radiumchat.net][OUTGOING] "<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>ADUyZWVlZTVkNDNmMgBleUpoYkdjaU9pSlNVekkxTmlJc0ltdHBaQ0k2SWpjeU5UYzVNakkzWm1GaVLtSTVOV1ZqTVRGbU5qUXpNR1E0TWpBeE1XVTJORE16WVdNMU1ETWlMQ0owZVhBaU9pSktWMVFpZlEuZXlKcFlYUWlPakUxTXpVd09ETTFNRE1zSW5OMVlpSTZJalV5WldWbFpuVmtORE5tTWlJc0luUmxjbTFwYm1Gc0lqb2lZamczWTJFNE5qQXpNR1JtSW4wLlFuTDllTWNnVVBYZ1Zqb216V2Q0Y0VvSzhOajMyUThVSW9aZUdJR2o5Ym1KaFl3Yjc0cjNmSk5HcXhlUlZ4eW1iNG1nMXM0U3B4MVp0RUEwSVFxX21keFg3N1B1Mi1TdVpJb0p4THNkYjdXTFVSWlFtYXE3YWNqeDFLNDV1VmJZV3l5WGdodjhVT3Q3azJRVVJqNmVVTjFEcdr5AzBjYW1acnd4MlJEVTRyUQ==</auth>"
05:59:54.520 [error] GenServer #PID<0.191.0> terminating
** (CaseClauseError) no case clause matching: "iq"
(romeo) lib/romeo/auth.ex:92: anonymous fn/2 in Romeo.Auth.success?/1
(romeo) lib/romeo/auth.ex:62: Romeo.Auth.do_authenticate/2
(romeo) lib/romeo/transports/tcp.ex:108: Romeo.Transports.TCP.authenticate/1
(romeo) lib/romeo/transports/tcp.ex:65: Romeo.Transports.TCP.start_protocol/1
(romeo) lib/romeo/connection.ex:90: Romeo.Connection.connect/2
(connection) lib/connection.ex:622: Connection.enter_connect/5
(stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: nil
State: %Romeo.Connection{component: false, features: %Romeo.Connection.Features{amp?: false, compression?: false, mechanisms: [], registration?: false, stream_management?: false, tls?: false}, host: "xmpp.dev.radiumchat.net", jid: "52eeee5d43f2@radiumchat.net", legacy_tls: false, nickname: "", owner: #PID<0.185.0>, parser: nil, password: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjcyNTc5MjI3ZmFiYmI5NWVjMTFmNjQzMGQ4MjAxMWU2NDMzYWM1MDMiLCJ0eXAiOiJKV1QifQ.eyJpYXQiOjE1MzUwODM1MDMsInN1YiI6IjUyZWVlZTVkNDNmMiIsInRlcm1pbmFsIjoiYjg3Y2E4NjAzMGRmIn0.QnL9eMcgUPXgVjomzWd4cEoK8Nj32Q8UIoZeGIGj9bmJhYwb74r3ffNGqxeRVxymb4mg1s4Spx1ZtEA0IQq_mdxX77Pu2-SuZIoJxLsdb7WLURZQmaq7acjx1K45uVbYWyyXghv8UOt7k2QURj6eUN1Dp4Rk0camZrwx2RDU4rQ", port: nil, preferred_auth_mechanisms: [], require_tls: false, resource: "", rooms: [], socket: nil, socket_opts: [], ssl_opts: [], stream_id: nil, timeout: 5000, transport: Romeo.Transports.TCP}
** (EXIT from #PID<0.185.0>) shell process exited with reason: an exception was raised:
** (CaseClauseError) no case clause matching: "iq"
(romeo) lib/romeo/auth.ex:92: anonymous fn/2 in Romeo.Auth.success?/1
(romeo) lib/romeo/auth.ex:62: Romeo.Auth.do_authenticate/2
(romeo) lib/romeo/transports/tcp.ex:108: Romeo.Transports.TCP.authenticate/1
(romeo) lib/romeo/transports/tcp.ex:65: Romeo.Transports.TCP.start_protocol/1
(romeo) lib/romeo/connection.ex:90: Romeo.Connection.connect/2
(connection) lib/connection.ex:622: Connection.enter_connect/5
(stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
scrogson commented
What server are you connecting to?
iamucil commented
using ejabberd 18.03 with custom authentication. case closed 😄
Thanks