Modify

Opened 4 years ago

Last modified 2 years ago

#20537 reopened defect

[Patch] Bad installation of plugin

Reported by: nicolac76@… Owned by: nicolac76@…
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)

1-selection_annotated.png (135.8 KB ) - added by anonymous 4 years ago.
2-first_ok_annotated.png (143.4 KB ) - added by anonymous 4 years ago.
3-exit_annotated.png (134.6 KB ) - added by anonymous 4 years ago.
4-not_installed_annotated.png (80.3 KB ) - added by anonymous 4 years ago.
20537.patch (2.9 KB ) - added by GerdP 2 years ago.
partly solution
20537.PNG (100.2 KB ) - added by GerdP 2 years ago.
screenshot showing the implemented changes
20537.2.patch (7.0 KB ) - added by taylor.smock 2 years ago.
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.

Download all attachments as: .zip

Change History (18)

comment:1 by skyper, 4 years ago

Owner: changed from team to nicolac76@…
Status: newneedinfo

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:

  • The required parts of the Status Report from your JOSM.
  • Describe what behaviour you expected.
  • Describe what did happen instead.
  • Describe if and how the issue is reproducible.
  • Add any relevant information like error messages or screenshots.

To ensure that all technical relevant information is contained, create new tickets by clicking in JOSMs Main Menu on Helpsource:trunk/resources/images/bug.svg 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!


Last edited 4 years ago by skyper (previous) (diff)

comment:2 by Don-vip, 4 years ago

Resolution: needinfo
Status: needinfoclosed

by anonymous, 4 years ago

Attachment: 1-selection_annotated.png added

by anonymous, 4 years ago

Attachment: 2-first_ok_annotated.png added

by anonymous, 4 years ago

Attachment: 3-exit_annotated.png added

by anonymous, 4 years ago

comment:3 by anonymous, 4 years ago

Resolution: needinfo
Status: closedreopened

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 GerdP, 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 GerdP, 2 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 ...

by GerdP, 2 years ago

Attachment: 20537.patch added

partly solution

comment:6 by GerdP, 2 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.

by GerdP, 2 years ago

Attachment: 20537.PNG added

screenshot showing the implemented changes

comment:7 by taylor.smock, 2 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.

comment:8 by GerdP, 2 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.

in reply to:  8 comment:9 by taylor.smock, 2 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 the preferences.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:10 by GerdP, 2 years ago

Ticket #22082 has been marked as a duplicate of this ticket.

comment:11 by taylor.smock, 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 taylor.smock, 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as reopened The owner will remain nicolac76@….
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from nicolac76@… to the specified user. Next status will be 'new'.
Next status will be 'needinfo'. The owner will be changed from nicolac76@… to nicolac76@….
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.