Bug 114708 - Error installing extension with a space in the filename; installing in a folder with a space in the name fails too
Summary: Error installing extension with a space in the filename; installing in a fold...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 80959 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-12-27 04:30 UTC by Mark
Modified: 2023-04-26 03:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sample extension (2.34 KB, application/vnd.openofficeorg.extension)
2017-12-27 07:17 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark 2017-12-27 04:30:26 UTC
Description:
If you attempt to install an extension with a space in the filename LibreOffice throws an error like this:

(com.sun.star.uno.RuntimeException) { { Message = "<class 'FileNotFoundError'>: [Errno 2] No such file or directory: '/home/mark/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu25024oiu60e.tmp_/LOC%20(1).oxt/loc.py', traceback follows\X000a  /usr/lib/libreoffice/program/pythonloader.py:94 in function getModuleFromUrl() [fileHandle = open( filename, encoding='utf_8' )]\X000a  /usr/lib/libreoffice/program/pythonloader.py:149 in function writeRegistryInfo() [mod = self.getModuleFromUrl( locationUrl )]\X000a\X000a", Context = (com.sun.star.uno.XInterface) @0 } }

The space in the filename is introduced by the user's browser when downloading an ectension and a previous version still exists in the download location. The workaround is to remove previous versions before downloading a new extension or to manually rename the file after downloading. The bracketed number is not a problem; it is specifically the space in the name which causes LibreOffice a problem.

The extension partially fails to install. It does not show up in the list of installed extensions but if you attempt to install an extension with the same version number it will say the extension is already installed and ask whether to replace it.

Steps to Reproduce:
1. Download any extension. Download it again (resulting in a name like "LOC (1).ext"
2. Try to install it.
3. LibreOffice throws an error.

Actual Results:  
Extension is partially installed. It doesn't appear in the list of installed extensions and cannot be used, but attempting to install a well-named extension with the same version number says the extension is already installed.

Expected Results:
Handle a filename with embedded spaces gracefully.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Either make it work, or explain it will not work and do not leave the extension in an inconsistent state.

Version: 5.1.6.2
Build ID: 1:5.1.6~rc2-0ubuntu1~xenial2
CPU Threads: 2; OS Version: Linux 4.10; UI Render: default; 
Locale: en-GB (en_GB.UTF-8); Calc: group

and
Version: 5.3.5.2
Build ID: 50d9bf2b0a79cdb85a3814b592608037a682059d
CPU threads: 4; OS: Linux (misparsed version); UI render: default; VCL: kde4; Layout Engine: new; 
Locale: en-GB (en_GB.UTF-8); Calc: group


User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36
Comment 1 Xisco Faulí 2017-12-27 07:16:29 UTC
Reproduced in

Version: 6.1.0.0.alpha0+
Build ID: 2bf1cc7372088ec31ac5f0fb60de57feda59d3b7
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

and

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 2 Xisco Faulí 2017-12-27 07:17:04 UTC
Created attachment 138675 [details]
sample extension
Comment 3 QA Administrators 2018-12-28 03:46:08 UTC Comment hidden (obsolete)
Comment 4 Rob Snelders 2019-01-06 10:23:37 UTC
*** Bug 80959 has been marked as a duplicate of this bug. ***
Comment 5 Rob Snelders 2019-01-06 10:28:00 UTC
I have looked at the issue. But if you use a space-bar in the name of a extension based on python then it breaks. But if you use a basic-based plugin then you can use a space-bar. For example the extension "MultiFormatSave" can be installed when it has a space-bar in the name.

I only tested this on Ubuntu 18.04.1 with LibreOffice 6.1.3.2. Maybe somebody else can test other system-configurations to make sure this is correct.
Comment 6 QA Administrators 2021-01-06 03:59:16 UTC Comment hidden (obsolete)
Comment 7 jeanmarczambon 2021-04-25 17:18:51 UTC
Hi,

This bug is still present in LibO 7.1.1.2 (tested on linux).
Comment 8 QA Administrators 2023-04-26 03:23:30 UTC
Dear Mark,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug