studiorack / studiorack-app

Audio plugin app, searchable list of plugins to install and share
https://studiorack.github.io/studiorack-site
MIT License
29 stars 0 forks source link

Uncaught exception: address already in use when installing plugins via GUI #4

Closed derkrasseleo closed 2 years ago

derkrasseleo commented 2 years ago

studiorack v.0.0.29 / windows 11

I tried installing a plugin, and after clicking on install, studiorack tries to open a new window, and it throws this error:

image

When I open localhost:3000 in my web browser, it looks like the studiorack homepage (?!) but it's probably the app running. Why does it open a new window and try to start a server on the same port?

Update: happens on multiple plugins (effects and instruments). Also, the installation button now says uninstall, but I don't think the plugin was installed as I can't find it anywhere..

Update 2: After restarting it says install again..

kmturley commented 2 years ago

This error occurs when two processes are running on the same port.

Are you running any web development processes? Otherwise it's more likely that you opened StudioRack twice, and the first time the server was stopped correctly.

Try force closing all StudioRack and node processes and then reopen the app again.

derkrasseleo commented 2 years ago

I know.. The problem is, on Windows at least, when I try to install any plugin, it opens a second instance with an empty window (idk why) and the error is thrown. image

kmturley commented 2 years ago

I spent several nights debugging this issue (have to rebuild the production Electron app every time sigh).

The issue appears to be down to Windows case insensitive paths.

When these commands are called:

studiorack --version
studiorack plugin install studiorack/adlplug/adlplug

My presumption was that it would always call the StudioRack Cli. However Windows is case-insensitive and sees a StudioRack.exe file in the root of the directory. It interprets the commands effectively as:

StudioRack.exe --version
StudioRack.exe plugin install studiorack/adlplug/adlplug

A simple fix for this is just to rename StudioRack.exe for now. This commit should fix the issue: https://github.com/studiorack/studiorack-app/commit/35486caf265e07bffc077e9d501fab848726cebf

Have pushed out a v.0.0.31 release and will test it more throughly tomorrow

derkrasseleo commented 2 years ago

Thank you very much for your effort! This issue seems to be fixed (as in: studiorack doesn't start a new instance when installing plugins), but I'm not sure. Unfortunately, with v0.0.31 I still can't install any plugin. image

kmturley commented 2 years ago

Ah thanks for pointing out. There was a bug with plugin installers (Plugins which have .msi or .exe extension). not having a directory to copy the file into.

I fixed the issue with this commit: https://github.com/studiorack/studiorack-core/commit/9897c46ceb93beb72dd039d7ea83b720f00ae0aa

Ultimately though I trying to avoid plugin installers as they require manual actions to click through, and install files into non-standard directories.

I have converted dexed-win.exe to dexed-win.zip in the release: https://github.com/studiorack/dexed/releases/tag/v0.9.6

To be inline with other plugins. Will gradually work through the other installers to ensure plugins don't require a .msi or .exe file to be installed.