xmppjs / xmpp.js

XMPP for JavaScript
ISC License
2.19k stars 372 forks source link

Getting disconnected after 5 minutes #836

Closed turanmehmetb closed 4 years ago

turanmehmetb commented 4 years ago

Hey, no matter what i do, im getting timeout. I am trying to send ping in every 5 seconds but still its not changing:


[15:22:50.915]  DEBUG    IN<stream:error xmlns:stream="http://etherx.jabber.org/streams" xmlns="http://etherx.jabber.org/streams"><connection-timeout xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error>
[15:22:50.958]  LOG      SENT: <close xmlns="urn:ietf:params:xml:ns:xmpp-framing"/>
[15:22:50.959]  DEBUG    status closing
[15:22:50.964]  DEBUG    status close <close xmlns="urn:ietf:params:xml:ns:xmpp-framing"/>
[15:22:50.968]  DEBUG    status disconnecting
[15:22:50.969]  DEBUG    status disconnect [object Object]
[15:22:51.127]  LOG      SENT: <iq type="get" from="esm@ec2-15-185-229-76.me-south-1.compute.amazonaws.com" to="http://ec2-15-185-229-76.me-south-1.compute.amazonaws.com" id="yhajl1f08r" xmlns="jabber:client"><ping xmlns="urn:xmpp:ping"/></iq>
[15:22:51.388]  LOG  On IQ:<iq type="result" xmlns="jabber:client" from="http://ec2-15-185-229-76.me-south-1.compute.amazonaws.com" to="esm@ec2-15-185-229-76.me-south-1.compute.amazonaws.com/u-L1jGch" id="yhajl1f08r"/>
[15:22:51.981]  DEBUG    status connecting ws://ec2-15-185-229-76.me-south-1.compute.amazonaws.com:5280/xmpp-websocket
[15:22:52.522]  DEBUG    status connect
[15:22:52.524]  LOG      CONNECTING

Here is my ping stanza and its code:

[15:22:46.620]  LOG  SENT: <iq type="get" from="esm@ec2-15-185-229-76.me-south-1.compute.amazonaws.com" to="http://ec2-15-185-229-76.me-south-1.compute.amazonaws.com" id="wybsz71gzi" xmlns="jabber:client"><ping xmlns="urn:xmpp:ping"/></iq>
[15:22:46.500]  LOG  On IQ:<iq type="result" xmlns="jabber:client" from="http://ec2-15-185-229-76.me-south-1.compute.amazonaws.com" to="esm@ec2-15-185-229-76.me-south-1.compute.amazonaws.com/u-L1jGch" id="wybsz71gzi"/>

let timerId = setInterval(() => { xmppClient.iqCaller.request( xml('iq', { type: 'get', from:${comingUsername}@${sw}, to: sw }, xml('ping', { xmlns: 'urn:xmpp:ping' }) ), 30 * 1000, ); }, 5000);

sonnyp commented 4 years ago

Please use https://github.com/xmppjs/xmpp.js/tree/master/packages/debug and share the output, without any formatting or your own logs .

I need the full logs from the first connection to the successful reconnect. But feel free to remove any sensitive data (replace it with something XXX or whatever).

You shouldn't have to send pings for the connection to stay open (unless the server is configured like that) so please comment that code for now.

From the look of it; it is the server closing the connection not xmpp.js. Of course, it could be because of an issue within xmpp.js but I won't be able to say without the full logs.

Also, as a general rule of thumb, when you report issues or are asking for help it's best to provide too many details than not enough so it would also be useful to know which runtime you are using (Node.js, Firefox, React Native iOS, ...) and the version as well as the XMPP server and server version.

turanmehmetb commented 4 years ago

Hi, thanks for your reply. I have commented out ping codes and im running with react-native. Also when i check my prosody logs it only says 'Client disconnected: connection closed'. As a result of this issue when i became online again, im trying to enter rooms again then my messages send&receive double. Here is the full output.

[FriJun 05 2020 15:13:01.230]  DEBUGstatusconnecting ws://ec2-15-185-193-140.me-south-1.compute.amazonaws.com:5280/xmpp-websocket
[FriJun 05 2020 15:13:01.525]  DEBUGstatusconnect
[FriJun 05 2020 15:13:01.526]  LOG      CONNECTING
[FriJun 05 2020 15:13:01.527]  DEBUGstatusopening
[FriJun 05 2020 15:13:01.539]  LOG      SENT: <openversion="1.0" xmlns="urn:ietf:params:xml:ns:xmpp-framing" to="ec2-15-185-193-140.me-south-1.compute.amazonaws.com"/>
[FriJun 05 2020 15:13:01.789]  DEBUGstatusopen<openversion="1.0" xmlns="urn:ietf:params:xml:ns:xmpp-framing" id="cf37ac78-e18a-4922-8d74-0126422f1f85" xml:lang="en" from="ec2-15-185-193-140.me-south-1.compute.amazonaws.com"/>
[FriJun 05 2020 15:13:01.808]  LOG      SENT: <authxmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">AHVuZGVmaW5lZAAxMjMxMjM=</auth>
[FriJun 05 2020 15:13:01.809]  DEBUG    IN
<stream:featuresxmlns="http://etherx.jabber.org/streams" xmlns:stream="http://etherx.jabber.org/streams"><registerxmlns="http://jabber.org/features/iq-register"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>
[FriJun 05 2020 15:13:01.816]  DEBUG    OUT
<authxmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN"><hiddenxmlns="xmpp.js"/></auth>
[FriJun 05 2020 15:13:02.770]  DEBUG    IN
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/><text>Unable toauthorizeyouwiththeauthenticationcredentialsyou've sent.</text></failure>
[FriJun 05 2020 15:13:02.118]  LOG      SENT: <iqtype="get" id="x04k6ovcv" xmlns="jabber:client"><queryxmlns="jabber:iq:register"/></iq>
[FriJun 05 2020 15:13:02.122]  DEBUG    OUT
<iqtype="get" id="x04k6ovcv" xmlns="jabber:client"><queryxmlns="jabber:iq:register"/></iq>
[FriJun 05 2020 15:13:02.124]  LOG      ERROR ON onStartConnect: [SASLError: not-authorized - Unabletoauthorizeyouwiththeauthenticationcredentialsyou've sent.]
[FriJun 05 2020 15:13:02.361]  DEBUG    IN
<iqtype="result" xmlns="jabber:client" id="x04k6ovcv"><queryxmlns="jabber:iq:register"><instructions>Choose a usernameandpasswordforusewiththis service.</instructions><username/><password/><x xmlns="jabber:x:data" type="form"><title>Creating a newaccount</title><instructions>Choose a usernameandpasswordforusewiththis service.</instructions><fieldtype="text-single" var="username" label="Username"><required/></field><fieldtype="text-private" var="password" label="Password"><required/></field></x></query></iq>
[FriJun 05 2020 15:13:02.363]  LOG      On IQ:<iqtype="result" xmlns="jabber:client" id="x04k6ovcv"><queryxmlns="jabber:iq:register"><instructions>Choose a usernameandpasswordforusewiththis service.</instructions><username/><password/><x xmlns="jabber:x:data" type="form"><title>Creating a newaccount</title><instructions>Choose a usernameandpasswordforusewiththis service.</instructions><fieldtype="text-single" var="username" label="Username"><required/></field><fieldtype="text-private" var="password" label="Password"><required/></field></x></query></iq>
[FriJun 05 2020 15:13:02.367]  LOG      SENT: <iqtype="set" id="272eufofx7" xmlns="jabber:client"><query xmlns="jabber:iq:register"><username>esma-coskun$3</username><password>XXXXXX</password></query></iq>
[FriJun 05 2020 15:13:02.368]  DEBUG    OUT
<iqtype="set" id="272eufofx7" xmlns="jabber:client"><query xmlns="jabber:iq:register"><username>esma-coskun$3</username><password>XXXX</password></query></iq>
[FriJun 05 2020 15:13:02.616]  DEBUG    IN
<iqtype="error" xmlns="jabber:client" id="272eufofx7"><errortype="cancel"><conflictxmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><textxmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Therequestedusernamealreadyexists.</text></error></iq>
[FriJun 05 2020 15:13:02.621]  LOG      On IQ:<iqtype="error" xmlns="jabber:client" id="272eufofx7"><errortype="cancel"><conflictxmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><textxmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Therequestedusernamealreadyexists.</text></error></iq>
[FriJun 05 2020 15:13:02.621]  LOG      ERROR ON onReg(set): [StanzaError: conflict - Therequestedusernamealreadyexists.]
[FriJun 05 2020 15:13:03.134]  LOG      CONNECTING
[FriJun 05 2020 15:13:03.136]  LOG      SENT: <openversion="1.0" xmlns="urn:ietf:params:xml:ns:xmpp-framing" to="ec2-15-185-193-140.me-south-1.compute.amazonaws.com"/>
[FriJun 05 2020 15:13:03.392]  LOG      SENT: <authxmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">AGVzbWEtY29za3VuJDMAMTIzMTIz</auth>
[FriJun 05 2020 15:13:03.640]  LOG      SENT: <openversion="1.0" xmlns="urn:ietf:params:xml:ns:xmpp-framing" to="ec2-15-185-193-140.me-south-1.compute.amazonaws.com"/>
[FriJun 05 2020 15:13:03.896]  LOG      SENT: <iqtype="set" id="xlsrelf8bs" xmlns="jabber:client"><bindxmlns="urn:ietf:params:xml:ns:xmpp-bind"></bind></iq>
[FriJun 05 2020 15:13:04.147]  LOG      On IQ:<iqtype="result" xmlns="jabber:client" id="xlsrelf8bs"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm</jid></bind></iq>
[FriJun 05 2020 15:13:04.150]  LOG      ONLINE
[FriJun 05 2020 15:13:05.474]  LOG      SENT: <presence from="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com" to="alper-cesur$1@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3" xmlns="jabber:client"><x xmlns="http://jabber.org/protocol/muc"/></presence>
[FriJun 05 2020 15:13:05.477]  LOG      SENT: <presence from="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com" to="ege-tuna-aksu$4@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3" xmlns="jabber:client"><x xmlns="http://jabber.org/protocol/muc"/></presence>
[FriJun 05 2020 15:13:05.482]  LOG      SENT: <presence from="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com" to="cihan-altan$7@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3" xmlns="jabber:client"><x xmlns="http://jabber.org/protocol/muc"/></presence>
[FriJun 05 2020 15:13:05.489]  LOG      SENT: <presence from="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com" to="mahmut-yilmaz$10@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3" xmlns="jabber:client"><x xmlns="http://jabber.org/protocol/muc"/></presence>
[FriJun 05 2020 15:13:05.557]  LOG      SENT: <presence from="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com" to="selahattin-gurbuz$11@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3" xmlns="jabber:client"><x xmlns="http://jabber.org/protocol/muc"/></presence>
[FriJun 05 2020 15:13:05.725]  LOG      On PRESENCE:<presence xmlns="jabber:client" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" from="alper-cesur$1@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3"><x xmlns="http://jabber.org/protocol/muc#user"><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm"/><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/b81QL7UE"/><status code="110"/></x></presence>
[FriJun 05 2020 15:13:05.731]  LOG      On MESSAGE:<messagetype="groupchat" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" xmlns="jabber:client" from="alper-cesur$1@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com"><subject/></message>
[FriJun 05 2020 15:13:05.737]  LOG      On PRESENCE:<presence xmlns="jabber:client" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" from="ege-tuna-aksu$4@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3"><x xmlns="http://jabber.org/protocol/muc#user"><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm"/><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/b81QL7UE"/><status code="110"/></x></presence>
[FriJun 05 2020 15:13:05.744]  LOG      On MESSAGE:<messagetype="groupchat" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" xmlns="jabber:client" from="ege-tuna-aksu$4@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com"><subject/></message>
[FriJun 05 2020 15:13:05.747]  LOG      On PRESENCE:<presence xmlns="jabber:client" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" from="cihan-altan$7@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3"><x xmlns="http://jabber.org/protocol/muc#user"><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm"/><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/b81QL7UE"/><status code="110"/></x></presence>
[FriJun 05 2020 15:13:05.806]  LOG      On MESSAGE:<messagetype="groupchat" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" xmlns="jabber:client" from="cihan-altan$7@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com"><subject/></message>
[FriJun 05 2020 15:13:05.809]  LOG      On PRESENCE:<presence xmlns="jabber:client" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" from="mahmut-yilmaz$10@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3"><x xmlns="http://jabber.org/protocol/muc#user"><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm"/><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/b81QL7UE"/><status code="110"/></x></presence>
[FriJun 05 2020 15:13:05.813]  LOG      On MESSAGE:<messagetype="groupchat" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" xmlns="jabber:client" from="mahmut-yilmaz$10@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com"><subject/></message>
[FriJun 05 2020 15:13:05.983]  LOG      On PRESENCE:<presence xmlns="jabber:client" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" from="selahattin-gurbuz$11@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3"><x xmlns="http://jabber.org/protocol/muc#user"><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm"/><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/b81QL7UE"/><status code="110"/></x></presence>
[FriJun 05 2020 15:13:05.987]  LOG      On MESSAGE:<messagetype="groupchat" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" xmlns="jabber:client" from="selahattin-gurbuz$11@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com"><subject/></message>
[FriJun 05 2020 15:18:01.544]  DEBUG    IN
<stream:errorxmlns="http://etherx.jabber.org/streams" xmlns:stream="http://etherx.jabber.org/streams"><connection-timeout xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error>
[FriJun 05 2020 15:18:01.612]  LOG      SENT: <closexmlns="urn:ietf:params:xml:ns:xmpp-framing"/>
[FriJun 05 2020 15:18:01.616]  DEBUGstatusclosing
[FriJun 05 2020 15:18:01.618]  DEBUGstatusclose<closexmlns="urn:ietf:params:xml:ns:xmpp-framing"/>
[FriJun 05 2020 15:18:01.619]  DEBUGstatusdisconnecting
[FriJun 05 2020 15:18:01.627]  DEBUGstatusdisconnect [object Object]
[FriJun 05 2020 15:18:02.642]  DEBUGstatusconnecting ws://ec2-15-185-193-140.me-south-1.compute.amazonaws.com:5280/xmpp-websocket
[FriJun 05 2020 15:18:03.142]  DEBUGstatusconnect
[FriJun 05 2020 15:18:03.143]  LOG      CONNECTING
[FriJun 05 2020 15:18:03.144]  DEBUGstatusopening
[FriJun 05 2020 15:18:03.144]  LOG      SENT: <openversion="1.0" xmlns="urn:ietf:params:xml:ns:xmpp-framing" to="ec2-15-185-193-140.me-south-1.compute.amazonaws.com"/>
[FriJun 05 2020 15:18:03.396]  DEBUGstatusopen<openversion="1.0" xmlns="urn:ietf:params:xml:ns:xmpp-framing" id="ea7b79a5-e920-4d84-ac2c-52bea7f53e0a" xml:lang="en" from="ec2-15-185-193-140.me-south-1.compute.amazonaws.com"/>
[FriJun 05 2020 15:18:03.403]  LOG      SENT: <authxmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">AHVuZGVmaW5lZAAxMjMxMjM=</auth>
[FriJun 05 2020 15:18:03.404]  DEBUG    IN
<stream:featuresxmlns="http://etherx.jabber.org/streams" xmlns:stream="http://etherx.jabber.org/streams"><registerxmlns="http://jabber.org/features/iq-register"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>
[FriJun 05 2020 15:18:03.405]  DEBUG    OUT
<authxmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN"><hiddenxmlns="xmpp.js"/></auth>
[FriJun 05 2020 15:18:03.665]  DEBUG    IN
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/><text>Unable toauthorizeyouwiththeauthenticationcredentialsyou've sent.</text></failure>
[FriJun 05 2020 15:18:03.674]  LOG      SENT: <iqtype="get" id="dz6x5am198" xmlns="jabber:client"><queryxmlns="jabber:iq:register"/></iq>
[FriJun 05 2020 15:18:03.923]  LOG      On IQ:<iqid="dz6x5am198" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" xmlns="jabber:client" type="result"><query xmlns="jabber:iq:register"><registered/><username>esma-coskun$3</username><password/></query></iq>
[FriJun 05 2020 15:18:03.924]  LOG      SENT: <iqtype="set" id="jxub3e8bvu" xmlns="jabber:client"><query xmlns="jabber:iq:register"><username>esma-coskun$3</username><password>XXXX</password></query></iq>
[FriJun 05 2020 15:18:04.176]  LOG      On PRESENCE:<presence xmlns="jabber:client" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" from="ege-tuna-aksu$4@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3"><x xmlns="http://jabber.org/protocol/muc#user"><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm"/><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/b81QL7UE"/><status code="110"/></x></presence>
[FriJun 05 2020 15:18:04.180]  LOG      On PRESENCE:<presence xmlns="jabber:client" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" from="selahattin-gurbuz$11@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3"><x xmlns="http://jabber.org/protocol/muc#user"><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm"/><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/b81QL7UE"/><status code="110"/></x></presence>
[FriJun 05 2020 15:18:04.186]  LOG      On PRESENCE:<presence xmlns="jabber:client" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" from="mahmut-yilmaz$10@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3"><x xmlns="http://jabber.org/protocol/muc#user"><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm"/><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/b81QL7UE"/><status code="110"/></x></presence>
[FriJun 05 2020 15:18:04.189]  LOG      On PRESENCE:<presence xmlns="jabber:client" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" from="cihan-altan$7@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3"><x xmlns="http://jabber.org/protocol/muc#user"><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm"/><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/b81QL7UE"/><status code="110"/></x></presence>
[FriJun 05 2020 15:18:04.191]  LOG      On PRESENCE:<presence xmlns="jabber:client" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" from="alper-cesur$1@conference.ec2-15-185-193-140.me-south-1.compute.amazonaws.com/esma-coskun$3"><x xmlns="http://jabber.org/protocol/muc#user"><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm"/><item role="moderator" affiliation="owner" jid="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/b81QL7UE"/><status code="110"/></x></presence>
[FriJun 05 2020 15:18:04.195]  LOG      On IQ:<iqid="jxub3e8bvu" to="esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/_Kz97sOm" xmlns="jabber:client" type="result"/>
[FriJun 05 2020 15:18:04.691]  LOG      CONNECTING
[FriJun 05 2020 15:18:04.692]  LOG      SENT: <openversion="1.0" xmlns="urn:ietf:params:xml:ns:xmpp-framing" to="ec2-15-185-193-140.me-south-1.compute.amazonaws.com"/>
[FriJun 05 2020 15:18:04.956]  LOG      SENT: <authxmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">AGVzbWEtY29za3VuJDMAMTIzMTIz</auth>
[FriJun 05 2020 15:18:05.196]  LOG      SENT: <openversion="1.0" xmlns="urn:ietf:params:xml:ns:xmpp-framing" to="ec2-15-185-193-140.me-south-1.compute.amazonaws.com"/>
[FriJun 05 2020 15:18:05.444]  LOG      SENT: <iqtype="set" id="795x2wsngm" xmlns="jabber:client"><bindxmlns="urn:ietf:params:xml:ns:xmpp-bind"></bind></iq>
[FriJun 05 2020 15:18:05.690]  LOG      On IQ:<iqtype="result" xmlns="jabber:client" id="795x2wsngm"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>esma-coskun$3@ec2-15-185-193-140.me-south-1.compute.amazonaws.com/QxEaIGdR</jid></bind></iq>
[FriJun 05 2020 15:18:05.692]  LOG      ONLINE
sonnyp commented 4 years ago

Please use https://github.com/xmppjs/xmpp.js/tree/master/packages/debug and share the output, without any formatting or your own logs .

which runtime you are using (Node.js, Firefox, React Native iOS, ...) and the version as well as the XMPP server and server version.

turanmehmetb commented 4 years ago

React Native version 0.62.2 and problem is the same in both android and ios. Prosody version is 0.11.5. Here is the only debug output i deleted logs if you want this?

[FriJun 05 2020 15:13:01.230]  DEBUGstatusconnecting ws://ec2-15-185-193-140.me-south-1.compute.amazonaws.com:5280/xmpp-websocket
[FriJun 05 2020 15:13:01.525]  DEBUGstatusconnect
 [FriJun 05 2020 15:13:01.527]  DEBUGstatusopening
 [FriJun 05 2020 15:13:01.789]  DEBUGstatusopen<openversion="1.0" xmlns="urn:ietf:params:xml:ns:xmpp-framing" id="cf37ac78-e18a-4922-8d74-0126422f1f85" xml:lang="en" from="ec2-15-185-193-140.me-south-1.compute.amazonaws.com"/>
 [FriJun 05 2020 15:13:01.809]  DEBUG    IN
<stream:featuresxmlns="http://etherx.jabber.org/streams" xmlns:stream="http://etherx.jabber.org/streams"><registerxmlns="http://jabber.org/features/iq-register"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>
[FriJun 05 2020 15:13:01.816]  DEBUG    OUT
<authxmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN"><hiddenxmlns="xmpp.js"/></auth>
[FriJun 05 2020 15:13:02.770]  DEBUG    IN
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/><text>Unable toauthorizeyouwiththeauthenticationcredentialsyou've sent.</text></failure>
 [FriJun 05 2020 15:13:02.122]  DEBUG    OUT
<iqtype="get" id="x04k6ovcv" xmlns="jabber:client"><queryxmlns="jabber:iq:register"/></iq>
 [FriJun 05 2020 15:13:02.361]  DEBUG    IN
<iqtype="result" xmlns="jabber:client" id="x04k6ovcv"><queryxmlns="jabber:iq:register"><instructions>Choose a usernameandpasswordforusewiththis service.</instructions><username/><password/><x xmlns="jabber:x:data" type="form"><title>Creating a newaccount</title><instructions>Choose a usernameandpasswordforusewiththis service.</instructions><fieldtype="text-single" var="username" label="Username"><required/></field><fieldtype="text-private" var="password" label="Password"><required/></field></x></query></iq>
 [FriJun 05 2020 15:13:02.368]  DEBUG    OUT
<iqtype="set" id="272eufofx7" xmlns="jabber:client"><query xmlns="jabber:iq:register"><username>esma-coskun$3</username><password>XXXX</password></query></iq>
[FriJun 05 2020 15:13:02.616]  DEBUG    IN
<iqtype="error" xmlns="jabber:client" id="272eufofx7"><errortype="cancel"><conflictxmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><textxmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Therequestedusernamealreadyexists.</text></error></iq>
 [FriJun 05 2020 15:18:01.544]  DEBUG    IN
<stream:errorxmlns="http://etherx.jabber.org/streams" xmlns:stream="http://etherx.jabber.org/streams"><connection-timeout xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error>
[FriJun 05 2020 15:18:01.616]  DEBUGstatusclosing
[FriJun 05 2020 15:18:01.618]  DEBUGstatusclose<closexmlns="urn:ietf:params:xml:ns:xmpp-framing"/>
[FriJun 05 2020 15:18:01.619]  DEBUGstatusdisconnecting
[FriJun 05 2020 15:18:01.627]  DEBUGstatusdisconnect [object Object]
[FriJun 05 2020 15:18:02.642]  DEBUGstatusconnecting ws://ec2-15-185-193-140.me-south-1.compute.amazonaws.com:5280/xmpp-websocket
[FriJun 05 2020 15:18:03.142]  DEBUGstatusconnect
[FriJun 05 2020 15:18:03.144]  DEBUGstatusopening
 [FriJun 05 2020 15:18:03.396]  DEBUGstatusopen<openversion="1.0" xmlns="urn:ietf:params:xml:ns:xmpp-framing" id="ea7b79a5-e920-4d84-ac2c-52bea7f53e0a" xml:lang="en" from="ec2-15-185-193-140.me-south-1.compute.amazonaws.com"/>
 [FriJun 05 2020 15:18:03.404]  DEBUG    IN
<stream:featuresxmlns="http://etherx.jabber.org/streams" xmlns:stream="http://etherx.jabber.org/streams"><registerxmlns="http://jabber.org/features/iq-register"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>
[FriJun 05 2020 15:18:03.405]  DEBUG    OUT
<authxmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN"><hiddenxmlns="xmpp.js"/></auth>
[FriJun 05 2020 15:18:03.665]  DEBUG    IN
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/><text>Unable toauthorizeyouwiththeauthenticationcredentialsyou've sent.</text></failure>
sonnyp commented 4 years ago

The session is not established which is why you are getting disconnected with connection-timeout.

You get a conflict error when you are trying to register. I also think there is an error in your registration code, you probably want to implement it as a stream feature.

If you share the code I may be able to help.