HTTPS: Attachements tab empty + "Failed to retrieve image selection form" + Activity Stream empty

Hello,

I set up an XWiki website on a Mac Mini, using Docker. tomcat/conf and /certs folders are mounted from outside of Docker. This allows me to modify the server.xml and web.xml accordingly, in order to run it via HTTPS.

I can access the XWiki website using HTTPS, which is nice.

The issue I get right now is that I cannot see the Attachments. The field is empty.
Moreover, when going to the “three vertical dots” icon of a page, then clicking on Attachments, I get an error from the web browser, saying it cannot reach the server, “The server unexpectedly dropped the connection […] might be due to server busy”.

I also get the error “Failed to retrieve image selection form” when I want to upload a new attachment from a page, and the Edit image pop up window is empty with a spinning loading icon.

Last issue encountered in HTTPS, the Activity Stream of the Dashboard is now empty. Maybe this 2 issues are strongly related? If I revert to HTTP, everything works as expected.

Everything else seems to work fine, and there is definitely something I don’t understand here with the HTTPS and XWiki… If someone can help me with that, that would be appreciated!

Thanks.

I tried the following too:

<Connector port="8080"
           ...
           secure="true"
           scheme="https">
</Connector>

<
Valve className="org.apache.catalina.valves.RemoteIpValve"
       remoteIpHeader="x-forwarded-for"
       protocolHeader="x-forwarded-proto">
</Valve>

No luck, same issue.

Edit: complementary information, I wanted to set Tomcat itself for using HTTPS, as described here:

Also, I access the XWiki website via a domain name, pointing to a Digital Ocean server and rerouted through WireGuard to the local Mac Mini. Although I assume the aforementioned issue is related to XWiki x HTTPS and not something else, but I might be wrong.

I guess you could check the javascript console of your browser to look for errors and the dev tools in general to check what HTTP(s) request are made and why some are failing. It’s likely that you have some config error somewhere in your setup.

Thank you for your help.
In the javascript console, I spotted this issue, happening only with HTTPS:

[Error] Failed to load resource: La connexion réseau a été perdue. https://<my_domain_name>/bin/get/<page_path>/WebHome?xpage=xpart&vm=attachmentsinline.vm

Same when calling ImageSelectorService

Also, when loading the Dashboard:
[Error] Failed to load resource: La connexion réseau a été perdue. https://<my_domain_name>/asyncrenderer/notifications/display/5ALERT_25xwiki%253AXWiki.<my_name>10_null-728580219/locale/en/request.wiki/xwiki/user/xwiki%253AXWiki.<my_name>/184?clientId=184&timeout=500&wiki=xwiki

Any clue?

Other (maybe useful) info:

When trying several bottom page tabs, such as Information, History or Comments, from the JavaScript console (Network tab) I see that the request went fine, with code 200.
For instance, with WebHome vm: informationinline.vm it is a success.

However, when clicking on the Attachments tab (WebHome vm: attachmentsinline.vm) I get nothing in Response, but Aucun en-tête de réponse (no response header).

Would this has to do with the x-forwarded-for in the server.xml?

I solved the issue. It was a line in the HTTPS config. that upgraded HTTP1.1 to HTTP2. Removing it solved everything.

Thanks.

great!

Solution works!
Removing the line in connector configuration section in server.xml prevents using HTTP2 protocol in tomcat. MaxThreads should be increased to compensate the HTTPS2 advantage.