Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate plugin not detected during install #4410

Closed
1 task done
low-batt opened this issue May 13, 2023 · 0 comments · Fixed by #4423
Closed
1 task done

Duplicate plugin not detected during install #4410

low-batt opened this issue May 13, 2023 · 0 comments · Fixed by #4423

Comments

@low-batt
Copy link
Contributor

System and IINA version:

  • macOS 13.3.1 (a)
  • IINA develop ee48143

Expected behavior:
When the user attempts to install a plugin that is already installed IINA asks the user if they want to reinstall the plugin. If the user continues the installation the existing copy of the plugin is replaced.

Actual behavior:
IINA installs the plugin a second time. The duplicate installation is not detected until IINA is restarted:

iina-dup-plugin

IINA log:
14:44:23.199 [iina][d] Installing plugin from GitHub URL: https://github.com/iina/plugin-userscript
14:44:28.353 [iina][d] Loading JS plugin from /Users/low-batt/Library/Application Support/com.colliderli.iina/plugins/.temp.290095C0-DA9F-4477-8B08-644693973EB0
14:44:28.354 [iina][e] The file pref.html doesn't exist
14:44:34.933 [iina][e] The file pref.html doesn't exist
14:44:34.952 [player0 - User Scripts][d] Scripts loaded: 0
14:44:34.953 [player0 - User Scripts][d] []
14:44:35.071 [global - User Scripts][d] Scripts loaded: 0
14:44:49.938 [iina][d] Installing plugin from GitHub URL: https://github.com/iina/plugin-userscript
14:44:51.014 [iina][d] Loading JS plugin from /Users/low-batt/Library/Application Support/com.colliderli.iina/plugins/.temp.7D658AF8-8882-476E-ACD6-811088E42D54
14:44:51.015 [iina][e] The file pref.html doesn't exist
14:44:52.924 [iina][e] The file pref.html doesn't exist
14:44:53.065 [global - User Scripts][d] Scripts loaded: 0

Steps to reproduce:
Run the following command in Terminal to enable the plugin system:

defaults write com.colliderli.iina iinaEnablePluginSystem true
  • Start IINA
  • Click on Settings… under the IINA menu
  • The settings panel appears
  • On the left side of the panel click on Plugins
  • On the right side of the panel click on Install from GitHub…
  • The popup Install a new plugin from GitHub appears
  • In the popup click on iina/plugin-userscript
  • The Install button activates
  • Click on Install
  • The Warning popup appears and displays the permissions the plugin requires
  • Click on Install
  • The settings panel shows the User Scripts plugin has been installed and activated
  • Click on Install from GitHub… again
  • The popup Install a new plugin from GitHub appears
  • NOTE that iina/plugin-userscript shows Not Ins…
  • In the popup click on iina/plugin-userscript
  • The Install button activates
  • Click on Install
  • The Warning popup appears
  • Click on Install
  • The settings panel shows two copies of the User Scripts plugin has been installed
  • Restart IINA
  • Upon restart IINA detects the duplicates as shown above
  • MPV does not have this problem.

How often does this happen?
Every time.

@low-batt low-batt linked a pull request May 20, 2023 that will close this issue
2 tasks
lhc70000 pushed a commit that referenced this issue Aug 20, 2023
* fixed duplicate plugin not detected

* fix crash after uninstalling replaced plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants