ethereum / remix-plugin

161 stars 101 forks source link

`activatePlugin` make sure it is activated before continuing #198

Open yann300 opened 4 years ago

yann300 commented 4 years ago
await this.call('manager', 'activatePlugin', 'source-verification')
await this.call('activatePlugin', 'function1')

when the plugin function1 is called, the plugin seems not to be fully activated, the call fails with Error from IDE : No window attached to Iframe yet . In order to reproduce:

GrandSchtroumpf commented 4 years ago

The engine wait for the plugin to be activated but when it comes to an external plugin (iframe, ...) it doesn't wait for the plugin client to be connected. The main issue here is that there is no way for us to know if the plugin client is going to connect at all. For example maybe the plugin want the user to login before connecting to the IDE. I think that it would goes inside the "timeout" after 10sec, but I still need to try it out.

I'll check how we can solve that.