Install a plugin, then close the Preferences window, and when the plugin finishes installing, an error is thrown.

So it's failing here https://github.com/electron/electron/blob/master/lib/browser/rpc-server.js#L150-L151. Too bad there's nothing point us to where in our code.
It's either this https://github.com/wulkano/kap/blob/49bc64cb3bba1c6089b240d9c227b5234a8b168c/app/src/main/index.js#L419 or this https://github.com/wulkano/kap/blob/49bc64cb3bba1c6089b240d9c227b5234a8b168c/app/src/main/index.js#L424, as they're the only ones with a .sender property.
I tried removing them but got the error anyway. It could be https://github.com/electron/electron/blob/master/lib/browser/rpc-server.js#L153 too which is why we don't get the correct error.
Works if we install/uninstall the plugins from the main process instead of directly calling the plugin API via remote.require. I'm working on an implementation.