You are here

[Fixed] KeePassPro - PluginCache in AppData

29 posts / 0 new
Last post
AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
[Fixed] KeePassPro - PluginCache in AppData

Is it normal to have PluginCache (some folders and files in them) at "%USERPROFILE%\AppData\Local\KeePass\PluginCache"?
KeePassProPortable is not even on but the folder is still there for the whole time.

John T. Haller
John T. Haller's picture
Offline
Last seen: 14 hours 19 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Change Something?

By default, it is configured to use Data\PluginCache. Did you change something or manually move some files around?

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
I didn't change anything. I

The only thing I did is: I put KeePassHttp.plgx into "KeePassProPortable\App\KeePassPro\Plugins". It's a plugin for connecting Google Chrome with KeePassPro.

John T. Haller
John T. Haller's picture
Offline
Last seen: 14 hours 19 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Can't Reproduce, Check INI

I tried reproducing this and the cache for KeePassHttp.plgx is saved to KeePassProPortable\Data\PluginCache as expected. Would you please explore to KeePassProPortable\Data\settings and open up your KeePass.config.xml file in Notepad++ or similar. Find the entry <PluginCachePath> and see if it is properly set to <PluginCachePath>{APPDIR}\..\..\Data\PluginCache</PluginCachePath>.

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
I don't have such an entry as

I don't have such an entry as:
PluginCachePath
The only entry which has Plugin in its name is:
PluginCompatibility

John T. Haller
John T. Haller's picture
Offline
Last seen: 14 hours 19 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Copy Own Settings In?

Did you at some point copy your own settings in? That entry is in the KeePass Pro Portable default settings on first launch.

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
Unfortunately I can't

Unfortunately I can't remember and cannot rule out such possibility. I have been using the portable version since 2019 but before that I used a regular version. I definately did copy the database so I might have also copied over the settings from the regular version to the portable one as well.

What should I do now? Remove the settings file and set it up like a fresh new installment? I can see PluginCachePath in the config file in DefaultData. Maybe I can just copy it over to my current config file? Unless my config file is not missing any other entries from the portable version. Are you aware of other portable-related entries in the config file?

John T. Haller
John T. Haller's picture
Offline
Last seen: 14 hours 19 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Add It To Yours

Close KeePass Pro Portable. Open up the settings file you see in DefaultData. Find the PluginCachePath line and copy that whole line. Open up your existing one within Data. Paste that whole line just above the line </Application> and then save it. You should be good to go.

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
I did it just before you

I did it just before you posted but I pasted PluginCachePath right after /TriggerSystem line and before PluginCompatibility line, so it is the same way as in the original config in DefaultData.
So far it works like a charm. PluginCache folder was created at "KeePassProPortable\Data".So I deleted the PluginCache located at "%USERPROFILE%\AppData\Local\KeePass". The folder was not re-created there so everything looks just fine.

By the way, I've been wondering, maybe it would be a good idea to have Plugins folder also at "KeePassProPortable\Data", next to PluginCache and settings?

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
The issue is back.

The issue is back. PluginCache is being re-created at "%USERPROFILE%\AppData\Local\KeePass" despite the fact that the configuration file stored at "PortableApps\KeePassProPortable\Data\settings\KeePass.config.xml" contains:

{APPDIR}\..\..\Data\PluginCache

Any idea what's going on?

SimonGeek
Offline
Last seen: 1 year 2 months ago
Joined: 2022-07-24 01:22
It depends on the plugin

It most likely depends on the plugin and not KeePass Pro Portable.

Can you please indicate the source where you got the plugin? Perhaps you can notify the developer of the issue.

You can make these changes to fix the problem:

1) Open the file "KeePassProPortable.ini" present in "App\AppInfo\Launcher" with Notepad++

2) After section "[Activate]" add:

[DirectoriesMove]
LocalPluginCache=%LOCALAPPDATA%\KeePass\PluginCache

3) After section "[FilesMove]" add

[DirectoriesCleanupIfEmpty]
1=%LOCALAPPDATA%\KeePass

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
I have only one plugin -

I have only one plugin - KeePassHttp and in that PluginCache folder I have two files:
1. KeePassHttp.dll
2. Newtonsoft.Json.dll
I had the same plugin a few months ago when I started this thread. It's weird to see the issue is back again.

John T. Haller
John T. Haller's picture
Offline
Last seen: 14 hours 19 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Hardcoded Plugin?

Perhaps a plugin is hard coded to use that local path. I'd try removing them both and trying them one at a time to determine which. Maybe there was an update?

To work around this, adding these after [Activate] to the KeePassProPortable.ini within App\AppInfo\Launcher should handle it:

[DirectoriesMove]
LocalPluginCache=%LOCALAPPDATA%\KeePass\PluginCache

[DirectoriesCleanupIfEmpty]
1=%LOCALAPPDATA%\KeePass

Sometimes, the impossible can become possible, if you're awesome!

SimonGeek
Offline
Last seen: 1 year 2 months ago
Joined: 2022-07-24 01:22
LocalPluginCache incorrect

LocalPluginCache=%LOCALAPPDATA%\KeePass\LocalPluginCache

The local folder I think it's called "PluginCache". I had set the save as "LocalPluginCache" to prevent it from conflicting with the folder already in Data. Ideally this way both configurations should be saved.

If you prefer to save the configuration in the same folder maybe it would be a setting like:

[DirectoriesMove]
PluginCache=%LOCALAPPDATA%\KeePass\PluginCache

John T. Haller
John T. Haller's picture
Offline
Last seen: 14 hours 19 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Fixed

My bad. Yes, we'll keep it separate just for misbehaving plugins.

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
I did as you suggested and it

I did as you suggested and it works! Once the app gets shutdown, KeePass folder disappears from %LOCALAPPDATA% and moves to "\PortableApps\KeePassProPortable\Data\LocalPluginCache". Thank you!

SimonGeek
Offline
Last seen: 1 year 2 months ago
Joined: 2022-07-24 01:22
Problem solved

Glad to have helped you Smile

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
Any idea what is the reason

Any idea what is the reason that the plugin gets stored in LOCALAPPDATA instead of KeePassPortable directory by default? The plugin hasn't been updated since 2017 so there is nothing on its side that could explain this. I would rather suspect that there must have been a change in the way KeePass handles plugins.

SimonGeek
Offline
Last seen: 1 year 2 months ago
Joined: 2022-07-24 01:22
Development type

Agree with John T. Haller, there was probably a change to KeePass Pro that altered the behavior of the plugin.

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
But it worked fine until one

But it worked fine until one of recent KeePass updates which must have changed something. As I noticed, the plugin hasn't been updated since 2017 so there's no way anything changed in the way it works.

John T. Haller
John T. Haller's picture
Offline
Last seen: 14 hours 19 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Plugin or App

There were no changes to our portablization between when it did work for you and when it didn't. And since the plugin didn't change, a change likely occurred in the app itself. Either way, it's not something we can control other than work around its broken-ness.

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
The issue is back, again!

The issue is back, again!
I've just discovered that folder "PluginCache" is still present at my "%USERPROFILE%\AppData\Local\KeePass\" after shutting down KeePass. When KeePass is running there is a second folder "LocalPluginCache" but it is moved back to PortableApps directory once the application is shut down. Both share the same two files - plugins. However, PluginCache is not moved back to PortableApps when KeePass gets shut down. When I remove the folder it gets recreated on the next launch of KeePass. Both folder share the same files so looks like both are just clones. No idea why it's happening again. Any idea how to fix it?

John T. Haller
John T. Haller's picture
Offline
Last seen: 14 hours 19 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Refixed

This should be re-fixed in 2.55 Rev 2.

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
Yes, it is! Thank you!

Yes, it is! Thank you!
If I understand it right, in this revision, LocalPluginCache at "PortableApps\KeePassProPortable\Data" is copied as PluginCache to "%USERPROFILE%\AppData\Local\KeePass\" once the application gets started. Once it is shut down the folder is being removed from AppData\Local?
In other words:
1. Is there any point in naming PluginCache as LocalPluginCache in KeePassProPortable\Data directory?
2. Why is it being copied (instead of being moved) to AppData\Local\KeePass?

John T. Haller
John T. Haller's picture
Offline
Last seen: 14 hours 19 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
PluginCache

There's already a KeePassProPortable\Data\PluginCache folder that should be used by KeePass Pro. The default KeePass.config.xml has this set via {APPDIR}\..\..\Data\PluginCache within the PluginCachePath setting. Unfortunately, some users have somehow altered this so it's not working. Additionally, some plugins seem to hard code the local path. So it's configured to use both.

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
For me there's

For me there's KeePassProPortable\Data\LocalPluginCache. If I rename LocalPluginCache to PluginCache it gets re-created on next launch. However, in AppData\Local\KeePass there's just PluginCache which is just a copy of LocalPluginCache content. The only plugin I have is KeePassHttp.

John T. Haller
John T. Haller's picture
Offline
Last seen: 14 hours 19 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Local

I've confirmed that the KeePassHttp.plgx stores the plugincache to the local C:\Users\USERNAME\AppData\Local\KeePass\PluginCache directory regardless of any setting within the KeePass.config.xml file. This is correctly moved back and forth. This is working as it is expected to. It's created locally as KeePassProPortable is run and then moved back to KeePassProPortable\Data\LocalPluginCache on exit.

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 2 weeks 6 hours ago
Joined: 2019-03-22 09:18
Thank you for looking into

Thank you for looking into this! For me both LocalPluginCache (at KeePassProPortable) and PluginCache (at AppData\Local) contain files (KeePassHttp.dll and Newtonsoft.Json.dll) when KeePass is running. Once KeePass is shut down PluginCache at AppData\Local disappears. Are you sure those files are moved and not simply copied & deleted on each run/shutdown? It's not of any bigger importance but I'm just curious why for me I have the files in both places simultaneously when the application is running.

John T. Haller
John T. Haller's picture
Offline
Last seen: 14 hours 19 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
By Design

This is by design and works this way on all our apps that use the PA.c Launcher that portablizes. While you can move a file around on the same drive (moving a file from Data to App within a portable app's folders) you can't move it between drives. They're copied to LOCALAPPDATA when the app starts but not removed from the KeePassProPortable\Data directory on purpose. That way, if something crashes and you lose everything, you'd still have the files from the previous run preserved within Data. The KeePassProPortable launcher will recognize a crash and try to restore from it on next run, too.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments