jdev - 2020-06-01


  1. jonas’

    so not having any idea what React Native is, trying to use a python library in react native is nonsense, isn’t it?

  2. lovetox

    i think React Native is a js framework

  3. Zash

    I was under the impression that React was the js framework, and react native is ... ??? somehow it's native.

  4. Kev

    React native is like react, but compiles down for Android and iOS, IIUC.

  5. mbt

    hi everyone, i have an mobile application development ongoing but i have a problem on my xmpp connection. so there is nothing wrong at first but after 5 minutes im getting disconnetted and when i tried to send message i cant. then im sending presence again and reconnecting but it takes time. my server is prosody btw. any help here? thanks!

  6. lovetox

    are you saying there are no stanzas exchanged for 5 minutes?

  7. lovetox

    are you using a proxy?

  8. Zash

    What platform?

  9. mbt

    no im not using proxy, but only using muc. using react native and xmpp.js, first 5 minutes is okay i can do anything then i need to reconnect

  10. lovetox

    mbt and do you receive anything before disconnect? a </stream> from the server

  11. lovetox

    otherwise you should look at server debug logs,im sure it prints the reason for the disconnect

  12. mbt

    no, i see this after 5minutes, as SENT: <close xmlns="urn:ietf:params:xml:ns:xmpp-framing"/>

  13. mbt

    i dont have any code of line to stop the connection, still it sends this stanza..

  14. lovetox

    ok so websocket

  15. lovetox

    do you have keepalive ping enabled on the websocket connection?

  16. mbt

    um how can i enable that? i tried to use mod_ping in prosody and activated in my config. but still my pings receive service-unavailable.

  17. lovetox

    no not on the server

  18. lovetox

    your library needs to enable it on client side

  19. lovetox

    or maybe its enabled by default, i have no idea, on my library i have to set a interval and need to enable it

  20. mbt

    ok so i will look for xmpp.js keepalive instance, i assume it sends ping stanzas by time?

  21. lovetox

    you dont need to do that with websocket

  22. lovetox

    the websocket protocol has a ping/pong backed into the protocol

  23. lovetox

    it is under the xmpp layer

  24. lovetox

    before you spend time on that

  25. lovetox

    i would look into the debug log of the server

  26. lovetox

    im pretty sure it tells why it sends a close

  27. lovetox

    oh wait

  28. lovetox

    now i see it, client closes the connection

  29. lovetox

    ?

  30. flow

    SENT: <close xmlns="urn:ietf:params:xml:ns:xmpp-framing"/> doesn't that look like the library is sending the </close>?

  31. flow

    SENT: <close xmlns="urn:ietf:params:xml:ns:xmpp-framing"/> doesn't that look like the library is sending the <close/>?

  32. lovetox

    are you sure this is not in response to a server close

  33. flow

    no

  34. lovetox

    the message was for mbt :)

  35. mbt

    yes i guess library is closing but im not sending close

  36. lovetox

    maybe talk to support for xmpp.js?

  37. mbt

    yes i think i need to do that but first i wanted be sure it isnt a server side thing

  38. mbt

    thank you for your helps guys

  39. mbt

    maybe sonny can answer me about why im sending this close stanza?

  40. lovetox

    what prosody version are you using mbt?

  41. lovetox

    there was a bug with invalid pong responses in prosody recently

  42. mbt

    0.11.3

  43. lovetox

    that would be a reason a library closes the connection

  44. lovetox

    Zash? can you comment in what version the websocket pong fix was included

  45. Zash

    0.11.5 IIRC

  46. mbt

    yes i guess it is a bug, i saw something about it

  47. Zash

    https://prosody.im/doc/release/0.11.5#minor-changes

  48. mbt

    okay thanks i will try tu upgrade