-
Guus
I've reworked Openfire pubsub code. Can anyone suggest some ways to do some quick functional tests?
-
Guus
I've ran the Smack Integration Tests, which seem to be fine - but those don't go into much detail. I'd like to run some additional tests, preferably not ones created by me.
-
jonas’
aioxmpp has some PEP related tests for sure, and very bare PubSub tests
-
Guus
jonas’ cool - how do I run them?
-
jonas’
Guus, git clone https://github.com/horazont/aioxmpp, you may be able to get some inspiration from https://github.com/horazont/aioxmpp/blob/devel/utils/travis-e2etest-ejabberd.py
-
jonas’
if you adapt the scripts and configs in that repository to work with openfire, that’d be amazing
-
Guus
My understanding of the python language is that 'hssssssss' means that you should step away.
-
jonas’
that py file I linked you is more of a glorified shell script really. I can’t guide you at this moment, I’m supposed to be in a meeting in four minutes
-
Guus
kk, tx
-
Guus
There must be a better way to figure out what modules are needed other than to try and run it, see an error, and install that?
-
Guus
ah: https://docs.zombofant.net/aioxmpp/devel/user-guide/installation.html
-
Guus
I was looking under 'developer guide' 🙂
-
Guus
hmm, still missing modules
-
Guus
ohh, pip3 install -e .
-
Guus
look ma, I can do python
-
Zash
Look ma, no jvm!
-
Guus
heheeh
-
Guus
hmm, it doesn't like Openfire's self-signed certs, even when setting the no_verify option
-
Zash
openssl no_verify?
-
Guus
ah, it helps if you don't have a typo in "no_verify" (jonas: there's a typo in the documentation as well as in the ejabberd config file)
-
Zash
Guus, ever tried running scansion against Openfire?
-
Guus
no. I'd like to.
-
Guus
Ran 4503 tests in 76.160s FAILED (SKIP=4, errors=19, failures=5)
-
Guus
That's an impressive amount of tests.
-
Guus
Loooots of output - might need some help interpreting
-
jonas’
Guus, note that most of these are not end-to-end
-
jonas’
before you go further, what’s the output of python3 --version?
-
Guus
Python 3.6.9
-
Guus
We're disabling SASL anon by default. Can you share the configuration for a simple username/password auth?
-
jonas’
Guus, unfortunately, not
-
jonas’
it needs multiple connections usually
-
jonas’
(with different accounts)
-
Guus
hmm, that makes it harder to put in our CI
-
jonas’
I’m not sure if I ever developed the "pre-provisioned account" mode
-
jonas’
I planned for it, but I think I simply never needed it
-
Zash
Implement (in OF) a mode that simply accepts any username+password?
-
jonas’
then you still need (in aioxmpp) a mode which uses random username/password
-
Guus
It's all doable, but not today 🙂
-
jonas’
same here :)
-
jonas’
but I’d love to test against OF in the CI -- but I never got around to set it up
-
Guus
jonas’ : https://github.com/igniterealtime/Openfire/blob/master/runIntegrationTests
-
Guus
that's what we use for Smack's integration tests
-
Guus
probably more elaborate than what it needs to be
-
Guus
but it launches an openfire instance, and runs the tests
-
Guus
(Smack's implementation require an account that's allowed to create other accounts)
-
Guus
apart from needing to enable SASL anonymous, it worked pretty much out of the box
-
Guus
[global] provisioner=aioxmpp.e2etest.provision.AnonymousProvisioner [aioxmpp.e2etest.provision.AnonymousProvisioner] domain=cluster.goodbytes.im host=cluster-a.goodbytes.im no_verify=true
-
Guus
(note that at some point, that domain goes away - I'm using it for testing only)
-
Guus
Zash, how do I run scansion?
-
Guus
heck, how do I _find_ it. Googling for prosody scansion gives me linguistic results. 🙂
-
Zash
https://matthewwild.co.uk/projects/scansion/
-
Guus
is there a repo of scripts?
-
Zash
There's a bunch in the Prosody repo: https://hg.prosody.im/trunk/file/tip/spec/scansion
-
Zash
Those are written expecting that arbitrary username/passwords are accepted
-
Guus
Doesn't seem to like my self-signed cert either
-
Zash
Pretty sure we run our CI with TLS disabled
-
Zash
Prosody config is in the same directory
-
Guus
hmm... doesn't help
-
Guus
does it do DNS SRV lookups?
-
Guus
the domain in the JID does not resolve with an A record.
-
Zash
Probably
-
Guus
https://igniterealtime.org:443/httpfileupload/94c20187-8fa0-4f98-9d0f-0a1869538173/image.png
-
Guus
Unsure what to make of that
-
Guus
jonas’ I'd be greatful if you can help me interpret the gazillion lines of logs generated by your tests.
-
Zash
screenshot of text :|
-
Zash
Guus: I think you need to trick docker into letting it have access to where your xmpp server is running
-
Guus
screenshot of text to preserve format - didn't assume anyone wanted to copy stuff from this 🙂
-
Guus
ah, it does not have access by default?
-
Zash
"connection refused" is the relevant thing I assume
-
Guus
my docker is as good as my python
-
Guus
sure
-
Guus
but ... why 🙂
-
Zash
Try `--network host` maybe?
-
Martin
Wher is specified how a message should look like when sending the link to a http-uploaded file OOB? Or how is it done that clients show the file instead of the link?✎ -
Martin
Where is specified how a message should look like when sending the link to a http-uploaded file OOB? Or how is it done that clients show the file instead of the link? ✏
-
Zash
Docker is so last years, now it's Kubernetes all the things!
-
flow
Martin, I think this is implementation dependend
-
Zash
Martin, source code of Conversations probably
-
Martin
Yeah, code == specification? ;-(
-
Zash
In theory you just follow XEP-0066
-
Zash
In practice I think you must have the URL both in that and in <body>, and nothing else
-
Martin
Thanks, will figure out.
-
Zash
I'm kinda sad that you can't include a description, which is supported by OOB.
-
Zash
Did anyone get anywhere with XEP-0385 yet?
-
rion
Psi supports 385
-
rion
But currently implementation is incomplete. Works for images and audio messages only. And has some bugs.
-
Martin
> In practice I think you must have the URL both in that and in <body>, and nothing else Ok, that worked. Thanks. 😃
-
Martin
> I'm kinda sad that you can't include a description, which is supported by OOB. That would be really nice.
-
jonas’
Guus, send them to me via email or something
-
Martin
Is it safe to assume that the max file size is always in the value of the second field of the second x in the reply to disco#info?
-
Martin
For the http upload service
-
flow
Martin, that sounds wrong
-
flow
Martin, why not use the field's name?
-
flow
and why *second* <x/>?
-
Zash
wat
-
Martin
Worked here for dismail (ejabberd) and my own server (prosody). Dunno how to access by name without cycling through all.
-
flow
Martin, that is very fragile
-
flow
so it is *definetly* not safe and unsound
-
pep.
Zash, movim also has 385 support
-
Martin
Ok, then I'd better go through all and check the names.
-
Zash
Martin, what language and xml library are you using?
-
flow
and trick question by Zash ;)✎ -
flow
aah, trick question by Zash ;) ✏
-
Zash
pep., /react nice
-
Martin
DISCLAIMER: I am no dev so probably I am holding it wrong anyway.
-
Martin
I am using go and github.com/mattn/go-xmpp
-
flow
Martin, no worries. but you definetly should not settle for quick hacks, especially if they fragile
-
Martin
I did create a struct with the structure of the xml and then xml.Unmarshal the IQ reply into it.
-
flow
that alone sounds worrysome. due to the extensible nature of XMPP the returned XML may not match your struct✎ -
pep.
Martin, you can easily become a developer if you go into your Android settings and tap on "Build number" multiple times. Then it will say "You are now a developer!"
-
flow
that alone sounds worrisome. due to the extensible nature of XMPP the returned XML may not match your struct ✏
-
pep.
It's that easy
-
Martin
Looking at the output it seems the max-file-size is in the value of the second field on the first and second x. But if this is not standardized I will check for the "max-file-size" in var while cycling through all.
-
flow
Martin, it *is* standardized
-
pep.
You need to own a device with android, it's the only requirement for being a developer
-
Martin
pep.: Did that several times already on all of my phones. Thanks, no I can not hide behind "I'm no dev" anymore. :(
-
flow
Martin, it is the value of the max-size-field of the extended disco info form with the type urn:xmpp:http:upload:0
-
Martin
Ok. So it is important to check the field name. That's what I wanted to know. Thanks. :)
-
flow
Martin, not only the field name, you also have to check that you are looking at the right form
-
Martin
About the issue that the struct might not matching if/when something there get's extended I don't know what to do, as somehow I must get the date of that byte array into something I can process.
-
Martin
flow: Meh, why everything must be complicated…
-
flow
I don't think it is complicated, nor that there is a much simpler alternative
-
flow
you could extra the value with a pull parser
-
flow
or mayben even an xpath expression
-
Martin
Hmm, that would be two new things to read up. ^^
-
flow
always a good idea to learn new things :)
-
Martin
It's always exponential growth, I want to do one thing than I need look up three things for that. Number 1 requires me to look up 4 other things, number two requires me to look up 2 new things and numer 3 requires me to look up 3 new things. And every level 2 new thing requires me to look up n level 3 new things. It's never ending. I, as an engineer, don't understand how you devs ever finished your studies because everything is a hydra. ^^
-
flow
the secret is: we are always studying and shaving yaks
-
Martin
You never shave Ge0rg, his avatar is as hairy as always!
-
Martin
So, you think this is sufficient for determining the max-file-size or is it still fragile? https://salsa.debian.org/mdosch-guest/go-sendxmpp/-/commit/9702df6c84a189fbf881c29c9ba07d3e77ae84c8
-
flow
Martin, it is far better, but AFAIKT you do not check if you look at the right form
-
Martin
What to check for? I don't see anything interesting for FORM:
-
Martin
<iq id='1eda7aa0-fd912ef9-30805dc5' type='result' to='go-sendxmpp@mdosch.de/go-sendxmpp' from='files.mdosch.de'> <query xmlns='http://jabber.org/protocol/disco#info'> <identity type='file' name='HTTP File Upload' category='store'/> <feature var='http://jabber.org/protocol/disco#info'/> <feature var='http://jabber.org/protocol/disco#items'/> <feature var='urn:xmpp:http:upload:0'/> <feature var='urn:xmpp:http:upload'/> <x type='result' xmlns='jabber:x:data'> <field type='hidden' var='FORM_TYPE'> <value>urn:xmpp:http:upload:0</value></field> <field type='text-single' var='max-file-size'> <value>104857600</value></field> </x> <x type='result' xmlns='jabber:x:data'> <field type='hidden' var='FORM_TYPE'> <value>urn:xmpp:http:upload</value></field> <field type='text-single' var='max-file-size'> <value>104857600</value></field> </x>
-
Martin
Or do you mean to check which is the http upload component? That's done there: https://salsa.debian.org/mdosch-guest/go-sendxmpp/-/blob/http_upload/httpupload.go#L141
-
pep.
Martin, I think he meant checking FORM_TYPE?
-
Martin
Ok, what is that good for? No need feed me with a golden spoon just direct me at the right xep. But all I see is `<field type='hidden' var='FORM_TYPE'>` which seems quite uninteresting for me.
-
pep.
Martin, the value of that field is what indicates what type of field it is
-
pep.
Which fields you may find in it
-
Martin
Ah, so I need to check for `urn:xmpp:http:upload:0`. Ok thx.
-
pep.
yeah
-
Martin
Ok, am checking for this as well now.
-
Martin
Thanks all for the useful feedback. 😃 If you feel bored someday you can go through the rest, tell me what I'm doing wrong there. 😂
-
lovetox
what priority do i have to set if i dont want to use priority
-
flow
lovetox, define "do not want to use priority"
-
lovetox
i just read i can just leave it out of the presence
-
lovetox
then server assumes 0
-
flow
that's right
-
lovetox
does it do anything if i include priority in a presence to a MUC?
-
flow
that's a good question. I think the priority in directed presence stanzas it not used anywhere
-
flow
but I could be wrong. A server dev could may say more about this
-
flow
but then again, *why* do you want to include a priority value in a directed presence?
-
lovetox
i dont want to, and i dont do it
-
lovetox
but i have no rational for it