Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin manager update loop #45

Open
Fabian42 opened this issue Mar 7, 2017 · 25 comments
Open

Plugin manager update loop #45

Fabian42 opened this issue Mar 7, 2017 · 25 comments

Comments

@Fabian42
Copy link

Fabian42 commented Mar 7, 2017

Description of the Issue

The plugin manager asks for an update every time I try to install an update.

Steps to Reproduce the Issue

  1. Open Plugins->Plugin Manager->Show Plugin Manager
  2. Click on "Install" (no selection of Plugins needed)
  3. Result: Popup "An update is available to Plugin Manager. It is strongly advised that the Plugin Manger is updated before any other plugin is installed or Updated. Would you like to update the Plugin Manager now?"
  4. Click on "Yes".
  5. Restart Notepad++ when it tells you to do it.
  6. Go to Plugins->Plugin Manger->Show Plugin Manager again
  7. Click on "Install" again
  8. Result: The same popup.

In the "Updates" tab there is no update. First there was one for the plugin manager, then I installed that update before installing other plugins, now it's not in the list anymore, but it keeps asking.
Plugin manager version is 1.4.3.

Debug Information

Notepad++ v7.3.2 (32-bit)
Build time : Feb 12 2017 - 23:15:39
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : ON
Local Conf mode : OFF
OS : Windows 7 (64-bit)
Plugins : ComparePlugin.dll CustomizeToolbar.dll MenuIcons.dll NppExternalLexers.dll NppSaveAsAdmin.dll PluginManager.dll RunMe.dll SpellChecker.dll mimeTools.dll NppConverter.dll NppExport.dll

@bruderstein
Copy link
Owner

Can you try removing the PluginManagerPlugins.xml from your plugin configuration directory (probably %APPDATA%\notepad++\plugins\config). Close notepad++, and then check task manager that there are no processes left called notepad++. Then open N++ again and check the plugin manager.

@chcg
Copy link
Collaborator

chcg commented Mar 8, 2017

@brightghost
Copy link

I've been seeing the same issue for a few months. Just tried reinstalling NPP, following the steps @bruderstein posted, and reinstalling Plugin Manager (using Plugin Manager's built-in 'Reinstall' function). Still seeing this prompt regarding a non-existent update to Plugin Manager.

Notepad++ v7.3.3 (32-bit)
Build time : Mar 8 2017 - 03:37:37
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS : Windows 10 (64-bit)
Plugins : ComparePlugin.dll PluginManager.dll mimeTools.dll NppConverter.dll NppExport.dll

@brightghost
Copy link

brightghost commented Apr 7, 2017

Also, I'll mention that Plugin Manager seems to be suffering from some poor/conflicting messaging which complicated trying to diagnose this issue. The NPP 'Plugin Central' page, linked from within the NPP program via the '?'>'Get More Plugins' menu item, lists 1.0.8 as the latest release of Plugin Manager. Additionally, that page links directly to this SourceForge repo, which is serving v.1.0.8 and contains no notice that it has been deprecated, or direction to find this repo which is actively maintained.

@bruderstein
Copy link
Owner

The latest update loop seems to have been caused by an erroneous update to the plugin on the admin site, that list the latest version as 1.4.4. I've just set this back, and it's fine on the development list now.

I'll force-publish the list as it will cause issues for anyone for each update.

I can't tell who or when or why this was done - the new system keeps a history :)

@chcg
Copy link
Collaborator

chcg commented Apr 8, 2017

@bruderstein That was me. Sorry. Thought 1.4.4 might be ready for official release if no issues arise from devlist. How is version 1.4.4 involved in this issue? This kind of issues already happened with 1.4.3. Do you understand the root cause?

@bruderstein
Copy link
Owner

Only the version number was updated, not the link to the updated zip file. So plugin manager says "On, plugin Plugin Manager is at version 1.4.3, but the latest version is 1.4.4, let's install it", which it does, but it just installs 1.4.3 as that is what is downloaded.

The download loop on 1.4.3 before that change I think is the AppData thing - (#54), need to confirm that though.

I wasn't really planning on releasing 1.4.4, as it I don't think it brings anything new for the user (most of the changes I think are code cleanup) - there's some critical fixes in #55, so that will be worth releasing (feel free to review!). When we release via PM, that's a lot of users that get it automatically, so it's a lot of downloads, so I'd prefer we have an agreed plan when we say "this is now available", and when we release PM via PM.

I'm also going to take a look at #54, as I think there's some stuff broken there, so it might be worth merging these two fixes together and releasing them as one.

How about merging the fixes for #52 (in PR #55), and hopefully merging the fix for #54 then releasing that as a new release, after a few days of soak test in the dev list.

@chcg
Copy link
Collaborator

chcg commented Apr 8, 2017

@bruderstein Are you sure? Currently https://npppm.bruderste.in/plugins/view/plugin-manager shows:

Latest version: 1.4.3

Download https://github.com/bruderstein/nppPluginManager/releases/download/v1.4.4/PluginManager_v1.4.4_UNI.zip MD5: 9b1dad977f9eb06f2c19b8b0140c8347
Copy from: plugins\PluginManager.dll To: $PLUGINDIR$\ Validate Directory
Copy from: updater\gpup.exe To: $NPPDIR$\updater Validate Directory

Download via devlist worked fine for me in my tests.

See my review comment on #55.

Could you also go through my latest checkins please. There I fixed some pointer derefs.
And in DirectLinkSearch.cpp backwards iterations with unsigned values with the potential of endless loops. Is DirectLinkSearch still used somewhere. In my test downloads I never got to it, just with the debugger stepping into it.

Is it possible to extend the unittest for issue #55? Would do you think.

@bruderstein
Copy link
Owner

I hadn't even seen that that had been updated too, sorry. I've put it back to 1.4.4.

But, what also needs to be done is to update the list in the old location for 1.3.5 users, and testing that that update happens correctly, otherwise people upgrade from 1.3.5 to 1.4.3, then 1.4.3 downloads the list from the new location, and notifies of an update to 1.4.4.

I would prefer if we agreed when we do this on the plugin manager - it affects a lot of users, and I'd like to be aware when things are going out, and the changes need to be worth it. And, obviously, both locations still need to be updated, as 1.3.5 is still bundled with N++.

I know there are some bug fixes in 1.4.4, but looking through them nothing major (they're very positive changes, but not things that are currently directly affecting users). The DirectLinkSearch was actually used years ago when sourceforge.net used to not provide a download link and only present an HTML page with generated link on it, so it's effectively not used any more, but there's no guarantee it wouldn't be in the future. So, it's good to have the fixes in, but I wouldn't have released them yet - we're going to have to release again with another couple of more serious fixes over the next few days.

@chcg
Copy link
Collaborator

chcg commented Apr 8, 2017

That I wasn't aware of, that 1.3.5 still uses an older server. Thought they will get directly the 1.4.4. Probably I just tested the update from 1.4.3 -> 1.4.4.

I left some comments in the community discussion on the update loop to donho on upgrading the default version bundled with n++ to 1.4.3, but no reaction so far. Maybe the update should be then directly to the fixed version anyhow..

@dail8859 Do you known what donho thinks about updating PM? And do you know what Plugin Admin notepad-plus-plus/notepad-plus-plus@1d59e3e is planned for?

@bruderstein
Copy link
Owner

Wow... Looks like Don is building it himself.

I'll drop him a mail, but if that's the case, then I wish he'd told me sooner - I've spent a lot of time preparing the new admin system etc.

@dail8859
Copy link
Contributor

dail8859 commented Apr 8, 2017

@chcg You would have to ask Don about it.

chcg referenced this issue in notepad-plus-plus/notepad-plus-plus Apr 8, 2017
@chcg
Copy link
Collaborator

chcg commented Apr 8, 2017

@dail8859 Thanks, I left a note on the commit for donho.

@brightghost
Copy link

Thanks all for looking into this. I see some info has been added to the outdated SourceForge repo since I checked so special thanks to whomever took care of that! Do I understand the original issue is believed to be resolved? I checked just now and was seeing the same behavior, but discovered that in fact I'm now seeing the issue #54 which @bruderstein referenced above. I had the NPP-packaged version of Plugin Manager still in %ProgramFiles(x86)%\Notepad++\plugins, while the update had been loaded to %APPDATA% per my configuration. I run as a non-admin user typically. The current build of Plugin Manager was being loaded at launch, and recognizing itself as up-do-date in the plugin list, but still apparently checking the un-loaded older DLL from the application directory when deciding to display this prompt. Even so, GUP.exe was prompting me for admin credentials, so I don't follow why the packaged DLL was not updated, anyway. I'm not quite sure this behavior is being addressed in the proposed change for #54 so I'll make a note there, as well.

@bruderstein
Copy link
Owner

@brightghost thanks for the clarification - we're going to address this AppData issue in #54. There are definitely some inconsistencies with how PM handles AppData and how N++ does it, and from your description I've been able to reproduce the behaviour that it correctly identifies that the latest is installed and running (because AppData wins), but it then says "There's an update to PM, updating is strongly recommended yada yada yada" when trying to update something.

We'll get this fixed ASAP. I'm guessing this is the update loop originally posted.

bruderstein added a commit that referenced this issue Apr 10, 2017
When updating the AppData plugins, also update the registered `Plugin` object for the given name. Previously this was not updated, so when the plugin was looked up by name (actually only done for dependencies and checking Plugin Manager updates) the non appdata version was always used. This manifested itself in #54 (and originally in #45), when the plugin manager would ask to update itself, even though it was not showing an update.

Can be seen here fetching the plugin via `getPlugin(name)`, which uses the `_plugins` map:
https://github.com/bruderstein/nppPluginManager/blob/ea8d624827c5f0cb31a8e5cfcb0ef4c4ef00ab3e/pluginManager/src/PluginList.cpp#L1037-L1040
@Fabian42
Copy link
Author

I can confirm that it still happens: Open PM, click "install" (doesn't matter if anything selected or not), get notification for new version. Install, restart Np++. Open PM, click "install", same message. Like you said.

@chcg
Copy link
Collaborator

chcg commented Apr 10, 2017

Considered to be fixed by #56 released as v1.4.6. Also availability via the server list still needs some time.

@brightghost
Copy link

I can confirm in my environment this is fixed by #56 . After reinstalling NPP with the bundled Plugin Manager and 'AppData Plugins' enabled, updating to 1.4.5 to reproduce the issue, and then manually installing build v.1.4.6 by copying the bundled files into %AppData%\Notepad++\plugins and %ProgramFiles(x86)%\Notepad++\updater, respectively, this issue is resolved.

@chcg
Copy link
Collaborator

chcg commented Apr 18, 2017

Build v1.4.9 is available from the devlist and should finally resolve this issue.

@zeon2017
Copy link

Latest Version of Notepad++ and still have the update loop. The issue hasn't been fixed yet

@chcg
Copy link
Collaborator

chcg commented Jun 13, 2017

@zeon2017 N++ 7.4.1 (32bit) is still bundled with PM v1.3.5 and the update is just done to version 1.4.5, but not v1.4.9. Do you observe this?

@bruderstein Hi Dave, could you please change the server list to directly update from v1.3.5 -> v1.4.9.

@mkamoski
Copy link

mkamoski commented Mar 18, 2018

...
This is still happening to me, as follows.
Start NotePad++.
Start Plugin Manager.
Updates tab says installed version is 1.4.3 and available version is 1.4.9 now for Plugin Manager update.
Run the install process, following prompts, NotePad++ is restarted as part of the process, etc.
Start Plugin Manager again.
Updates says installed version is 1.4.3 and available version is 1.4.9 again.
Do it all again, with the same result.
And on and on and on.
Infinite loops are bad.
This seems to be a bug.
This seems to need a fix.
IMHO.
Running Window 10, fully patched and NotePad++ 7.5.4 here.
Etc.
HTH.
Thanks.
-- Mark Kamoski
...

@cvabanuk3
Copy link

I am too facing similar issue for a while, still it is not allowing me to install Compare Plugin required.

When I try to install compare plugin, it asks me to update Plugin Manager.
Once after updating and restarting, it does the same again and again.

Please find the details below :

![image]
(https://user-images.githubusercontent.com/17154535/38595262-99264502-3cff-11e8-9c0a-7046a80ef735.png)

![image]
(https://user-images.githubusercontent.com/17154535/38595209-4fa771b2-3cff-11e8-9510-cc2c8377858e.png)

@cubanfrog
Copy link

If you still having this issue try running Notepad++ as Administrator and go to:
Plugins->Plugin Manager->Show Plugin Manager->Installed
Select "Plugin Manager" and click Reinstall

@cvabanuk3
Copy link

cvabanuk3 commented Jun 2, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants