Gajim - 2018-03-05

  1. Maranda
  2. Asterix Maranda: I think there is already a ticket ... to be checked
  3. lovetox i guess not reproduceable?
  4. lovetox i guess we could put debug output there to see what we get
  5. Link Mauve Why does it say “decode_py2”?
  6. Link Mauve Is that a misnomer or is it maybe using the wrong function on py3?
  7. Maranda lovetox, I have no idea how.
  8. Maranda it started with one and opened a dozillion exception windows
  9. lovetox did you do a file transfer, or anything with proxys?
  10. Maranda No
  11. Maranda Just resumed from hibernation
  12. lovetox Link Mauve, i guess its a decoding method that works on py2 and 3
  13. Maranda (the pc)
  14. lovetox def decode_py2(string, encoding): # decodes string into unicode if in py2 # py3 has unicode strings by default try: string = string.decode(encoding) except AttributeError: pass return string
  15. lovetox thats ok, the problem here is that we expect utf 8 encoded stuff from network
  16. lovetox but it seems its not utf-8 encoded, why this is i dont know
  17. Link Mauve “TypeError: startswith first arg must be bytes or a tuple of bytes, not str” looks very much like you’re expecting not to receive bytes, indeed.
  18. lovetox we expect it, but only special bytes, like proxy initiating stuff
  19. lovetox i dont know anything that starts with 0xbc which we would need to handle
  20. lovetox i will add debug output around that to get the whole thing next time, and dont popup errors
  21. Maranda lovetox I don't have any SOCKS5 proxy tbh so it's not that.
  22. Link Mauve lovetox, 0xbX could be a second, third or fourth byte of the UTF-8 representation of a codepoint > 127.
  23. lovetox but its not
  24. lovetox its the start byte
  25. Link Mauve If you receive a packet that is cut in two, are you sure you don’t start to read from that?
  26. Link Mauve (I’m just throwing ideas, without more debug information I can’t really know.)
  27. Asterix We are supposed to keep in the buffer the start of the codepoint
  28. Link Mauve Maranda, maybe you could change these two lines to display what the function input is, to help in debugging.
  29. lovetox i dont think he can reproduce that
  30. Link Mauve At least so that if it reproduces, he’ll have more information to give you.
  31. lovetox what im not really getting is
  32. lovetox this method seems weird
  33. lovetox hm ok on a string decode doesnt exist in py3
  34. lovetox its just invalid utf8
  35. lovetox but its ture gajim decodes even parts of a message
  36. lovetox Asterix
  37. lovetox for i in range(-1, -4, -1): char = received[i] if sys.version_info[0] < 3: # with py2 we get a str char = ord(char) if char & 0xc0 == 0xc0: self.received_bytes_buff = received[i:] received
  38. lovetox does that get the last codepoint? and saves it for the next package?
  39. lovetox then this fails in some cases
  40. Asterix Yes that's it. Strange that it raises now from several ppl. It works for years in py2
  41. lovetox Maranda you dont use gajim 0.16.x
  42. Maranda lovetox, 0.99.2
  43. Maranda on windows
  44. Maranda that's...
  45. Maranda 2018-03-01 master
  46. lovetox yeah k thanks
  47. lovetox hm no this finding of the start byte looks ok for me
  48. lovetox Maranda, did you use the account of your server=
  49. lovetox ?
  50. Maranda Yes two of 'em
  51. lovetox of course this code fails hard if the message is truncated at the beginning for some reason
  52. Maranda I resumed the computer from hibernation, and I think I had some wifi issues
  53. lovetox what happens if my connection is lost inbetween two packets that are one message
  54. lovetox then i resume with stream management
  55. lovetox would the server send only the second package, or send the whole message again
  56. lovetox Holger, do you know what ejabbered does in this case?
  57. Maranda Metronome doesn't resend. It will send bounces for the messages in the que.
  58. Link Mauve lovetox, it must resend the full message.
  59. Link Mauve Partly because it is unack’d yet.
  60. lovetox hm then im out of ideas, that was my last idea, like that gajim doesnt remember that it had the start byte in buffer and resets the buffer, then gets the rest of the packets
  61. bot Philipp Hörist pushed 2 commits to branch _refs/heads/master_ of _gajim-plugins_ < >: *65bd834b* < > [quickreplies] Update manifest.ini *9794deea* < > [quickreplies] Fix Quick Replies button
  62. bot Philipp Hörist merged a merge request for _gajim-plugins/master_ < >: [quickreplies] Fix Quick Replies button
  63. Maranda And lovetox ideally, the xep presumes, it's the clients which should silently resend unacked stanzas not servers. Just saying.
  64. lovetox hm this goes both ways
  65. lovetox of course unacked stanzas should be resent
  66. lovetox and server of course too
  67. lovetox i dont really understand what you trying to say
  68. Maranda Hm no.
  69. lovetox what no, if the server sends me a message, i dont ack it, disconnect, server has to send it again
  70. Maranda
  71. Maranda So. "Hmm no"
  72. lovetox ok thats basically resending it
  73. lovetox commiting it to offline storage
  74. lovetox but im not sure this is right
  75. lovetox im not requesting offline storage when coming in with sm resume
  76. lovetox what you do with presences?
  77. lovetox there is no offline storage for thenm
  78. lovetox are you going to just drop them, so i come back from offline and i have a incomplete groupchat roster because presences where dropped?
  79. lovetox Upon receiving a <resume/> or <resumed/> element the client and server use the 'h' attribute to retransmit any stanzas lost by the disconnection.
  80. lovetox so i guess messages are an exception here, because we have MAM and offline storage so there is no retransmission needed because the message can not get lost
  81. lovetox em
  82. lovetox Maranda, your quoted part belongs to the case the stream is NOT resumed
  83. lovetox and you still have undelivered stuff
  84. lovetox so in fact every stanza has to be retransmitted on resume
  85. Maranda Okay I'll make it clearer the xep doesn't mandate in any part of it, that a server should *ever* retransmit stanzas not even the part you quoted.
  86. lovetox what do you mean? there is no MUST?
  87. lovetox you realize that retransmitting stanzas is the whole reason of SM
  88. lovetox and not just client -> server
  89. lovetox would make no sense to do it only one way
  90. Maranda I'm not really sure that's the case anyways, I do resend on resume but a server may decide to just not do it.
  91. Maranda lovetox, like it could support acking but not resumption.
  92. Maranda lovetox, or rather resend is incorrect, I just flush the queue on resumption.
  93. Maranda lovetox, but that wouldn't be the case anyways because it happened right on computer coming out of hibernation so there was no session to resume anyways.
  94. Holger Maranda: The server may not support resumption and if it does, resumption might fail. But on successful resumption "Both parties SHOULD retransmit any stanzas that were not handled during the previous session, based on the sequence number reported by the peer."
  95. Holger As usual, I have no idea why this is just a SHOULD not a MUST, like in all our crappy specs.
  96. Maranda Hehe
  97. bot Philipp Hörist updated a merge request for _gajim/master_ < >: Defer txt record lookup until connection attempt
  98. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < >: *e740d127* < > Defer txt record lookup until connection attempt Don't try to resolve _xmppconnect records for servers before trying to connect. Prevent warnings from gajim.c.resolver for accounts with "connect on startup" disabled.
  99. bot Philipp Hörist merged a merge request for _gajim/master_ < >: Defer txt record lookup until connection attempt
  100. bot Philipp Hörist pushed 23 commits to branch _refs/heads/gajim_1.0_ of _gajim_ < >:
  101. bot Philipp Hörist pushed 1 commit to branch _refs/heads/gajim_1.0_ of _gajim_ < >: *7cac6432* < > Update ChangeLog
  102. debacle lovetox, will you tag 1.0.0 in gitlab soon? when and where will be the huge party then?
  103. lovetox debacle, haha, yeah Asterix has to do some preparations for the release
  104. lovetox but i hope we have it tomorrow :)
  105. lovetox if we have 1.0 over with, we can focus on some new things and improvements :)