Flow-Launcher / Flow.Launcher

:mag: Quick file search & app launcher for Windows with community-made plugins
https://flowlauncher.com
MIT License
7.33k stars 297 forks source link

BUG: Plugin settings still need the plugin to be invoked at least once to display selected/default values #2577

Open Yusyuriv opened 5 months ago

Yusyuriv commented 5 months ago

Other people are also encountering this issue: #2819

Checks

Problem Description

I wasn't sure if I should have created two different issues as these seem to be closely related. Tell me if you want me to separate the JavaScript thing into its own issue.

Python plugin settings now seem to appear, but they don't display the values I chose/the default values until I invoke the plugin at least once after Flow Launcher's restart.

JavaScript plugin settings seem to not display the default/selected values even after invoking the plugin. I had my own JS plugin that I added some dummy settings to to test it. The settings clearly get saved because they do change in the Settings.json file (below), those values just don't display in the UI.

{
  "download_thumbs": "true",
  "search_term": "hello",
  "max_search_results": "10"
}

To Reproduce

These instructions are only for the Python part of the issue as I don't know any public JavaScript plugins with settings.

  1. pm install ChatGPT
  2. pm install FlowYouTube
  3. Open their settings.
  4. Invoke them once.
  5. Open their settings again.

Screenshots

(Python) ChatGPT, before invoking it: Screenshot of ChatGPT, before invoking it

(Python) ChatGPT, after invoking it: Screenshot of ChatGPT, after invoking it

(Python) FlowYouTube, before invoking it: Screenshot of FlowYouTube, before invoking it

(Python) FlowYouTube, after invoking it: Screenshot of FlowYouTube, after invoking it

(JavaScript): Screenshot of JS issue

Flow Launcher Version

1.17.2

Windows Build Number

10.0.23580.1000

Error Log

I don't think the log contains anything relevant, but here it is just in case.

```shell 22:03:26.9121+06:00 - INFO - App.OnStartup - Begin Flow Launcher startup ---------------------------------------------------- 22:03:26.9121+06:00 - INFO - App.OnStartup - Runtime info: Flow Launcher version: 1.17.2 OS Version: 23580.1000 IntPtr Length: 8 x64: True 22:03:27.1673+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <2ms> 22:03:27.1673+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <3ms> 22:03:27.1673+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <3ms> 22:03:27.1673+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <14ms> 22:03:27.1673+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <0ms> 22:03:27.1673+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <14ms> 22:03:27.1673+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <14ms> 22:03:27.1878+06:00 - INFO - CommunityPluginSource.FetchAsync - Loading plugins from https://fastly.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json 22:03:27.1878+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <28ms> 22:03:27.1878+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <30ms> 22:03:27.1878+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <33ms> 22:03:27.2040+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <40ms> 22:03:27.2040+06:00 - INFO - Flow.Launcher.Plugin.Program.Main - Preload programs cost <13ms> 22:03:27.2040+06:00 - INFO - Flow.Launcher.Plugin.Program.Main - Number of preload win32 programs <221> 22:03:27.2040+06:00 - INFO - Flow.Launcher.Plugin.Program.Main - Number of preload uwps <41> 22:03:27.2040+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <3ms> 22:03:27.2040+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <12ms> 22:03:27.2040+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <3ms> 22:03:27.2040+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <14ms> 22:03:27.2040+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <3ms> 22:03:27.2040+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <3ms> 22:03:27.2040+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <44ms> 22:03:27.2260+06:00 - INFO - CommunityPluginSource.FetchAsync - Loading plugins from https://gcore.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json 22:03:27.2260+06:00 - INFO - CommunityPluginSource.FetchAsync - Loading plugins from https://cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json 22:03:27.2260+06:00 - INFO - CommunityPluginSource.FetchAsync - Loading plugins from https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/plugin_api_v2/plugins.json 22:03:27.2383+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <77ms> 22:03:27.2383+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <79ms> 22:03:27.2544+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <62ms> 22:03:27.2544+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <70ms> 22:03:27.2544+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <73ms> 22:03:27.2544+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <45ms> 22:03:27.2544+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <50ms> 22:03:27.2544+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <50ms> 22:03:27.4446+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <277ms> 22:03:27.6388+06:00 - INFO - CommunityPluginSource.FetchAsync - Loaded 147 plugins from https://gcore.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json 22:03:27.6388+06:00 - INFO - PluginManager.InitializePlugins - Total init cost for is <477ms> 22:03:27.9217+06:00 - INFO - App.OnStartup - Dependencies Info: Python Path: C:\Users\username\AppData\Roaming\FlowLauncher\Environments\Python\PythonEmbeddable-v3.11.4\pythonw.exe Node Path: C:\Users\username\AppData\Roaming\FlowLauncher\Environments\Node.js\Node-v16.18.0\node-v16.18.0-win-x64\node.exe 22:03:28.3681+06:00 - INFO - App.OnStartup - End Flow Launcher startup ---------------------------------------------------- 22:03:28.3681+06:00 - INFO - App.OnStartup - Startup cost <1521ms> 22:03:28.4090+06:00 - INFO - ImageLoader.Initialize - Preload images cost <1196ms> 22:03:28.4090+06:00 - INFO - ImageLoader.Initialize - Number of preload images is <73>, Images Number: 73, Unique Items 24 ```
Garulf commented 5 months ago

IIRC some of my plugins don't have any defaults until first run.

JSON based plugins can not load settings dynamically.

Edit: double checked and it's not the case with Flow YouTube hmmm

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 60 days.\n\nAlternatively this issue can be kept open by adding one of the following labels:\nkeep-fresh

github-actions[bot] commented 3 months ago

This issue was closed because it has been stale for 7 days with no activity. If you feel this issue still needs attention please feel free to reopen.

jjw24 commented 3 weeks ago

@Yusyuriv is this still an issue that needs to be reopened?

Yusyuriv commented 3 weeks ago

Yes, I just reproduced the issue both in the latest stable release (1.18.0) and on the dev branch.