Skip to content

Crash on wallet switch: native stopLnd callback fires twice (New Architecture) #3912

@myxmaster

Description

@myxmaster

Describe the bug

When switching to a remote node, and back to embedded LND, the app crashes with SIGABRT:
JavaTurboModule.cpp:125] Callback arg cannot be called more than once

Sequence:

  1. stopLnd() is called during wallet switch -> succeeds
  2. startLnd() is called -> throws LND_ALREADY_RUNNING (Go/Java state mismatch)
  3. The error handler in startLndWithRetry calls stopLnd(..., forceStop=true) again
  4. The native stopLnd callback fires a second time
  5. TurboModules (New Architecture) enforces single-invocation on callbacks -> fatal abort

On the old Bridge architecture this was silently ignored. TurboModules treats it as a fatal error.

Reproduce

start embedded LND, switch to remote node, switch back to embedded LND

ZEUS version

v0.13.0

Node interface

Multiple (specified in comments)

Network

Clearnet

Device

Samsung Galaxy S20+

Device operating system

Android 13

Log output

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions