-
raghavgururajan
MattJ and/or Zash: The account migration portal (https://migrate.modernxmpp.org/) doesn't seem to work. I get blank page after entering credentials.
-
MattJ
Do you have Javascript enabled?
-
raghavgururajan
I do.
-
raghavgururajan
Ah in different browser, I see "XEP-0156 lookup failed." for one account and blank page for another.
-
MattJ
Interesting, which browser(s)?
-
raghavgururajan
First IceCat, then Surf.
-
raghavgururajan
Regarding terminology (https://docs.modernxmpp.org/terminology/), what is recommended name for subdomain for xmpp server? like im.tld.or or chat.tld.org or ...
-
Sam
In what context? That doesn't seem like the kind of thing you'd mention to the user, so the actual technical term should suffice.
-
Sam
Put another way, I wouldn't talk about domains, I'd talk about "services" such as "chat rooms" or "file upload" or whatever instead.
-
raghavgururajan
The user might access admin panel.
-
Sam
Then they're an advanced user and just calling them domains should be fine I'd think
-
raghavgururajan
I see.
-
jonas’
the recommendation would be "none"
-
raghavgururajan
https://snikket.org/service/quickstart/
-
raghavgururajan
In that example, chat.example.com is used.
-
raghavgururajan
jonas’: Did you mean like example.com apexdomain?
-
greg
Is there a best practice for delivering input validation errors to clients during in-band registration? It looks like I have 2 options, return an error stanza of <not-acceptable/> with a <text> description of the problem, or use a Data Form and put the error in the <field>'s description. Is there a preference with this sort of thing or another way of doing it? Are Data Forms well supported by clients?
-
jonas’
the last question: definitely no
-
jonas’
error + text is the most sensible way to go, if you want to be nice you also return the data which was submitted (that is legal: an IQ error can contain the original request)
-
MattJ
That's on my list of annoying things to remove from XMPP 2.0 :)
-
MattJ
It encourages clients to not track stanzas properly
-
Sam
errors don't always mirror the id anyways and don't always get returned or have a success response so you can't really track anything but iqs in a reasonable way anyways
-
MattJ
Can you give any case where errors don't mirror the id? Because that would be a bug. We had this discussion not long ago :)
-
Sam
Did we? I don't recall the details, but I think it was ejabberd that never did or something
-
Sam
Doesn't matter, even if that part is wrong you can't reasonably track errors because there's not always a success case so you just have to guess at timeouts
-
MattJ
There's always a success case for iq, it's true that in many cases silence on success is the default (e.g. sending a message)
-
Sam
Yes, excepting IQs as I said before.
-
Sam
So you show success on a message payload then 30s later the error is returned. Oops.
-
Sam
or you do nothing, stop tracking, then the error is returned more likely.
-
Zash
For messages you probably have a local message database where you could look it up by id when you get an error, so not sure why you would have a timeout like that.
-
Sam
fair, I guess if I assume that I can store all message IDs for the duration of the session that's fine. I doubt that's always true though.
-
Zash
XEP-0198 would also tell you whether the message at least reached your local server, which would allow marking anything acked as success
-
Zash
And receipts if you need end-to-end confirmation.
-
Sam
For a simple chat client it may be.
-
MattJ
Well the protocol just matches the UI expectations here. You don't indicate success when you send a message, but you may indicate that it was received by your server (198) or by the recipient (184).
-
MattJ
A delayed error is common to many protocols
-
Holger
> It encourages clients to not track stanzas properly
-
Holger
MattJ: What about servers?
-
MattJ
Servers are always correct
-
Holger
Servers receive errors and might do useful things with them.
-
Holger
And might not have the original stanza in MAM or whatever.
-
Zash
`log("debug", "Recevied an error, but whatever, who cares, discarding it");`
-
Holger
What's the advantage in omitting the original stanza?
-
Zash
Smaller stanzas
-
Holger
Omitting IDs would make them even smaller.
-
MattJ
Okay, but if you omit the ID you can't do any sensible tracking
-
MattJ
If you omit the original payload, you can
-
MattJ
If you omit both, you obviously can't
-
Holger
Force servers to track stanzas just for error handling sounds wrong to me. I think it also sounds wrong to me to force clients.
-
MattJ
I really don't understand this perspective at all
-
jonas’
Holger, is there any use case where it helps a requesting entity to get the original request delivered with the error response?
-
jonas’
I haven't seen one yet.
-
jonas’
for IQs anyway
-
jonas’
for messages I'm not sure, for presence I'm most certain it makes no sense.
-
Holger
Yes I ran into that more than once.
-
jonas’
-v then please :)
-
Holger
Sigh as if I _remember_ stuff.
-
jonas’
your git commit log might
-
Holger
MUC service generates e kind of notifications for offline members. On receiving an `error` for a `groupchat` message, it has to decide whether that should trigger a notification. This decision might depend on the payload.
-
Holger
*some kind of
-
Holger
Dunno about IQs specifically. I find the perspective weird to omit potentially useful information if in doubt, rather than vice-versa.
-
MattJ
You can encode "should this error trigger a notification" into a single bit in the id
-
Holger
Yeah, if the notification doesn't include the payload.
-
jonas’
MattJ, not for type="groupchat" unless you are nasty. the IDs are under control of the original sender.
-
jonas’
… at least for the reflection. please don't rewrite MUC IDs randomly, mkay
-
MattJ
I assumed some OOB notification was being discussed
-
Holger
I send out a regular groupchat message, and an error for that should possibly trigger an OOB notification.
-
Holger
Whatever, I don't quite see the relevance of random example use cases of mine, anyway.
-
Holger
Regardless of whether they're valid, you'll have a hard time convincing me the original stanza is useless in principle, for all future use cases.
-
Holger
So I'd be careful with making such an assertion, as that's hard to revert.
-
jonas’
I mean you can't rely on the thing being in there anyway :)
-
jonas’
it is OPTIONAL, which means MAY, which means… nothing
-
Holger
Yes but we could add it to the list of things to add to XMPP 2.0.
-
Holger
Rather than doing the opposite.
-
jonas’
fair
-
jonas’
though as a client dev, I am not particularly fond of having to carry the original XML around
-
jonas’
my parsing discards approximately all things it doesn't know about, so restoring the original XML (even just semantically instead of syntactially) is pretty much impossible in the general (and especially in error) case.
-
jonas’
working with a DOM instead would allow that, but it's also grossly inefficient
-
Holger
Whenever I come up with implementation problems I'm told "that's just your implementation problem" :-)
-
Sam
yah, the original xml thing never seemed useful to me either. Leaving unused things in with the justification "I dunno, might be useful to someone at some point" also seems like a bad thing to do.
-
jonas’
Holger, I mean, I am happy with making my parsing stricter so that the original XML can be reconstructed... but last time I did that, I had to revert it to talk to ejabberd ;P
-
Holger
Due to an ejabberd bug?
-
jonas’
due to code attributes on error elements
-
jonas’
which is not technically a bug
-
jonas’
I'm just being a bit snarky here
-
jonas’
:)
-
jonas’
if we're aiming for the possibility of (energy and memory) efficient XMPP client implementations, I think it's hard to argue in favour of having to keep the original XML somewhere until it is clear that no error response will be sent.
-
Holger
Ah, the RFC392?/XEP-0086 thing?
-
jonas’
yes, probably
-
Holger
Funny, there was a PR to remove support for that just yesterday :-)
-
jonas’
it was mentioned somewhere a few days ago I think
-
Sam
Ot also seems perfectly reasonable to parse the xml, save what you want in database schema/language type system/other serialization and throw the rest away. Always requiring that you also keep the original seems like it just can't work.
-
Zash
Isn't it needed by ... something? MUC probably?
-
Holger
Sam: Only until you decided to accept the stanza, of course.
-
Holger
Zash: The error codes?
-
Zash
`<error code=xxx>` was used by some XEP IIRC
-
Holger
Dunno. MUC has the status codes of course ...
-
Zash
With some luck I'm just confusing it with those status codes
-
Sam
I don't even know if my xml parser would reasonably let me get that info. I could save tokens and re-encode them if necessary I guess. Hope we never sign the original payload or I'd be screwed though.
-
Holger
I'm sure everything will fall apart once we merge that PR ...
-
Holger
kk I understood I'm lost with my desire to receive the original stanza back with errors. Error handling has never been the #1 focus of XMPP :-P
-
Zash
YOLOMPP
-
Sam
Holger: why do you actually want it? I've never seen it used anywhere?
-
Holger
Sam: I mentioned one of my use cases above.
-
Zash
xeps$ ack '<error\ code=' run and be amazed^Wterrified
-
Holger
(I actually implemented that one for a customer who was okay-ish with "won't work for Prosody users".)
-
Sam
I don't see it? What am I missing?
-
Holger
Sam: MUC service generates some kind of notifications for offline members. On receiving an `error` for a `groupchat` message, it has to decide whether that should trigger a notification. This decision might depend on the payload.
-
Zash
"for" how?
-
Holger
Hm?
-
Sam
ahh, yes I see. That makes sense to me at first blush, thanks
-
Zash
"Someone went offline" notifications? Notifications sent to offline members? Something else?
-
jonas’
the middle case
-
jonas’
out-of-band notifications
-
Holger
Ah, yes.
-
jonas’
using type="error" to detect the offlineness
-
jonas’
instead of kicking
-
jonas’
Holger, I find that use case compelling, but IMO it needs a different way than forcing entities to keep the entire deserialized state of stanzas around until they have been processed successfully, really
-
Sam
What jonas’ said.
-
Zash
Like, if the error has a `<body>` then send send something else?
-
Holger
The server _could_ obviously track all stanzas; or hard-depend on MAM or something.
-
Zash
`<history/>` cache!
-
jonas’
tracking all stanzas is about as insane as entities having to keep the XML around :)
-
jonas’
not sure how MAM would help in this situation either
-
jonas’
oh, you could look up the stanza by ID, gotcha
-
Holger
Well I could try to look up the ID.
-
jonas’
if your MAM is indexed on message/@id and not on message/stanza-id/@id
-
Zash
Can you distinguish between an error for a type=groupchat vs type=chat ?
-
jonas’
no
-
jonas’
s/not on/not just on/
-
Zash
This always seemed like an awkward thing, having a type=error and no way to determine what the original type is. Even if you have the rest of the payload.
-
jonas’
indeed. it doesn't matter for IQ much, but for the others it does (presence type="subscribe" errors vs. type="unavailable" errors…)
-
Sam
*nods* let's just fix that part too while we're at it.
-
jonas’
are we even at it?
-
Sam
xmpp 2.0? didn't you just commit to writing that and fixing all the problems? I think that's what I heard.
-
Holger
Yup.
-
Zash
Stuff the whole original stanza in a forwarded-envelope? That'd also preserve say, cryptographic signatures that happened to cover id, to, from
-
jonas’
I'm busy with RIIRing prosody, sorry ;P
-
jonas’
Zash, making things worse? :(
-
Sam
See, Holger heard you too. No backing out now!
-
Zash
Wasn't that the point, people want worse things?
-
jonas’
I don't think so :)
-
Holger
I'm totally fine as long as whatever we come up with is super-complicated.
-
Zash
Every stanza to include an XSLT that is used to generate the error reply, check.
-
jonas’
transpiled to some Lisp dialect because carrying XSLT directly over the wire may be unsafe
-
Holger
Sounds good. Next customer, please.
-
pep.
Didn't we have xslt already in pubsub
-
southerntofu
it's been a few times i hear about "xmpp 2.0" and i've read the "office hours" page: https://wiki.xmpp.org/web/XMPP_Office_Hours/2021-04-13-Notes
-
southerntofu
there's some interesting reflections in there, is that a real project/working-group? are some people gathering feedback on this topic?
-
southerntofu
or is it just codename for every feature someone wants nowadays? :P
-
MattJ
There is no serious active effort right now
-
MattJ
At some point there may well be a new round of the core XMPP RFCs, the persons/people working on that will be responsible for gathering such issues, so it helps to have them written down for sure
-
southerntofu
could we maybe start a public survey of painpoints and ideas across implementations? (a bit like what i've barely started for XMPP spaces)
-
southerntofu
something like that wiki page, but open to more contributions, and a bit more structured?
-
MattJ
Anyone can do anything :)
-
pep.
Do it yourself(tm)