Docked webview panels throw plugin id already in use on Yak update

Hi @will and team,

We have an issue where if we have our plugin window with a WebView docked and Rhino tries to load a newer version of the plugin, the old version is not cleaned up and Rhino throws a plugin id already in use error.

I’ve put together a repo for minimal reproduction of this error, you can get it to happen pretty easily by deploying it to yak, running the command to show the plugin window and docking it, pushing a new update, then restarting Rhino a couple of times until the new plugin version is loaded.

Repo with instructions for repro: GitHub - gwyllo/yak-update-repro · GitHub

This is a bit of an issue for us because every time we ship an update to the plugin all existing users who are actively using it have to acknowledge an error and decide if they want to never load the plugin again - the opposite of what we would like them to do.

I would be more than happy to continue trying workarounds for this if you have any ideas for fixes.

Thanks for putting together the detailed repro repo. I’ll take a look as soon as I can!

The intended behaviour is that Rhino ignores all installed package version folders other than the one in manifest.txt. I wonder if something related to panels or WebView isn’t honouring this intention…

No worries, really appreciate your help. If there’s something else I can try let me know!

+1 on this bug, if my eto panel is docked it chucks the id in use error until I undock and close it and restart Rhino.

Any chance you’ve found a minute to take a look @will ?

I’m sorry for the lack of communication. I’ve been working on this today and I have a potential solution…

When the panel triggers the loading of the plug-in, we can compare against the latest version installed by the package manager and decide not to load it. This allows the new version of the plug-in to load successfully later in the startup sequence. The downside is that the panel is not loaded.

Curious to hear your thoughts on that side-effect. I’ll discuss this internally too!

Thanks again for putting together the repro plug-in project and for your patience.

Does your Eto panel have a WebView too?

I’ve logged the bug here: RH-94972

Yep, seems like a docked WebView causes the files to be delete protected. My workaround right now is to check the manifest 5 seconds after rhino closes to cleanup any undeleted versions.

Hey @will

No worries, sorry to hassle you. And thanks a lot for taking a look.

I think having the panel not load isn’t the end of the world, it is at least much more user friendly than the error message. I presume that this behaviour of not loading the panel would only occur when there is a new version of the plugin, and not on every Rhino startup?

You’re right, only on the first startup after the plug-in has been updated via the package manager.