breez-sdk icon indicating copy to clipboard operation
breez-sdk copied to clipboard

python, with version 0.2.9.post3 error in receiving a LN payment

Open massmux opened this issue 1 year ago • 9 comments
trafficstars

When receiving a payment.

creation of invoice -> OK when the invoice is paid, the payment is actually received, but in log i see:

breezerbot   | thread 'tokio-runtime-worker' panicked at /home/runner/work/breez-sdk/breez-sdk/libs/target/x86_64-unknown-linux-gnu/release/build/breez_sdk-20ebd4003cca3cf5/out/breez_sdk.uniffi.rs:4732:25:
breezerbot   | callback failed. Reason: AttributeError("'NoneType' object has no attribute 'decode'")
breezerbot   | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

this error seems random. sometimes happens and sometimes not

massmux avatar Nov 23 '23 08:11 massmux

@massmux Are you capturing breez sdk logs? It would help to try and see where that tokio-runtime-worker is panicking.

Are you using version 0.2.9? And are you sure the bindings are ok? The python bindings match the sdk bindings etc?

JssDWt avatar Nov 23 '23 14:11 JssDWt

i am using 0.2.9.post3 python lib, installed with pip

massmux avatar Nov 23 '23 14:11 massmux

@massmux I'm publishing 0.2.9.post4 The CI for 0.2.9.post3 was inadvertently run on a different commit id than sdk version 0.2.9. Hoping that will fix the issue.

JssDWt avatar Nov 23 '23 20:11 JssDWt

@massmux let me know whether 0.2.9.post4 works correctly.

JssDWt avatar Nov 24 '23 08:11 JssDWt

@JssDWt ok i tested with 0.2.9.post4 as suggested.

when receiving a payment i still get:

breezerbot | thread 'tokio-runtime-worker' panicked at /home/runner/work/breez-sdk/breez-sdk/libs/target/x86_64-unknown-linux-gnu/release/build/breez_sdk-2497059bfe672e60/out/breez_sdk.uniffi.rs:4732:25: breezerbot | callback failed. Reason: AttributeError("'NoneType' object has no attribute 'decode'") breezerbot | note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

the payment anyway is gotten but the error is raised

massmux avatar Nov 24 '23 08:11 massmux

Hi @massmux

Can you point in your BreezerBot repo where you think the error is occurring, maybe in the event handling?

It would be great if you could add logging of the SDK so we can see what's going on. Something like (excuse syntax errors):

class SDKLogStream(breez_sdk.LogStream):
    def log(self, l):
        if l.level != "TRACE":
            print(f"[{l.level}] {l.line}")
            
 ...
       
     
 class Wallet(AddressChecker):
    def __init__(self):
        ...
        breez_sdk.set_log_stream(SDKLogStream())

dangeross avatar Nov 24 '23 09:11 dangeross

@massmux several things have been fixed in the bindings recently.

Can you please check if you're still seeing this in the latest v0.2.12?

ok300 avatar Dec 20 '23 08:12 ok300

Ok thanks, i will check the 0.2.12 python package then

massmux avatar Dec 22 '23 07:12 massmux

Any news @massmux ?

roeierez avatar Jan 02 '24 08:01 roeierez

Please reopen if you continue to have issues @massmux

dangeross avatar Aug 19 '24 10:08 dangeross