Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload Failed: Feature not supported by XMPP Server #37

Closed
alexmat opened this issue May 5, 2020 · 10 comments
Closed

Upload Failed: Feature not supported by XMPP Server #37

alexmat opened this issue May 5, 2020 · 10 comments

Comments

@alexmat
Copy link

alexmat commented May 5, 2020

Describe the bug
User tried to upload file via a prosody xmpp server with an external component upload service. Siskin reports the feature is not supported. Other clients have no issue.

To Reproduce
Steps to reproduce the behavior:

  1. Upload file to another user via prosody with external upload service component.

Expected behavior
File is uploaded.

Smartphone (please complete the following information):

  • Device: iPhone8
@alexmat
Copy link
Author

alexmat commented May 5, 2020

2ab387d2_pxyiiQz0SciJjFmWESUx8Q

@hantu85
Copy link
Contributor

hantu85 commented May 5, 2020

Is XMPP HTTP File Upload component configured as a separate component (JID of a subdomain of XMPP server domain) or this feature is advertised on the XMPP domain (not a subdomain)?

I recall the issue with some other Prosody server that had configured HTTP File Upload on the server domain (not a subdomain) and as a result file upload failed. According to the XEP-0363, HTTP File Upload should be hosted on a subdomain, see https://xmpp.org/extensions/xep-0363.html#disco

@alexmat
Copy link
Author

alexmat commented May 5, 2020

Looks like I had the component configured as a module in Prosody. I deleted it from my modules list and have added the following to the config:

Component "upload.mydomain" "http_upload_external" http_upload_external_base_url = "https://mydomain/upload/" ...

The file transfer now works, but I now get a Warning:

"File upload completed but it was not confirmed correctly by your server, do you wish to proceed?"

Hitting yes sends the file without issue.

Is there anything I can do to fix the warning?

@woj-tek
Copy link
Contributor

woj-tek commented May 5, 2020

This is because HTTP Upload component responds with status 200 instead of 201 from specification:

There is no further XMPP communication required between the upload service and the client. A HTTP status Code of 201 means that the server is now ready to serve the file via the provided GET URL.

While 200 also means "OK" we try to adhere to what the XEP says. We decided to show this dialogue in this case.

@alexmat
Copy link
Author

alexmat commented May 5, 2020

Understood. Looks like prosody-filer was recently updated to handle that and I just missed the update: https://github.com/ThomasLeister/prosody-filer/releases/tag/v1.0.2

Thank you for your patience and explaining the solution in detail.

@alexmat alexmat closed this as completed May 5, 2020
@mimi89999
Copy link
Contributor

According to the XEP-0363, HTTP File Upload should be hosted on a subdomain, see https://xmpp.org/extensions/xep-0363.html#disco

@hantu85 Which part of the XEP says that? Also, SHOULD is not MUST. I don't know any other client that has issues with it. Conversations, Gajim, ChatSecure, Dino were able to use it even if it is on the same domain.

@hantu85
Copy link
Contributor

hantu85 commented May 8, 2020

@mimi89999 According to the example. In the XEP actually there is no mention of how to discover that feature, only "use service discovery". Should I use it on the domain? on all components listed by the server? or maybe on the user account? that is not mentioned anywhere in the XEP which entities should be queried for their features to find HTTP File Upload feature. The only guideline to that is an example which we followed.

@woj-tek
Copy link
Contributor

woj-tek commented May 8, 2020

@mimi89999 there is this passage: "A user’s server SHOULD include any known entities that provide such services into its service discovery items." which would indicate that it should not be expected on the main domain.

There was an attempt to clarify it: xsf/xeps#682 but it was closed and in the end it remained as-is...

@mwild1
Copy link

mwild1 commented May 8, 2020

Hey, Prosody dev here. I agree the XEP is unclear on this point. The XEP author has stated that hosting on a domain is reasonable.

Prosody supports hosting the uploads wherever the admin configures it. Due to the XEP ambiguity and the number of clients that have had this same issue, we now tell people explicitly in the mod_http_upload documentation that it must be on a subdomain.

If anyone cares strongly about this issue, please push an update to the XEP and then chase clients. SIskin is just one more client that only checks subdomains, and it won't be the last unless the XEP is fixed.

Right now the easiest solution is just to switch your server to hosting on a subdomain.

EDIT: Added link to documentation.

@m4rkell
Copy link

m4rkell commented Feb 4, 2021

Looks like I had the component configured as a module in Prosody. I deleted it from my modules list and have added the following to the config:

Component "upload.mydomain" "http_upload_external" http_upload_external_base_url = "https://mydomain/upload/" ...

The file transfer now works, but I now get a Warning:

"File upload completed but it was not confirmed correctly by your server, do you wish to proceed?"

Hitting yes sends the file without issue.

Is there anything I can do to fix the warning?

This is work!!! :) Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants