Litd panics when connecting a new Terminal LNC session on signet
I'm running litd version 0.15.0-alpha commit=v0.15.0-alpha commit_hash=779cf9d6385310d7bf32f9db8521d22bb061bd55
I'm creating a new session with litcli sessions add
I enter the connection phrase into terminal.lightning.engineering/connect/pair
Instead of connecting, litd terminates.
To reproduce
System information
looks Loop related:
goroutine 7140 [running]:
github.com/lightninglabs/loop/assets.(*TapdClient).GetAssetName(0x0, {0x4a859f8, 0xc00084c1e0}, {0xc001e43520, 0x20, 0x20})
github.com/lightninglabs/[email protected]/assets/client.go:155 +0x74
github.com/lightninglabs/loop/loopd.(*swapClientServer).marshallSwap(0xc000b51768, {0x4a859f8, 0xc00084c1e0}, 0xc000e8ea80)
github.com/lightninglabs/[email protected]/loopd/swapclient_server.go:421 +0x291
github.com/lightninglabs/loop/loopd.(*swapClientServer).Monitor.func1({{0x3, {0x0, 0x0, 0x0}, 0x0}, {{0xb9, 0xed, 0x31, 0x1b, 0xdd, ...}, ...}, ...})
github.com/lightninglabs/[email protected]/loopd/swapclient_server.go:469 +0xb8
github.com/lightninglabs/loop/loopd.(*swapClientServer).Monitor(0xc000b51768, 0x10?, {0x4a9a6d0, 0xc0020ad8c0})
github.com/lightninglabs/[email protected]/loopd/swapclient_server.go:532 +0x8dd
github.com/lightninglabs/loop/looprpc._SwapClient_Monitor_Handler({0x3404f60, 0xc00061bd40}, {0x4a90d78, 0xc000df8400})
github.com/lightninglabs/loop/[email protected]/client_grpc.pb.go:709 +0x10a
github.com/lightninglabs/lightning-terminal.(*rpcProxy).StreamServerInterceptor(0xc0006be750, {0x3404f60, 0xc00061bd40}, {0x4a90d78, 0xc000df8400}, 0xc001ee1860, 0x46e3a80)
github.com/lightninglabs/lightning-terminal/rpc_proxy.go:556 +0x1ec
On quick look at the code (added in Jan 2025):
if loopSwap.AssetSwapInfo != nil {
assetName, err := s.assetClient.GetAssetName(
ctx, loopSwap.AssetSwapInfo.AssetId,
)
it looks like perhaps loopSwap.AssetSwapInfo could be non nil while s.assetClient is still nil.
Will loop in the loop team (#loopInLoop)
Seems like the problem might be that by default loop assumes an external tapd vs the embedded one in lit.
Partial fix (as also suggested by @ellemouton) implemented here https://github.com/lightninglabs/loop/pull/970