Ask Your Question
1

How to debug/fix extension installation problems: can't remove it and no descriptoin in Manager

asked 2018-02-19 23:58:17 +0200

Alexander Malahov gravatar image

updated 2018-02-20 00:38:28 +0200

(also posted this to AOO forums)

Here is an example extension I'm trying to make work: hello-libreoffice-extension

It partially works - menu item in "Tools | Add-Ons" is added and it works as expected (shows message box in UI).

However,

  • there is no license notice at installation
  • my extension's version (1.0) is not recognized - when trying to replace, LibreOffice says "version 0"
  • extension is installed for current user, not for everyone as I've scepcified in description.xml
  • after installation (with "Tools | Extensions Manager...") there is no description line under my Extension

And the worst part is that I can't remove (and update/replace) my extension. I know I can just delete files (as described in Cannot uninstall extension in Linux). But that's really too much asking from my user and sure we can do better. The error message is (reformatted it for readability, in original all tokens were delimeted by single space):

(com.sun.star.lang.IllegalArgumentException) 
{ 
    { 
        { 
            Message = "Cannot detect media-type:file:///C:/Users/%D0%B0%D0%BD%D0%BC/AppData/Roaming/LibreOffice/4/user/uno_packages/cache/uno_packages/lu7922basxp.tmp_/hello-libreoffice-extension2.zip",
            Context = (com.sun.star.uno.XInterface) @27d4c9d02e0 
        } 
    }, 
    ArgumentPosition = (short) -1 
}

All in all, it looks like my description.xml is not recognized or is ignored or has failed at parsing stage.

How I've packaged/installed extension (both ways don't work):

  • Uncompressed zip the whole folder, then install with Extensions Manager
  • Uncompressed zip the whole folder, rename file to end with .oxt, close LibreOffice, install by double-clicking on the .oxt file

What's iteresting is that Hanya's MRI extension (which is awesome, by the way) works OK on my installation despite it's targeted on Apache Open Office 4 (there is LO-specific version, but it's serveral years older). I've compared all of mine and his (her?) config files (manifest.xml and description.xml) byte-to-byte, copied tag's name from his configs (to avoid subtle differences like latin e and cirillic е) but all to no avail.

I've re-read dev-guides (1, 2 and others) for like hundred times already, but clearly am missing something. Any tips would be greatly appreciated.

My LibreOffice Version 5.4.5.1 (x64), Build ID: 79c9829dd5d8054ec39a82dc51cd9eff340dbee8

edit retag flag offensive close merge delete

Comments

Originally I've posted this question with language "Developers" instead of "English". And it turns out that means something very different from what I thought :) - browser just refuses to open the page with error "to many redirects". If someone can delete that "developers" version, please do - here is the link

Alexander Malahov gravatar imageAlexander Malahov ( 2018-02-20 00:02:38 +0200 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2018-02-20 19:58:37 +0200

Jim K gravatar image

Be careful to zip the file at the correct level. Here are the steps I followed to get it to work.

  1. From Github, Clone or download -> Download ZIP.
  2. Extract the zip file to "hello-libreoffice-extension-master" with a zip program. I used 7-Zip.
  3. Open the folder, select all files, right-click, 7-zip -> Add to "hello-libreoffice-extension-master.zip". Now "description.xml" should be at the top level inside the zip file, not in a subfolder.
  4. Rename to "hello-libreoffice-extension-master.oxt"

Then double-click to install. Now everything works as expected.

example version 1.0 in extension manager

If there are previous versions of the extension that cause installation to fail, then reset the LO user profile or delete the directory for that extension under user/uno_packages/cache/uno_packages.

edit flag offensive delete link more

Comments

Wow, can't believe I've missed such a basic thing! Subfolder, of course! Big thank you!

Alexander Malahov gravatar imageAlexander Malahov ( 2018-02-21 00:03:55 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-02-19 23:58:17 +0200

Seen: 1,042 times

Last updated: Feb 20 '18