Skip to content

Fix SWBs with view-only wallets#1273

Draft
sneurlax wants to merge 7 commits intostagingfrom
fix/swb
Draft

Fix SWBs with view-only wallets#1273
sneurlax wants to merge 7 commits intostagingfrom
fix/swb

Conversation

@sneurlax
Copy link
Member

@sneurlax sneurlax commented Mar 4, 2026

Need to repro this issue:
"""
creating a Stack Wallet Backup puts you into a softlock on Linux, where clicking "Ok" on the "Stack backup saved to:" dialog throws:

[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: PanicException(Unable to send event data through stream: Fail to post message to Dart. (If happen during Flutter hot restart, this may not be a problem.))
#0      SimpleDecoder.decode (package:flutter_rust_bridge/src/codec/base.dart:35)
#1      DcoCodec.decodeObject (package:flutter_rust_bridge/src/codec/dco.dart:25)
#2      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:948)
#3      Future._propagateToListeners (dart:async/future_impl.dart:977)
#4      Future._completeWithValue (dart:async/future_impl.dart:720)
#5      Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:804)
#6      _microtaskLoop (dart:async/schedule_microtask.dart:40)
#7      _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)

BUILD: _BackupRestoreSettings
didChangeAppLifecycleState: inactive
didChangeAppLifecycleState: resumed
Bad state: No element
#0      Iterable.lastWhere (dart:core/iterable.dart:753)
#1      NavigatorState.pop (package:flutter/src/widgets/navigator.dart:5579)
#2      _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1222)
#3      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:345)
#4      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:758)
#5      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:383)
#6      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:353)
#7      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:173)
#8      GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:532)
#9      GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:498)
#10     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:473)
#11     GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:437)
#12     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:394)
#13     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:341)
#14     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:308)
#15     _invoke1 (dart:ui/hooks.dart:372)
#16     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:467)
#17     _dispatchPointerDataPacket (dart:ui/hooks.dart:307)
Another exception was thrown: Instance of 'DiagnosticsProperty<void>'

"""
This should be reproduced and the conditions under which it manifests described better. I stumbled across this with a view-only Monero wallet. The current change attempts to fix an underlying race condition and touches all cryptonote wallets... just need to go thru the steps on this again to 1) reproduce it, 2) confirm the specific conditions in which it can happen, 3) verify the fix is safe (touches all wallets... no bueno...) THEN decide if the SWB process really needs fixing at all

imo it does, not just for cosmetic issues (the fade is contained to the subview/main panel on the right on desktop)

@sneurlax sneurlax changed the base branch from main to staging March 4, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant