Extensions semi-automatic update

Hello,

Version: 7.5.9.2 (X86_64) / LibreOffice Community
Build ID: cdeefe45c17511d326101eed8008ac4092f278a9
CPU threads: 1; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded

OS is LXLE 20.04 (WM is LXDE).

I’m currently testing extensions semi-automatic update process.

Here’s what I’ve got currently:

  1. I’ve set a web server on localhost, port 8080. The server directory points to updates directory where the extension new version is located (.oxt)
    In this directory, I’ve also created an HelloWorld.update.xml update description file which contains this:
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="https://openoffice.org/extensions/update/2006"
 	xmlns:xlink="https://www.w3.org/1999/xlink">
 	<identifier value="org.libreoffice.jfn.helloworld"/>
 	<version value="2.0"/>
 	<update-download>
 		<src xlink:href="http://localhost:8080/HelloWorld.oxt"/>
 	</update-download>
 </description>
  1. in the extension description.xml I’ve set the version and the update-information accordingly:
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:lo="http://libreoffice.org/extensions/description/2011">
 
<version value="1.0"/>
 
<identifier value="org.libreoffice.jfn.helloworld"/>
 
<update-information>
	<src xlink:href="http://localhost:8080/HelloWorld.update.xml"/>
</update-information>

<display-name>
	<name>HelloWorld enh.</name>
</display-name>
 
</description>

But, when I run the update in Extensions manager:

  1. The new version availability is shown ok
  2. When clicking the Install button, I get an error:

Error while downloading extension HelloWorld enh… The extension will not be installed.

Error while installing extension HelloWorld enh… The error message is: at /home/buildslave/source/libo-core/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx:431
The extension will not be installed.

I had a look at opengrok at the place hinted but… well… can’t understand the code… :frowning:

The web server seems to be ok since the new version is detected (thus the update.xml file is read) and I can download the files from the updates directory using the browser.
I’ve tested using 2 different web servers: python (python3 -m http.server 8080 --bind 127.0.0.1) and miniserve (Rust). No difference.
Hence I think there’s something I’m overlooking in the update description file.

Any hint appreciated.

Best,

Note that, if I replace the http:// link with a file:/// link in all places (description.xml in the .oxts and update.xml in the updates source directory), the update is still detected OK but the install finishes with the same error.
I’ve also added lang=“en” in all <src> elements. No change.


edit

As my OS environment is FR, I have replaced the lang=“en” with lang=“fr”. Still no change :frowning:

I’ve found the solution: the extension download page must be accessed using the http:// or https:// protocol. I can confirm though that the XML description file and the release notes text file can be accessed with other protocols such as smb:// or even file:///.

Of course it is more consistent to access all files using http(s). In any case, the connections must not be hindered with any identification request.