Opened 4 years ago
Last modified 2 years ago
#20537 reopened defect
[Patch] Bad installation of plugin
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin | Version: | |
Keywords: | Cc: |
Description
Hello,
I have a bug when installing a plugin.
Open the plugin window in Preference widget.
Install a plugin, and at the end instead of clicking "OK" to leave the plugin window, click "Cancel".
The plugin is downloaded but not installed (not usable), but you cannot install it anymore because it's already installed.
Regards,
alkino
Attachments (7)
Change History (18)
comment:1 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
comment:2 by , 4 years ago
Resolution: | → needinfo |
---|---|
Status: | needinfo → closed |
by , 4 years ago
Attachment: | 1-selection_annotated.png added |
---|
by , 4 years ago
Attachment: | 2-first_ok_annotated.png added |
---|
by , 4 years ago
Attachment: | 3-exit_annotated.png added |
---|
by , 4 years ago
Attachment: | 4-not_installed_annotated.png added |
---|
comment:3 by , 4 years ago
Resolution: | needinfo |
---|---|
Status: | closed → reopened |
Hello,
I encountered the same issue as alkino, therefore I will try to give an enhanced description to reproduce it. I attached pictures to this ticket to try to be clearer.
In this example (i.e in pictures) I will show the problem with the plugin buildings-tools. However all plugins seems to be affected. (At least reverter is also affected as it was with this plugin that I discovered the issue.)
- (picture 1) Selection of the wanted plugins. Then click on "Update plugins"
- (picture 2) A dialog box appear to say that the plugin has been successfully downloaded. Click on "Okay"
- (picture 3) Here is the potential potential. If we click on the "Okay" button of the preference panel everything works well. However if we close the preference panel (top right cross) or click on "Cancel" the issue arise.
- (picture 4) Close JOSM then restart it. The plugins is not listed in the "Installed plugins" and is not activated despite it presence on the system. (For instance in my debian machine in "~/.local/share/JOSM/plugins" the file "buildings-tools.jar" is well present.)
I can understand that the "Okay" button for the preference panel is needed to save configuration changes, however when an "average" user downloads a plugin (and knows that he must restart JOSM to activate it) he may close the preference panel without realizing it. And as, by looking on its machine he will see the corresponding file downloaded in the correct folder he will not understand what happened and how to fix it. (i.e delete the file corresponding to the plugin and repeat the download, cliking on the correct button in step 3.)
Regards,
Keima
comment:4 by , 4 years ago
I agree that the dialog could be improved. I think the "installation" is one step, "enabling" the plugin is another.
comment:5 by , 3 years ago
Just stumbled again about this after fixing #22057, sorry for not doing anything...
I think we should change the plugin preference dialog.
1) The filter All/Installed/Available is quite missleading. I think a plugin is installed when the corresponding jar file was downloaded and the jar is readable and "ready for load", the dialog uses "Installed" for a plugin which is installed and loaded.
2) The "Update plugins" button really just updates the selected plugins, so I think the button text should say "Update selected" or maybe "Update selection". So yes, it is possible to update/download a plugin which is not currently loaded. Unfortunately the version information in the dialog is not updated after the download was done. This is probably correct for plugins which are loaded but seems wrong for plugins which are not loaded.
I'm working on a patch now ...
comment:6 by , 3 years ago
Summary: | Bad installation of plugin → [Patch] Bad installation of plugin |
---|
The simple patch implements the changed filters and the modified button text, but the update of the version info for plugins which are not loaded requires more work. Not sure if it is worth the effort.
comment:7 by , 3 years ago
If we do this, I think we are going to want to have headers for the columns. I've heard a lot of complaints over the plugin installation process (the most common complaint I've heard is "how do I install plugins? The plugin preference panel isn't very clear").
This would probably be easier if we have PluginPreferencesModel
implement TableModel
.
follow-up: 9 comment:8 by , 3 years ago
Thanks for review. I can't remember if I ever had problems to understand the dialog and I have no direct contact to other users, so I am really not the best person to modifiy the dialog. The text "Configure available plugins." could be changed to "Select plugins to be used", maybe that would already make it clearer?
My understanding is that all plugins mentioned in the file site-josm.openstreetmap.de-_pluginicons.txt
are "available plugins", so a user cannot configure this. On the other hand one can install a plugin by placing the jar in the plugin directory and modifying the preferences.xml
, at least I think that's what I did when I developed my first plugin.
comment:9 by , 3 years ago
Replying to GerdP:
Thanks for review. I can't remember if I ever had problems to understand the dialog and I have no direct contact to other users, so I am really not the best person to modifiy the dialog. The text "Configure available plugins." could be changed to "Select plugins to be used", maybe that would already make it clearer?
Maybe? I have some contact with users (I'm on IRC, Discord, and Slack), so I can ask users what text would be clear to them. Whether or not any suggestions they make sense is a different question.
My understanding is that all plugins mentioned in the file
site-josm.openstreetmap.de-_pluginicons.txt
are "available plugins", so a user cannot configure this. On the other hand one can install a plugin by placing the jar in the plugin directory and modifying thepreferences.xml
, at least I think that's what I did when I developed my first plugin.
Actually, you can just put the plugin jar in the plugin directory, and JOSM will pick it up and put it in the list. Also, "Expert mode" users can add additional plugin sites.
comment:11 by , 2 years ago
Someone on OSM World (Woazboat IIRC) suggested something like Debian's synaptic.
Click on checkbox -> Choose one of:
- Unmark
- Mark for Installation (Swooping arrow)
- Mark for Reinstallation (Green checkbox with swooping arrow)
- Mark for Upgrade (swooping arrow up)
- Mark for Removal (red x on green checkbox)
- Mark for Complete Removal (yellow x on green checkbox)
Additional checkbox views
- Upgrade available -> Green checkbox with star
- Not installed -> White checkbox
- Installed -> Green checkbox
by , 2 years ago
Attachment: | 20537.2.patch added |
---|
Add popup menu to determine action, when multiple actions are possible. Also sets background color of component (foreground might work on non-mac systems). The state is not currently used to remove plugin jar files.
Did you restart JOSM?
Deleting the cached plugin should solve it, see preference directories.
Thanks for your report, however your ticket is incomplete and therefore not helpful in its current form.
Please add all needed information according to this list:
To ensure that all technical relevant information is contained, create new tickets by clicking in JOSMs Main Menu on Help → Report Bug.
Remember: This is a generic notice so we don't need to write the same stuff again and again. It may only apply in parts to the specific case!