Gajim - 2024-07-05


  1. smichel17

    Hello, I'm a little confused about how to get OMEMO working. The menu from the padlock in the lower right shows OMEMO as an option, but clicking it has no effect, and Gajim can't see OMEMO-encrypted messages sent from my other clients (Dino, Cheogram).

  2. smichel17

    (Shows "This message was encrypted with OMEMO and could not be decrypted.")

  3. smichel17

    d'oh, nvm just saw something obvious. I'm on 1.7, where the plugin isn't in core yet 🤦‍♂️

  4. amogus

    smichel17: install the gajim-omemo package in your package manager

  5. t

    Hey. Is it possible to install additional plugins when using the flatpak? Like the anti_spam one?

  6. lovetox

    not easily

  7. t

    oh ok. I couldn't be without that one. I get so many spam messages...

  8. lovetox

    do you block the users who send you spam messages?

  9. lovetox

    normally its just two clicks, and the chat is gone and spammer can never write you again

  10. t

    yeah, but they just generate new jids... I think in general, spam protection is quite under-developed in xmpp clients. I normally want to refuse rooster add requests and deny all messages from anyone not on my rooster and not in any of my rooms.

  11. lovetox

    yes we have a config option for that

  12. lovetox

    check accounts -> privacy -> ignore unknown contacts

  13. t

    Yeah ok, that I had not seen. But with the anti_spam plugin I can also ignore contact add requests. Adding contacts is such an outlier occurrence that it needs just be temporarily allowed.

  14. zak

    lovetox, I am able to reproduce the connection problem right now at my work notebook, if you remember? The error when connecting is: > Connect error: g-resolver-error-quark: No DNS record of the requested type for "_xmpp-client._tcp.xmpp.company.de" (0) Now when I set the IP address as hostname, the error message changes: > Connect error: g-io-error-quark: HTTP proxy connection not allowed (43) The funny thing is: The above behaviour is written into the Debug logfile, when logging is enabled in the preferences. When I disable this and run Gajim-Portable-Debug instead, I see the "HTTP proxy connection not allowed" error even if the IP address is _not_ set as hostname.

  15. lovetox

    hm so is a proxy set under accounts -> connection

  16. lovetox

    or in prefereces -> advanced

  17. zak

    No, Gajim itself does not have a proxy configured.

  18. zak

    When I disable the Windows automatic proxy settings, Gajim can connect.

  19. zak

    So it does have something to do with the proxy settings. The big question is, why did this work before Gajim 1.9 ?

  20. lovetox

    i dont think we did change something in this regard

  21. lovetox

    but why is his windows using a proxy?

  22. lovetox

    is this intentional a company proxy?

  23. zak

    It is a company PC

  24. lovetox

    they may well block the connection for some reason, or GLib for some reason fails to connect via this proxy

  25. lovetox

    has the server websocket? you could try to change to that

  26. zak

    it is the company xmpp server as well, so they for sure do not block this. And everyone connects fine so far with Gajim up to 1.8.4

  27. lovetox

    then it may be a GLib problem

  28. zak

    Yes I assume some library problem as well.

  29. zak

    Do you have any idea how I could debug this further?

  30. lovetox

    but hard to debug on a real installation

  31. zak

    Hmm

  32. lovetox

    i guess we could try to set a proxy on our windows machine

  33. lovetox

    and see if it fails

  34. lovetox

    but then we need to find some kind of proxy first

  35. zak

    Well... that would be great, but a lot of effort on your side.

  36. zak

    I am at the windows notebook right now. Maybe I can just hack some debug code into some gajim code somewhere?

  37. zak

    I am not sure if this is solely a proxy problem, too. When I have my notebook inside the company network, I can connect just fine, even with Gajim 1.9

  38. lovetox

    ..

  39. lovetox

    i mean the first thing you posted was that there are no DNS records found

  40. lovetox

    can you set debug logging for your client, and check if it lets you get the DNS records

  41. zak

    Yes, this error is only shown in the debug logfile, when debug logging is enabled in the preferences and I have no extra hostname set in the account settings.

  42. lovetox

    you can try to set the env var G_MESSAGES_DEBUG=all

  43. lovetox

    then you get debug logging for glib networking

  44. lovetox

    maybe there is more info there

  45. lovetox

    but if it works for you, that hints that for some reason his proxy blocks the connection

  46. lovetox

    i wonder if it really works with 1.8.4 on his machine now

  47. zak

    I can download and install 1.8.4 and try...

  48. lovetox

    because if that also does not work, you can focus your investigation on the proxy itself

  49. zak

    (still on 1.9.1) I just tested with G_MESSAGES_DEBUG=all. This is helpful. I see now that it detects the two proxy IP addresses from the company and then: > nbxmpp.connection | (xmpp.company.de) Connecting to xmpp.company.de (10.ip.proxy1:3128) Then from GLib-GIO-DEBUG: > GSocketClient: TCP connection successful > [...] ...and tries then to connect to the second Proxy as well. Again "successful" and: > Address enumeration completed (out of addresses) > Address enumeration failed: (NULL) > Connection failed: HTTP proxy connection not allowed

  50. zak

    Sorry, I cannot paste the whole thing, just typing everything myself from the other PC.

  51. zak

    I installed version 1.8.4 now and it does connect with activated automatic proxy settings.

  52. lovetox

    can you check the glib version on 1.84

  53. lovetox

    help about

  54. lovetox

    and it would helpful to get the log until the error message

  55. zak

    GLib-Version in 1.8.4: 2.78.0

  56. zak

    I just compared the GLib-GIO-DEBUG messages when connecting and the difference is: With 1.8.4 it says: > pxbackend-DEBUG: px_manager_get_proxies_sync: url=none://xmpp.company.de:5222 online=1 > pxbackend-DEBUG: px_manager_get_proxies_sync: Config[0] = wpad:// > pxbackend-DEBUG: px_manager_get_proxies_sync: Proxy[0] = direct:// With 1.9.1 it actually shows two proxy IP addresses Proxy[0] = ip.proxy1 and Proxy[1] = ip.proxy2

  57. zak

    > pxbackend-DEBUG: px_manager_get_proxies_sync: url=none://xmpp.company.de:5222 online=1 > pxbackend-DEBUG: px_manager_get_proxies_sync: Config[0] = wpad:// > pxbackend-DEBUG: px_manager_get_proxies_sync: Proxy[0] = http://ip.proxy1:3128 > pxbackend-DEBUG: px_manager_get_proxies_sync: Proxy[1] = http://ip.proxy2:3128

  58. zak

    I tried to find a reference to px_manager_get_proxies_sync in the GLib code, but it is not there. I found it in libproxy however, but could not find out if and how and which version of libproxy glib-2.78.0 and glib-2.80.3 use. But I will stop there for now.

  59. meson

    https://github.com/libproxy/libproxy/blob/9a86f1ac1489d57ab661e29877f6828b9073a9f8/src/backend/px-manager.c#L615 I think it's function in libproxy and not glib ^

  60. meson

    Ah

  61. zak

    Yes, I found that. Now which version of libproxy does glib-2.78.0 and glib-2.80.3 use?

  62. meson

    Sorry, I didn't read correctly.

  63. lovetox

    hm

  64. lovetox

    probably 0.5.3 in 1.8.4

  65. lovetox

    and 0.5.4 has a lot of fixes

  66. lovetox

    for windows proxy resolution

  67. lovetox

    the thing is now, this looks like libproxy does actually do its job

  68. lovetox

    and gets the proxies

  69. lovetox

    it worked before because it didnt resolve any proxies

  70. lovetox

    and now when reading the error i understand what the problem is

  71. lovetox

    this company proxies are HTTP proxies, and we need socks5

  72. zak

    Hmm... does anyone know what would have to be changed in the proxy configuration on windows then? Or maybe there is some way to disable the proxy or force direct connection somehow for the start of Gajim only? Maybe an environment variable or something like that? I am afraid to ask the company to change anything with the proxy configuration, because they already wanted to shut down the XMPP server.

  73. lovetox

    its fine, i think the company does nothing wrong here

  74. lovetox

    the thing is GLib seems to accept this proxy as viable and i think this is because we dont tell it that we want a TCP connection

  75. zak

    Okay, so maybe you can add some parameter somewhere to tell GLib that?

  76. lovetox

    yeah would be nice if you could test that

  77. zak

    Of course!

  78. lovetox

    its in nbxmpp/tcp.py

  79. lovetox

    but wait, didnt you say it works for your machine?

  80. zak

    It works, if I am in the office connected to the company network.

  81. zak

    But I am at home now and have the notebook here, so I can reproduce the problem and test.

  82. lovetox

    so i wonder what proxies are returned for you

  83. zak

    With 1.9.1 I get the two Proxy IP addresses from the company

  84. lovetox

    but you said there are 2 machines

  85. lovetox

    the one from your colleague where 1.9.1 does not work

  86. lovetox

    and yours

  87. lovetox

    and yours where it works

  88. lovetox

    the logs are from what machine?

  89. zak

    Yes, that was when I was in the office and my colleague was at home 🙂️

  90. zak

    Now I am at home, too, and have the problem as well.

  91. lovetox

    so you are saying when you are not in the company network, then Gajim does not work

  92. zak

    correct.

  93. lovetox

    and your company server is public, or are you logged in via vpn or something?

  94. zak

    VPN

  95. lovetox

    so can you send me full log now where it does not work

  96. zak

    I am writing here from another PC... it would be a bit time-consuming

  97. zak

    Can you tell me what info you need? Or can I just try testing something in tcp.py ?

  98. zak

    I find only the compiled pyc files however. The Windows installer does not provide the source?

  99. lovetox

    you can download it from gitlab and place it beside the pyc

  100. lovetox

    not really understanding how you can fiddle with python files, but cant send me the txt by email ..

  101. zak

    > you can download it from gitlab and place it beside the pyc I just did that

  102. zak

    I have the tcp.py open now. Should I try something there, or should I create a logfile?

  103. lovetox

    self._client.set_protocol(Gio.SocketProtocol.TCP)

  104. lovetox

    add this around line 42

  105. zak

    I just sent you an email with a logfile.

  106. zak

    I added the line and removed tcp.pyc, but I think it did not read it. The pyc file was not re-created.

  107. zak

    Ok, I added a log message as well and can see the log message. The line did not help unfortunately. I still see the two http proxies.

  108. lovetox

    tryadding

  109. lovetox

    self._client.props.enable_proxy = False

  110. lovetox

    zak thanks for the log, but i meant with the env var to see what glib does

  111. zak

    The environment variable was set, but the output is only written to stdout and not in the logfile... I need to copy and paste.

  112. zak

    > self._client.props.enable_proxy = False This works! But I still see now the first error again in the debug output "No DNS record of the requested type..."

  113. zak

    But thats probably not important

  114. zak

    I sent you an excerpt of the output with the GLib messages

  115. zak

    enable_proxy=False is probably just a workaround, is it? Or can we generally disable the proxy here?

  116. jstein

    When I send a message and there is a problem with the server, I get an error message like: "Error: recipient-unavailable" Which does not help much, because it has no error code and I have no clue why the recipient was not available. The message text is then lost. It would be great, if I could press Arrow-UP to recall the last message line as in most chat programs or the bash for example

  117. lovetox

    jstein, and how does that fix the problem of your recipient not beeing available?

  118. jstein

    lovetox, it does not fix that problem, but I have a chance to debug it

  119. jstein

    my recipient is online, but there is a problem with the communication between the different servers

  120. jstein

    there are many different flavours of "not available" and I guess that the XMPP provides more than just that

  121. lovetox

    What version of Gajim are you using?

  122. jstein

    1.8.4

  123. jstein

    compiled from source on Gentoo

  124. lovetox

    i dont think there is more, we usually display all the server gives us

  125. lovetox

    are you sure the message does not arrive?

  126. lovetox

    if you can reproduce it, you can open the xml console and see the full error stanza

  127. lovetox

    or enable debug logging, and look it up when it happens in the log

  128. lovetox

    but you are trying to debug a problem that happens on the server .. i dont think you will find anything useful

  129. lovetox

    you need to ask the server operator what could be wrong

  130. lovetox

    zak, it would be interesting what changes when you are at your company

  131. lovetox

    because from my understanding if you use a vpn, there should be no difference

  132. jstein

    lovetox, advanced//debug logging is set to ON

  133. jstein

    Do you mean that switch?

  134. zak

    lovetox: I can do another test when I am back at the office.

  135. jstein

    I think we will investigate a bit more with the xml console now

  136. jstein

    "gajim.gtk.contact_info | Could not retrieve software version: Task has been cancelled"

  137. jstein

    is this a message from the local client, or from a request on a user status?

  138. jstein

    who wants to get which software version?

  139. jstein

    The xml console has a strange date format again... 07/04/24 08:16:06 (W) .... However I set date_format to %Y-%m-%d %H:%M:%S %z

  140. lovetox

    zak, do you find on your windows maschine proxy setting anywhere this

  141. lovetox

    https://share.hoerist.com/philipp/n6aZ1FgBAOcmxFCW/8117da5b-7654-434d-b93f-4f68ffb59943.png

  142. lovetox

    if yes, try to put in the address of the xmpp server

  143. lovetox

    jstein, Gajim wants to get the software version of your contacts divce

  144. lovetox

    jstein, Gajim wants to get the software version of your contacts device

  145. jstein

    I think it is monocles in that case. Should it work? Is it worth to open a bug ticket?

  146. zak

    lovetox, the proxy settings are maintained by the company. As I said, maybe there should be an extra rule for our XMPP server, but the company would have to do that.

  147. zak

    So, setting something for the connection is no solution?

  148. lovetox

    before you said you disabled the proxy

  149. lovetox

    now the company lets you disable the proxy, but not set an examption?

  150. lovetox

    im looking for something easy here, the other way is certainly asking the GLib folks whats expected here

  151. lovetox

    seems it does not try without proxy, it knows that the http proxy is wrong and tells us that, but it never tries without

  152. zak

    Yes, I can disable the automatic proxy settings completely. But there are certainly settings in there, that I will need at some point, and it's not meaningful for me to maintain my own proxy settings for everything.

  153. lovetox

    you should not disable it, the proposal was to add the xmpp server to the exemptions

  154. lovetox

    it seems we need a fall back, if a proxy is configured that does not speak our protocol GLib should try without

  155. lovetox

    but i just looked up the code in GLib and that option does not exist

  156. zak

    I see the box where I can enter exceptions for the proxy, but I can only use it if I disable the automatic proxy settings.

  157. lovetox

    and im not sure that is wrong, if i configure a proxy on a system, i expect applications to use it

  158. lovetox

    there are multiple solutions, and im trying to find out which is the right one

  159. zak

    So in general, it should be valid that Gajim might need to use the system proxy settings when connecting to an XMPP server?

  160. zak

    it should probably never use any http proxy server?

  161. zak

    I am looking at this right now... https://libproxy.github.io/libproxy/method.ProxyFactory.get_proxies.html

  162. zak

    Unfortunately this is not Python

  163. lovetox

    you dont need to

  164. lovetox

    its not a libproxy problem

  165. lovetox

    lib proxy just finds proxies, and it does that correctly

  166. lovetox

    GLib simply does not fallback to using no proxy, when in the system proxies are discovered

  167. lovetox

    can you try setting

  168. zak

    Yes, but you said, we need SOCKS5 and not HTTP proxies? Maybe we can filter out HTTP proxies

  169. lovetox

    self._client.set_default_proxy('direct://')

  170. lovetox

    remove everything else from before

  171. lovetox

    oh wait thats wrong

  172. jstein

    I read on the xml console: m4a: gst-core-error-quark: Your GStreamer installation is missing a plug-in. (12) How can I find out which is missing?

  173. zak

    > self._client.set_default_proxy('direct://') Wouldn't this be the same as enable_proxy = False ?

  174. lovetox

    remove everything you added

  175. lovetox

    then add `self._client.set_proxy_resolver(Gio.SimpleProxyResolver.new('direct://', None))`

  176. lovetox

    and check the GLib debug log if it still tries and discovers the proxies

  177. lovetox

    jstein, do you have an actual problem?

  178. jstein

    lovetox, yes, several. We are a group of 5 who have a long list of problems and try to debug it. Problems are things like "we loose connection from MUC" "OMEMO keys are not always used properly" "messages are sometimes not sent to the MUC or the user, while the user is online"

  179. lovetox

    ok gstreamer has nothing to do with any of these

  180. jstein

    I think the gstreamer message came, when a user sent a media file

  181. lovetox

    but all your problems could be cause by the server

  182. lovetox

    yeah you probably miss some plugins to play m4a files

  183. zak

    > then add > `self._client.set_proxy_resolver(Gio.SimpleProxyResolver.new('direct://', None))` lovetox, This works as well. I sent you another log excerpt. The proxy is found for other connections, but when connecting to the XMPP server it does not use them and the connection works.

  184. zak

    But is there a difference to enable_proxy=False?

  185. zak

    Oh no. The battery went out from my notebook, and I just realized I forgot the power adapter in the office 😛️

  186. zak

    Nevermind, it's late. Thank you very much for your help so far. I will gladly provide more input later.

  187. bot

    lovetox pushed 1 commits to branch python-nbxmpp/master fix: Fallback to direct connection if system proxies are not suitable - https://dev.gajim.org/gajim/python-nbxmpp/-/commit/2969ace9dbbf481b523b38ff455c9a874d9de2b1

  188. lovetox

    zak, no its not the same, this means we fallback to direct connection if system proxies are not suitable

  189. lovetox

    but we use the proxies if they are suitable

  190. lovetox

    enable_proxy=False means never use a proxy

  191. lovetox

    should be in the next Gajim release, thanks for debugging

  192. zak

    Okay, if you say so. I would have guessed it explicitly forces the "direct" proxy, which is kind of like no proxy. But nevermind.

  193. zak

    Thanks again and have a good night