-
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).
-
smichel17
(Shows "This message was encrypted with OMEMO and could not be decrypted.")
-
smichel17
d'oh, nvm just saw something obvious. I'm on 1.7, where the plugin isn't in core yet 🤦♂️
-
amogus
smichel17: install the gajim-omemo package in your package manager
-
t
Hey. Is it possible to install additional plugins when using the flatpak? Like the anti_spam one?
-
lovetox
not easily
-
t
oh ok. I couldn't be without that one. I get so many spam messages...
-
lovetox
do you block the users who send you spam messages?
-
lovetox
normally its just two clicks, and the chat is gone and spammer can never write you again
-
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.
-
lovetox
yes we have a config option for that
-
lovetox
check accounts -> privacy -> ignore unknown contacts
-
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.
-
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.
-
lovetox
hm so is a proxy set under accounts -> connection
-
lovetox
or in prefereces -> advanced
-
zak
No, Gajim itself does not have a proxy configured.
-
zak
When I disable the Windows automatic proxy settings, Gajim can connect.
-
zak
So it does have something to do with the proxy settings. The big question is, why did this work before Gajim 1.9 ?
-
lovetox
i dont think we did change something in this regard
-
lovetox
but why is his windows using a proxy?
-
lovetox
is this intentional a company proxy?
-
zak
It is a company PC
-
lovetox
they may well block the connection for some reason, or GLib for some reason fails to connect via this proxy
-
lovetox
has the server websocket? you could try to change to that
-
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
-
lovetox
then it may be a GLib problem
-
zak
Yes I assume some library problem as well.
-
zak
Do you have any idea how I could debug this further?
-
lovetox
but hard to debug on a real installation
-
zak
Hmm
-
lovetox
i guess we could try to set a proxy on our windows machine
-
lovetox
and see if it fails
-
lovetox
but then we need to find some kind of proxy first
-
zak
Well... that would be great, but a lot of effort on your side.
-
zak
I am at the windows notebook right now. Maybe I can just hack some debug code into some gajim code somewhere?
-
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
-
lovetox
..
-
lovetox
i mean the first thing you posted was that there are no DNS records found
-
lovetox
can you set debug logging for your client, and check if it lets you get the DNS records
-
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.
-
lovetox
you can try to set the env var G_MESSAGES_DEBUG=all
-
lovetox
then you get debug logging for glib networking
-
lovetox
maybe there is more info there
-
lovetox
but if it works for you, that hints that for some reason his proxy blocks the connection
-
lovetox
i wonder if it really works with 1.8.4 on his machine now
-
zak
I can download and install 1.8.4 and try...
-
lovetox
because if that also does not work, you can focus your investigation on the proxy itself
-
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
-
zak
Sorry, I cannot paste the whole thing, just typing everything myself from the other PC.
-
zak
I installed version 1.8.4 now and it does connect with activated automatic proxy settings.
-
lovetox
can you check the glib version on 1.84
-
lovetox
help about
-
lovetox
and it would helpful to get the log until the error message
-
zak
GLib-Version in 1.8.4: 2.78.0
-
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
-
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
-
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.
-
meson
https://github.com/libproxy/libproxy/blob/9a86f1ac1489d57ab661e29877f6828b9073a9f8/src/backend/px-manager.c#L615 I think it's function in libproxy and not glib ^
-
meson
Ah
-
zak
Yes, I found that. Now which version of libproxy does glib-2.78.0 and glib-2.80.3 use?
-
meson
Sorry, I didn't read correctly.
-
lovetox
hm
-
lovetox
probably 0.5.3 in 1.8.4
-
lovetox
and 0.5.4 has a lot of fixes
-
lovetox
for windows proxy resolution
-
lovetox
the thing is now, this looks like libproxy does actually do its job
-
lovetox
and gets the proxies
-
lovetox
it worked before because it didnt resolve any proxies
-
lovetox
and now when reading the error i understand what the problem is
-
lovetox
this company proxies are HTTP proxies, and we need socks5
-
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.
-
lovetox
its fine, i think the company does nothing wrong here
-
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
-
zak
Okay, so maybe you can add some parameter somewhere to tell GLib that?
-
lovetox
yeah would be nice if you could test that
-
zak
Of course!
-
lovetox
its in nbxmpp/tcp.py
-
lovetox
but wait, didnt you say it works for your machine?
-
zak
It works, if I am in the office connected to the company network.
-
zak
But I am at home now and have the notebook here, so I can reproduce the problem and test.
-
lovetox
so i wonder what proxies are returned for you
-
zak
With 1.9.1 I get the two Proxy IP addresses from the company
-
lovetox
but you said there are 2 machines
-
lovetox
the one from your colleague where 1.9.1 does not work
-
lovetox
and yours✎ -
lovetox
and yours where it works ✏
-
lovetox
the logs are from what machine?
-
zak
Yes, that was when I was in the office and my colleague was at home 🙂️
-
zak
Now I am at home, too, and have the problem as well.
-
lovetox
so you are saying when you are not in the company network, then Gajim does not work
-
zak
correct.
-
lovetox
and your company server is public, or are you logged in via vpn or something?
-
zak
VPN
-
lovetox
so can you send me full log now where it does not work
-
zak
I am writing here from another PC... it would be a bit time-consuming
-
zak
Can you tell me what info you need? Or can I just try testing something in tcp.py ?
-
zak
I find only the compiled pyc files however. The Windows installer does not provide the source?
-
lovetox
you can download it from gitlab and place it beside the pyc
-
lovetox
not really understanding how you can fiddle with python files, but cant send me the txt by email ..
-
zak
> you can download it from gitlab and place it beside the pyc I just did that ↺
-
zak
I have the tcp.py open now. Should I try something there, or should I create a logfile?
-
lovetox
self._client.set_protocol(Gio.SocketProtocol.TCP)
-
lovetox
add this around line 42
-
zak
I just sent you an email with a logfile.
-
zak
I added the line and removed tcp.pyc, but I think it did not read it. The pyc file was not re-created.
-
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.
-
lovetox
tryadding
-
lovetox
self._client.props.enable_proxy = False
-
lovetox
zak thanks for the log, but i meant with the env var to see what glib does
-
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.
-
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..." ↺
-
zak
But thats probably not important
-
zak
I sent you an excerpt of the output with the GLib messages
-
zak
enable_proxy=False is probably just a workaround, is it? Or can we generally disable the proxy here?
-
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
-
lovetox
jstein, and how does that fix the problem of your recipient not beeing available?
-
jstein
lovetox, it does not fix that problem, but I have a chance to debug it
-
jstein
my recipient is online, but there is a problem with the communication between the different servers
-
jstein
there are many different flavours of "not available" and I guess that the XMPP provides more than just that
-
lovetox
What version of Gajim are you using?
-
jstein
1.8.4
-
jstein
compiled from source on Gentoo
-
lovetox
i dont think there is more, we usually display all the server gives us
-
lovetox
are you sure the message does not arrive?
-
lovetox
if you can reproduce it, you can open the xml console and see the full error stanza
-
lovetox
or enable debug logging, and look it up when it happens in the log
-
lovetox
but you are trying to debug a problem that happens on the server .. i dont think you will find anything useful
-
lovetox
you need to ask the server operator what could be wrong
-
lovetox
zak, it would be interesting what changes when you are at your company
-
lovetox
because from my understanding if you use a vpn, there should be no difference
-
jstein
lovetox, advanced//debug logging is set to ON
-
jstein
Do you mean that switch?
-
zak
lovetox: I can do another test when I am back at the office.
-
jstein
I think we will investigate a bit more with the xml console now
-
jstein
"gajim.gtk.contact_info | Could not retrieve software version: Task has been cancelled"
-
jstein
is this a message from the local client, or from a request on a user status?
-
jstein
who wants to get which software version?
-
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
-
lovetox
zak, do you find on your windows maschine proxy setting anywhere this
-
lovetox
https://share.hoerist.com/philipp/n6aZ1FgBAOcmxFCW/8117da5b-7654-434d-b93f-4f68ffb59943.png
-
lovetox
if yes, try to put in the address of the xmpp server
-
lovetox
jstein, Gajim wants to get the software version of your contacts divce✎ -
lovetox
jstein, Gajim wants to get the software version of your contacts device ✏
-
jstein
I think it is monocles in that case. Should it work? Is it worth to open a bug ticket?
-
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.
-
zak
So, setting something for the connection is no solution?
-
lovetox
before you said you disabled the proxy
-
lovetox
now the company lets you disable the proxy, but not set an examption?
-
lovetox
im looking for something easy here, the other way is certainly asking the GLib folks whats expected here
-
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
-
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.
-
lovetox
you should not disable it, the proposal was to add the xmpp server to the exemptions
-
lovetox
it seems we need a fall back, if a proxy is configured that does not speak our protocol GLib should try without
-
lovetox
but i just looked up the code in GLib and that option does not exist
-
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.
-
lovetox
and im not sure that is wrong, if i configure a proxy on a system, i expect applications to use it
-
lovetox
there are multiple solutions, and im trying to find out which is the right one
-
zak
So in general, it should be valid that Gajim might need to use the system proxy settings when connecting to an XMPP server?
-
zak
it should probably never use any http proxy server?
-
zak
I am looking at this right now... https://libproxy.github.io/libproxy/method.ProxyFactory.get_proxies.html
-
zak
Unfortunately this is not Python
-
lovetox
you dont need to
-
lovetox
its not a libproxy problem
-
lovetox
lib proxy just finds proxies, and it does that correctly
-
lovetox
GLib simply does not fallback to using no proxy, when in the system proxies are discovered
-
lovetox
can you try setting
-
zak
Yes, but you said, we need SOCKS5 and not HTTP proxies? Maybe we can filter out HTTP proxies
-
lovetox
self._client.set_default_proxy('direct://')
-
lovetox
remove everything else from before
-
lovetox
oh wait thats wrong
-
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?
-
zak
> self._client.set_default_proxy('direct://') Wouldn't this be the same as enable_proxy = False ? ↺
-
lovetox
remove everything you added
-
lovetox
then add `self._client.set_proxy_resolver(Gio.SimpleProxyResolver.new('direct://', None))`
-
lovetox
and check the GLib debug log if it still tries and discovers the proxies
-
lovetox
jstein, do you have an actual problem?
-
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"
-
lovetox
ok gstreamer has nothing to do with any of these
-
jstein
I think the gstreamer message came, when a user sent a media file
-
lovetox
but all your problems could be cause by the server
-
lovetox
yeah you probably miss some plugins to play m4a files
-
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. ↺
-
zak
But is there a difference to enable_proxy=False?
-
zak
Oh no. The battery went out from my notebook, and I just realized I forgot the power adapter in the office 😛️
-
zak
Nevermind, it's late. Thank you very much for your help so far. I will gladly provide more input later.
-
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
-
lovetox
zak, no its not the same, this means we fallback to direct connection if system proxies are not suitable
-
lovetox
but we use the proxies if they are suitable
-
lovetox
enable_proxy=False means never use a proxy
-
lovetox
should be in the next Gajim release, thanks for debugging
-
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.
-
zak
Thanks again and have a good night