HTTP File transfer not working (Openfire ConverseJS)

Hi, I created an Openfire XMPP server and connected to it using ConverseJS but the only feature that is not working is the file transfer. I installed the HTTP file transfer plugin but when i upload a file, the upload bar shows up but there is no progress.

This is what my log looks like.

2024.01.03 03:54:46 e[32mINFO e[m [pool-7-thread-8]: nl.goodbytes.xmpp.xep0363.Component - Entity ‘testacc2@ubuntutest01/converse.js-9688268’ tries to obtain slot.
2024.01.03 03:54:46 e[32mINFO e[m [pool-7-thread-8]: nl.goodbytes.xmpp.xep0363.Component - Entity ‘testacc2@ubuntutest01/converse.js-9688268’ obtained slot for ‘ai hoshino.jpg’ (12102 bytes). PUT-URL: https://ubuntutest01:7443/httpfileupload/N_05H6O-jj92gKXqmmiJ-_PvbMQ/ai%20hoshino.jpg GET-URL: https://ubuntutest01:7443/httpfileupload/N_05H6O-jj92gKXqmmiJ-_PvbMQ/ai%20hoshino.jpg

it has PUT and get url but no files are being sent or saved.

ubuntutest01:7443/httpfileupload/KgMM41ql6-Zr-Vbv4apgT6o2zNI/ai%20hoshino.jpg:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED

When i check inspect element on converse js app, i get this error. i suspect because im using ubuntutest01 instead of my domain ip ( . how do i fix this ? the server is on ubuntu. do i have to set hostname there?

I believe that you have correctly identified the problem: ConverseJS is trying to use a value to reach the server that does not work.

The HTTP File Upload plugin will tell the client what URL to use to upload and download files. In your example, it uses an URL that includes ubuntutest01. This likely is caused by Openfire being configured using the XMPP domain ubuntutest01 which is not resolvable through DNS (typically, you’d need an A record, or SRV records to configure things).

You can either:

  • configure DNS to make the lookup work
  • reinstall Openfire to use an XMPP domain name that can be resolved through DNS by clients.
  • configure the HTTP File Upload plugin to modify the URL that it sends to clients. This can be done by modifying various ‘announce’ settings. This is documented in the readme of the plugin: HTTP File Upload Plugin Readme

Yeah, i edited one of the plugin settings so that it resolves to my IP instead of ubuntutest01 and it worked! Thanks for replying.

1 Like