darosior / reckless

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

More sanity checks #10

Open darosior opened 4 years ago

vincenzopalazzo commented 4 years ago

Hi @darosior,

I want to share with you a stack trace that I received today.

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

Do you have any idea about why this error happened? There is some logic inside the for that I don't understand?

darosior commented 4 years ago

Hi,

You should open a different issue to track this.

Do you have any idea about why this error happened?

Yeah, detecting the main file is hard. However it clearly is a regression.

There is some logic inside the for that I don't understand?

No, you spotted the right function.

vincenzopalazzo commented 4 years ago

Hi @darosior,

You should open a different issue to track this.

Yep, but before I want to make a double check with you, I'm opening now.

Yeah, detecting the main file is hard. However, it clearly is a regression.

Yep, is hard because at the moment there is a "plugin conversion about the main". However, we know that the main file contains (with pyln-client) the annotation (maybe annotation is a java naming for @). Maybe, we can try to search this annotation inside the file, but it is a little hard. I will try to make a simple test.

Also, I will open in the next days a PR for tracking the work that I make on this problem.