[Solved] How to debug/fix my .oxt installation: can't remove

Discussions about using 3rd party extension with OpenOffice.org
Post Reply
xenon325
Posts: 4
Joined: Sat Dec 09, 2017 3:38 pm

[Solved] How to debug/fix my .oxt installation: can't remove

Post by xenon325 »

(cross-posting this from ask.libreoffice.org/q146900)

Here is an example extension I'm trying to make work: github: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):

Code: Select all

(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
Last edited by xenon325 on Wed Feb 21, 2018 1:22 am, edited 1 time in total.
LibreOffice 5.3 / Windows 10
JeJe
Volunteer
Posts: 2763
Joined: Wed Mar 09, 2016 2:40 pm

Re: How to debug/fix my .oxt installation: can't remove and

Post by JeJe »

Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
hanya
Volunteer
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: How to debug/fix my .oxt installation: can't remove and

Post by hanya »

If you have "zip" file extension, the office recognize the package as regacy package. In that case, description.xml file is not used.
You have to add "oxt" file extension to your package name.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
xenon325
Posts: 4
Joined: Sat Dec 09, 2017 3:38 pm

Re: How to debug/fix my .oxt installation: can't remove and

Post by xenon325 »

Have you tried Extension Compiler?
Nope, I've missed it somehow :/ There is a lot of info in that document, will read it up. Thanks!
You have to add "oxt" file extension to your package name.
That's what I've tried first, but in a wrong way :)

Jim K has nailed it on ask.lo.org - instead of zipping extension's folder content, I was zipping folder itself. As a result, on a top level "my-extension.oxt" archive contained single folder named "my-extension", which contained "META-INF" folder and "description.xml", so that they were not on the top level anymore and that's why they were not recognised by Extension Manager.

P.S. huge thank you for your work - whithout MRI it would take me forever to figure out internal structure of Writer documents.
LibreOffice 5.3 / Windows 10
Stella365
Posts: 2
Joined: Fri Aug 31, 2018 6:50 pm

Re: [Solved] How to debug/fix my .oxt installation: can't re

Post by Stella365 »

I am having the same problem and none of the solutions is working. Is there something else I can try?
OpenOffice 4, Ubuntu 16.04
Post Reply