facebook / flipper

A desktop debugging platform for mobile developers.
https://fbflipper.com/
MIT License
13.31k stars 954 forks source link

Adding, removing, and re-adding a plugin from disk (`.tgz` file) doesn't re-add plugin #3664

Open dallasgutauckis opened 2 years ago

dallasgutauckis commented 2 years ago

🐛 Bug Report

Adding, removing, and re-adding a plugin from disk (.tgz file) doesn't re-add plugin

It appears that re-adding the plugin doesn't extract the tgz to ~/.flipper/installed-plugins; manually doing so and then ALSO re-adding using the UI is the only way to re-add the plugin.

I'm using the linux client 0.143.0

To Reproduce

Workaround

Environment

Linux Mint 20.2 (based on ubuntu focal); Linux 5.4.0-99-generic Flipper client 0.143.0

dallasgutauckis commented 2 years ago

The repro steps are not exactly correct for the workaround as I'm now not able to get the plugin added using this approach

dallasgutauckis commented 2 years ago

So, the installed-plugins dir now has my plugin extracted after installation, but upon restart or reload of flipper it disappears. I then installed the plugin and changed the permissions to prevent deletion and saw in the logs:

Failed to refresh installed plugins: Error: EACCES: permission denied, rmdir '/home/dallas/.flipper/installed-plugins/flipper-plugin-sganalytics/1.0.0'

upon boot.

I'm curious where it's trying to "refresh" from since it's deleting but not re-extracting.

dallasgutauckis commented 2 years ago

Ah, I think the repro step that actually makes reinstalling the plugin work is going into Settings and doing "Reset all state" next to "Reset all local storage based state"

There must/may be some remnant state of "removing" that plugin that sticks around for too long, perhaps?

musikobios commented 2 years ago

The only thing that worked for me. I found the option located in: Cog / Settings / Reset all local storage based state ==> Reset all state

If I try to install a new plugin in shows up correctly in disabled after reload.