synonymdev / bitkit

Self-custodial Bitcoin and Lightning Wallet for Android and iOS.
https://bitkit.to
MIT License
109 stars 23 forks source link

[Bug]: Refresh Failed toast often seen when reopening app from minimised #2004

Open catch-21 opened 3 weeks ago

catch-21 commented 3 weeks ago

Describe the bug

When I reopen the app from minimised state I often see 'Refresh Failed' 'An error occurred and couldn't refresh the wallet. Please try again.' toast message. A manual refresh will work and there appears to be no connection issue. We should only show this toast when there is a legitimate problem.

Reproduce

  1. Close Bitkit to minimised state
  2. Wait a short while (2-5 minutes)
  3. Reopen Bitkit from minimsed state
  4. Observe 'Refresh Failed' error toast
  5. Perform manual refresh and confirm there is no problem with refreshing

Screenshots / Recording

https://github.com/synonymdev/bitkit/assets/74595920/1ddaad0b-cd00-4a93-a4ba-6ce4a2a319e9

Operating system

Android 13 TKQ1.221114.001

Bitkit version

8908053a3198a167c16a3062fb68282160a63112

Log output

No response

catch-21 commented 3 weeks ago

This appears to be related to when new blocks are minded whilst app is minimised. Reproducible on iOS and android when mining blocks in staging env.

JeanlChristophe commented 1 week ago

@pwltr we still have the same issue on latest internal release (v127). It's now happening very often.