Molunerfinn/PicGo · error

Uninstall plugin failed

Error message

Uninstall plugin failed

What it means

uninstallPlugin throws when the UNINSTALL_PLUGIN RPC via pluginsAdapter.uninstallPlugin(fullName) returns success:false, using result.error or fallback 'Uninstall plugin failed'. The catch block resets the mutating flag so the plugin stays listed if removal fails.

Source

Thrown at src/renderer/store/plugins/actions.ts:244

      await pluginsAdapter.setNeedReload(true)

      useAppStore.setState((state) => {
        if (state.appConfig) {
          state.appConfig.needReload = true
        }
      })
      toast.success(i18n.t('PLUGIN_UPDATE_SUCCEED'))
    } finally {
      pluginStoreActions.setMutating(fullName, false)
    }
  },
  async uninstallPlugin (fullName: string) {
    pluginStoreActions.setMutating(fullName, true)

    try {
      const result = await pluginsAdapter.uninstallPlugin(fullName)
      if (!result.success) {
        throw new Error(result.error || 'Uninstall plugin failed')
      }
      await appActions.hydrateAppState()
      const installedPlugins = await pluginsAdapter.getInstalledPlugins()
      pluginStoreActions.setInstalledPlugins(installedPlugins.map(mapInstalledPluginItem))
      await pluginsAdapter.setNeedReload(true)

      useAppStore.setState((state) => {
        if (state.appConfig) {
          state.appConfig.needReload = true
        }
      })
      toast.success(i18n.t('PLUGIN_UNINSTALL_SUCCEED'))
    } finally {
      pluginStoreActions.setMutating(fullName, false)
    }
  },
  async savePluginConfig (
    fullName: string,

View on GitHub (pinned to 07ec7068a5)

Solutions

  1. Read result.error for the npm/handler failure detail.
  2. Ensure no upload is running and no second PicGo instance holds the plugin directory open, then retry.
  3. Check directory write permissions for the Electron userData/plugin path.
  4. If the plugin is already gone, refresh the installed list to clear the stale entry.
  5. As a last resort, close the app, delete the plugin folder manually, and restart.

Example fix

null
Defensive patterns

Strategy: try-catch

Validate before calling

const installed = useAppStore.getState().pluginsInstalled
if (!installed.some(p => p.fullName === fullName)) {
  // nothing to uninstall; refresh list and return
  pluginStoreActions.setInstalledPlugins(installed.map(mapInstalledPluginItem))
  return
}

Type guard

function isUninstallSuccess(r: { success: boolean, error?: string }): r is { success: true } {
  return r.success === true
}

Try / catch

try {
  await pluginStoreActions.uninstallPlugin(fullName)
  toast.success(i18n.t('PLUGIN_UNINSTALL_SUCCEED'))
} catch (e) {
  toast.error(e instanceof Error ? e.message : i18n.t('PLUGIN_UNINSTALL_FAILED'))
  pluginStoreActions.setMutating(fullName, false)
}

Prevention

When it happens

Trigger: npm uninstall fails in the main process: plugin already removed on disk, files locked by another process (another PicGo instance, antivirus), permission errors in the plugin directory, or handler reporting unknown fullName.

Common situations: Uninstalling while the plugin's uploader/transformer is actively processing an upload; two PicGo instances running against the same config dir; Windows file-locking by AV scanners; manually deleted plugin leaving stale state.

Related errors


AI-assisted analysis of Molunerfinn/PicGo@07ec7068a5 (2026-08-30). Data as JSON: /api/errors/32a15ffea576832f. Report an issue: GitHub.