Flow.Launcher: Plugin fails to install if already downloaded

Describe the bug/issue If the plugin zip is already downloaded, installing the plugin will fail. This can happen when python is required for the plugin but it is not found after the user enters its location. When the user puts the correct location of python and tries to install the plugin again, it fails.

To Reproduce Steps to reproduce the behavior:

  1. Install steam plugin
  2. Fail to locate python
  3. Restart flow launcher
  4. Locate python in Settings
  5. Install steam plugin

Your System

Windows build number: 22000.376
Flow Launcher version: 1.9.1

Flow Launcher Error Log

10:49:59.1102+00:00 - ERROR - PluginsManager.InstallOrUpdate - An error occured while downloading plugin
EXCEPTION OCCURS: System.IO.IOException: The file 'C:\Users\me\scoop\apps\flow-launcher\current\app-1.9.1\UserData\Plugins\Steam Search-3.0.4.zip' already exists.
   at SafeFileHandle System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
   at SafeFileHandle System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
   at new System.IO.FileStream(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options) x 2
   at async Task Flow.Launcher.Infrastructure.Http.Http.DownloadAsync(string url, string filePath, CancellationToken token) in C:/projects/flow-launcher/Flow.Launcher.Infrastructure/Http/Http.cs:line 96
   at async Task Flow.Launcher.Plugin.PluginsManager.PluginsManager.InstallOrUpdate(UserPlugin plugin) in C:/projects/flow-launcher/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs:line 154

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 15 (11 by maintainers)

Most upvoted comments

Unless there was an exception during the download & install process leaving behind the unextracted zip file?

Honestly not sure, I can’t find any more info in the logs either. Maybe it’s worth catching such an exception.

(Btw, it’s quite hard to sift through the logs because of hundreds of Flow.Launcher.Plugin.WindowsSettings.Main.TranslateAllSettings - Resource string for [xxx] not found errors!)

We are planning to remove that 🤣. That’s too much.

Hey @taooceros you have added this to 1.10.0, is it for reducing the warnings from the WindowsSettings plugin?

I think we should fix both either? I have already finish the resource for windowssetting plugin.