Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unexpected Error (crash) as savings balance went to 0 #2297

Closed
catch-21 opened this issue Oct 9, 2024 · 6 comments
Closed

[Bug]: Unexpected Error (crash) as savings balance went to 0 #2297

catch-21 opened this issue Oct 9, 2024 · 6 comments
Labels
bug Something isn't working triage This issue needs to be looked over by the team

Comments

@catch-21
Copy link
Contributor

catch-21 commented Oct 9, 2024

Describe the bug

A few minutes after initiating a Manual Setup transfer and boosting the transaction (CPFP), I was sitting on the home page waiting for the transaction to confirm and for my new spending balance to be available when my savings balance went from positive value 384k to 0 (see screenshot 1). I then tapped the savings balance and the 'Unexpected Error' page displayed (see screenshot 2) with the following report:

Error: Text strings must be rendered within a <Text> component.
Component Stack:
    in RCTView
    in Unknown
    in RCTView
    in Unknown
    in StyledNativeComponent
    in Unknown
    in ActivitySavings
    in StaticContainer
    in EnsureSingleNavigator
    in SceneView
    in RCTView
    in Unknown
    in DebugContainer
    in MaybeNestedStack
    in RCTView
    in Unknown
    in RNSScreen
    in Unknown
    in Suspender
    in Suspense
    in Freeze
    in DelayedFreeze
    in InnerScreen
    in Screen
    in SceneView
    in Suspender
    in Suspense
    in Freeze
    in DelayedFreeze
    in RNSScreenStack
    in ScreenStack
    in NativeStackViewInner
    in RCTView
    in Unknown
    in SafeAreaProviderCompat
    in NativeStackView
    in PreventRemoveProvider
    in NavigationContent
    in Unknown
    in NativeStackNavigator
    in WalletsStack
    in StaticContainer
    in EnsureSingleNavigator
    in SceneView
    in RCTView
    in Unknown
    in DebugContainer
    in MaybeNestedStack
    in RCTView
    in Unknown
    in RNSScreen
    in Unknown
    in Suspender
    in Suspense
    in Freeze
    in DelayedFreeze
    in InnerScreen
    in Screen
    in SceneView
    in Suspender
    in Suspense
    in Freeze
    in DelayedFreeze
    in RNSScreenStack
    in ScreenStack
    in NativeStackViewInner
    in RCTView
    in Unknown
    in SafeAreaProviderCompat
    in NativeStackView
    in PreventRemoveProvider
    in NavigationContent
    in Unknown
    in NativeStackNavigator
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in ThemeProvider
    in NavigationContainerInner
    in StyledNativeComponent
    in Unknown
    in RootNavigator
    in RCTView
    in Unknown
    in InactivityTracker
    in AppOnboarded
    in SlashtagsProvider
    in RNCSafeAreaProvider
    in SafeAreaProvider
    in StyledNativeComponent
    in Unknown
    in ThemeProvider
    in App
    in PersistGate
    in Provider
    in ErrorBoundary
    in Root
    in RNGestureHandlerRootView
    in GestureHandlerRootView
    in gestureHandlerRootHOC(Root)
    in RCTView
    in Unknown
    in AppContainer
Stack: Error: Text strings must be rendered within a <Text> component.
    at completeWork (address at index.android.bundle:1:454493)
    at completeUnitOfWork (address at index.android.bundle:1:471571)
    at performUnitOfWork (address at index.android.bundle:1:470872)
    at workLoopSync (address at index.android.bundle:1:469967)
    at renderRootSync (address at index.android.bundle:1:469799)
    at flushSyncWorkAcrossRoots_impl (address at index.android.bundle:1:423743)
    at batchedUpdatesImpl (address at index.android.bundle:1:482345)
    at batchedUpdates$1 (address at index.android.bundle:1:416457)
    at _receiveRootNodeIDEvent (address at index.android.bundle:1:416745)
    at receiveTouches (address at index.android.bundle:1:479907)
    at apply (native)
    at __callFunction (address at index.android.bundle:1:144401)
    at anonymous (address at index.android.bundle:1:142840)
    at __guard (address at index.android.bundle:1:143782)
    at callFunctionReturnFlushedQueue (address at index.android.bundle:1:142798)
Platform: android 14
Version: 1.0.5 (136)
LDK version: ldk-v0.0.123-36-g1027b935fb92b924 c_bindings-v0.0.123.1)
LDK node ID: 03c537950c6e1b62c0ce7923f4933d89999394edcac0f4aca877cd5cfcaec996c9

Reproduce

I'm unsure whether the manual setup and boost are relevant here but this is what I did

  1. Scan lightning node https://1ml.com/node/0296b2db342fcf87ea94d981757fdf4d3e545bd5cef4919f58b5d38dfdd73bf5c9 and initiate a new channel with just spending balance, no inbound liquidity.
  2. Once Transfer activity is visible, tap it and boost (CPFP)
  3. Once activity is boosted, leave the wallet open on home page to wait for confirmation
  4. After 5-10 minutes the savings balance went from 384k to 0
  5. Tapping the savings balance showed Unexpected Error (crash) page

Screenshots / Recording

Screenshot 1

Screenshot 2

Operating system

Android 14

Bitkit version

b3f9f30

Log output

bitkit_ldk_logs_1728449292551.zip

@catch-21 catch-21 added bug Something isn't working triage This issue needs to be looked over by the team labels Oct 9, 2024
@catch-21 catch-21 changed the title [Bug]: Unexpected Error (crash) and savings balance went to 0 [Bug]: Unexpected Error (crash) as savings balance went to 0 Oct 9, 2024
@catch-21
Copy link
Contributor Author

catch-21 commented Oct 9, 2024

I was unable to reproduce by letting a manual setup transfer confirm whilst watching the main wallet page.
I tried twice, one without boost and one with. Both times behaviour was as desired.

@pwltr
Copy link
Collaborator

pwltr commented Oct 10, 2024

No idea why the balance would be wrong but the uncaught error is fixed with #2307

@catch-21
Copy link
Contributor Author

catch-21 commented Nov 1, 2024

@pwltr We've seen the 0 balance a few times recently. @SeverinAlexB reported it happening after initial funding of new wallet via CJIT.

Sev and I also witnessed something that could be related: the double-counting of savings balance after a transfer to spending. It feels to me like sometimes an address/output is either not being included in the balance or is being double-counted. Could this could be the result of simultaneous refreshes occurring, potential race condition?

tracked by #2301

A manual refresh always corrects the balances.

@catch-21
Copy link
Contributor Author

catch-21 commented Nov 1, 2024

This issue is for the uncaught error crash, not zero balance.

@pwltr
Copy link
Collaborator

pwltr commented Nov 2, 2024

JS uncaught error was fixed here

@pwltr pwltr closed this as completed Nov 2, 2024
@catch-21
Copy link
Contributor Author

catch-21 commented Nov 4, 2024

Tested on v1.0.6 (138)
Not seen this in our testing session today. Everyone will regularly perform the action of opening Savings activity so no further testing needed. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue needs to be looked over by the team
Projects
None yet
Development

No branches or pull requests

2 participants