Settings deleted after plugin updates

After plugin updates I receive some mails from users who state that their plugin settings were lost after the update. It happens on different plugins.

I am using JSON files in the plugin data folder for saving the settings.

I can’t reproduce the issue but as after almost every update I receive mails from customers about it I want to ask if someone else has such problems?

1 Like

Yes, this has been happening intermittently on my plugins too. I am storing the software activation in the pluginData folder which is just a .txt file and well as some presets as .csv files. I’ve had users lose these.

1 Like

Does Local or SecureStorage get wiped during an update

1 Like

Thanks for confirming @ddbell

@IanBarber I don’t think so. But there are some caveats. Here more about it: https://www.adobe.io/photoshop/uxp/guides/uxp_guide/uxp-misc/file-access/#secure-storage

@kerrishotts Are you aware of these issues? Any tips for helping the team to debug?

1 Like

@ddbell I am just about to think about storing activation details for the plugin.
Was there any reason why you chose the pluginData folder over local or secure storage ?

1 Like

Just keeping it simple was the main reason.

1 Like

I’ve asked around internally, here’s what I was able to find out:

The settings aren’t supposed to get deleted with plugin updates. However, weird things can happen, and there are several reasons why settings can get deleted. Those could be ranging from uninstalling the plugin to re-install it if the update, for whatever reason, fails, to some really weird edge cases. Presumably, there are also some edge cases where the update itself might fail, etc.

All in all, the data should, therefore, persist and data getting lost gets considered a bug (if you have “all available information”, please pass feel free to send it to us), but the reality is: While I’m sorry to say this, there are just too many reasons why data could get lost (many of which are outside our control) and it is, because of this, incredibly difficult to track these down (I mean, we all know the feeling of plugin users sending us emails about bugs where we have no idea how to reproduce them :stuck_out_tongue:).

All in all: If you have detailed explanations of reproducible cases where this happens, please feel free to pass this info along to us (it is, officially, “a bug”). Other than that, I can only recommend not to store critical data there (i.e.: we, unfortunately, can’t guarantee for that data to be persistent).

Even though that’s probably not the answer you were hoping for, I hope it still helps a bit :slightly_smiling_face:

Happy coding,
Pablo