darosior / reckless

C-lightning plugin manager
BSD 3-Clause Clear License
9 stars 6 forks source link

Error on detecting main file during plugin install #14

Open vincenzopalazzo opened 4 years ago

vincenzopalazzo commented 4 years ago

I run this command with the last clightning 0.8.2.1

lightning-cli install_plugin https://github.com/darosior/lightning-qt

It returns with an error, like this


{
   "code": -32600,
   "message": "Error while processing install_plugin: RPC call failed: method: plugin, payload: {'subcommand': 'start', 'plugin': '/media/vincent/Maxtor/sanboxTestWrapperRPC/lightning_dir_one/regtest/plugins/gui/channelsPage.py'}, error: {'code': -32602, 'message': '/media/vincent/Maxtor/sanboxTestWrapperRPC/lightning_dir_one/regtest/plugins/gui/channelsPage.py: Plugin exited before completing handshake.'}"
}

The strange thing that I noted is the plugin takes the wrong file. In these cases, it takes the file channelsPage.py such as the main file

Maybe the problem was this method inside the util.py

https://github.com/darosior/reckless/blob/52d1e192b34f062cfbe99fa300a824124857aa4a/utils.py#L40-L49

I try to make an easy solution on my branch but is only a draft solution.

https://github.com/vincenzopalazzo/reckless/blob/ee72a005d3fdad6c6b4fd6337ff7a39bd3647c9b/reckless.py#L107-L110