Bug 117100 - [Bounty] Request for reinstall after successful installation of an extension started by double-clicking an .OXT file in file manager
Summary: [Bounty] Request for reinstall after successful installation of an extension ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All All
: medium minor
Assignee: Justin L
URL:
Whiteboard: target:24.8.0
Keywords:
: 108460 109060 119150 123222 141621 150396 (view as bug list)
Depends on:
Blocks: Extension-Manager
  Show dependency treegraph
 
Reported: 2018-04-19 09:16 UTC by Chavdar
Modified: 2024-01-03 20:40 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Extension window (146.62 KB, image/png)
2018-04-19 09:18 UTC, Chavdar
Details
Extension replace (73.40 KB, image/png)
2018-04-19 09:19 UTC, Chavdar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chavdar 2018-04-19 09:16:20 UTC
Tested on:
Version: 6.0.3.2
Build ID: 8f48d515416608e3a835360314dac7e47fd0b821
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group

Description:
After successful installation of Bulgarian spelling language pack the user is asked to restart the application. After restart, one is asked once again to reinstall the same language package.

Steps to reproduce:

1.Download language package
2.Install it by double clicking
3.Restart the application when asked

Expected results:
After the application is restarted LibreOffice should start normaly

Actual results:
After the application is restarted a pop up window appears asking if the user wants to replace/reinstall the language pack previously installed.

Additional notes:
It is only reproducible in Linux, in Windows bulgarian language spelling pack is already installed.
Would be nice if Linux version to include bulgarian spelling also.
Comment 1 Chavdar 2018-04-19 09:18:21 UTC
Created attachment 141484 [details]
Extension window
Comment 2 Chavdar 2018-04-19 09:19:16 UTC
Created attachment 141485 [details]
Extension replace
Comment 3 Mike Kaganski 2018-04-19 10:18:38 UTC
Yes, this happens if LibreOffice *was not running* when user installs an extension by double-clicking a downloaded extension. In this case, the command line used to launch the program contains the extension to install, and when restarting, this command line argument is used again - starting "reinstall".

For information: it is absolutely safe to just refuse to reinstall.

Setting NEW.
Comment 4 Mike Kaganski 2018-04-19 11:37:51 UTC
Somewhat similar problem was solved in commit 0fda52cc4a5c78c55f96850faa734ea66891808c; still it's not an equal problem.

To those who decide to fix this: at least these scenarios must be handled:

1. After restart, in still running instance where duplicate installation was suppressed, user decides to install another extension (either opening from this instance's manager, or from launching the .oxt from a file manager) - the new installation must not be suppressed;

2. After restart with suppressed reinstall, user does something that initiates new restart (like configuring Java, installing other extensions, etc.) - this time, the initial (and possibly new) reinstall also should be suppressed;

3. The flag (e.g., if it is written into user profile) must not interfere with subsequent launches (not restarts from this sessions): e.g., if user decided not to restart now, but next day cold-launches LO installing another extension.
Comment 5 Mike Kaganski 2018-04-19 11:42:57 UTC
See also the commit b2c6c91391f01faa287de18e59e4762031ef6ddc, which initially mentioned this problem.

Based on that commit's date, setting first affected version to 5.3.
Comment 6 Mike Kaganski 2018-07-19 10:24:56 UTC
Possibly one of these implementation variants could be used to workaround this:

Variant 1. If soffice.bin was launched with an .OXT file as its argument, then (a) require it to be exclusive parameter; and (b) shutdown after closing the extension manager (no restart in this case).

Variant 2. Alternatively, simply don't use restart dialog in this case. Use old warning about "restart required".

Variant 3. A large-scale change: when starting first time, fork a process without fileopen command line arguments, and then pass them to this "clean" process using usual interprocess means as we do for following launches. This would allow to have the primary soffice.bin to restart safely without reloading documents (and extension package files) from old command line.

Variant 4. Cleanup all fileopen/print arguments from the guards that manage restarts (e.g., soffice.exe on Windows), so that when restarting, they would not repeat using those arguments again. Problem: first launch of soffice.bin that initializes user profile: restart after this should repeat all the command line arguments. Maybe introduce a dedicated return code like "restart repeating full command line".
Comment 7 Xisco Faulí 2018-08-08 09:12:45 UTC
*** Bug 119150 has been marked as a duplicate of this bug. ***
Comment 8 Telesto 2018-08-08 20:36:57 UTC
*** Bug 109060 has been marked as a duplicate of this bug. ***
Comment 9 Gabor Kelemen (allotropia) 2018-12-20 12:54:46 UTC
*** Bug 108460 has been marked as a duplicate of this bug. ***
Comment 10 Shantanu 2019-08-07 05:02:59 UTC
*** Bug 123222 has been marked as a duplicate of this bug. ***
Comment 11 Jean-Pierre Penelle 2021-06-25 18:12:48 UTC
erreur 1714 installation précédante n'a pu etre suprimé
Comment 12 Shantanu 2022-08-14 05:59:36 UTC
*** Bug 150396 has been marked as a duplicate of this bug. ***
Comment 14 Buovjaga 2022-12-13 12:10:02 UTC
*** Bug 141621 has been marked as a duplicate of this bug. ***
Comment 15 Commit Notification 2024-01-03 04:52:29 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4963fc47a0381967246e15479bf79bb58dddc465

tdf117100: do not attempt to re-install extensions on restart

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Tex2002ans 2024-01-03 20:40:01 UTC
Fantastic, Justin. Thanks for the bugfix!

I was getting this "double popup" for years with LanguageTool's OXT, even while helping friends install it over webcam.

Great to see it's finally squished. :)