Skip to content

Conversation

@ben-kaufman
Copy link
Contributor

Fixes infinite load screen and adds retry when back online logic for migration when user has connection issues/ is offline

@claude

This comment has been minimized.

@piotr-iohk
Copy link
Collaborator

From my observation may still persist as the migration screen seems not to disappear (or maybe I should wait a little longer?). First the orange Bitkit intro screen displays for quite a long time, then the migration screen is triggered. It is displayed until the network comes back. Good thing is that it recovers and wallet is migrated successfully.

Tested as follows:

  • have wallet in RN
  • Disable network using Network Link Conditioner
  • Install Bitkit-ios

Logs:
bitkit_logs_2026-01-21_14-30-52.zip

Screen.Recording.2026-01-21.at.15.26.13-1.mov

@piotr-iohk
Copy link
Collaborator

Posted also for bitkit-android: synonymdev/bitkit-android#697

@ben-kaufman
Copy link
Contributor Author

@piotr-iohk in this case it seems internet is detected but is blocked (rather than being detected as not connected). I added a 2 minutes timeout so if the connection is bad/ unstable it will load for 2 minutes then loader will not show, and migration should still finish when user is connected again. Does 2 minutes makes sense?

@claude

This comment has been minimized.

@piotr-iohk
Copy link
Collaborator

Repeated the test:

  • started migration with Network Link Conditioner profile "100% packets lost", for 4-5 mins it was showing Migration screen
  • switched to "very bad network" profile (10% packets lost), after a minute or so migrating screen disappeared , but I only saw lightning balance, no onchain balance, no activities.
  • switched to normal network profile... bitkit did not recover on its own.
  • after the restart of the app all balances recovered.

logs:
bitkit_logs_2026-01-21_18-27-04.zip

It seems the loader did not disappear for me after 2 mins, but 4-5 mins...
The issue is also that the app doesn't seem to recover on its own, but seems separate problem.

@ben-kaufman
Copy link
Contributor Author

I'll check the timing, I think app not recovering on its own when network is back is something different though, since we don't have any auto restart of failed node when connection is back, so we can make a separate issue for this.

@claude

This comment has been minimized.

@piotr-iohk
Copy link
Collaborator

Retested:

Migration with normal network

  • started migration
  • no migration loader screen, Bitkit load screen for a moment and went directly too Homescreen
  • activity tags not migrated in activity list search by tags (although assigned to activities)
    logs: bitkit_logs_2026-01-22_12-20-31.zip
Screen.Recording.2026-01-22.at.13.19.29.mov

Migration with 100% loss network

  • situation pretty much the same, no migration loader screen, went directly to Homescreen, but offcourse nothing got migrated due to bad network
  • after bringing back the network and restarting the app all seemed to migrated ok though

logs:
bitkit_logs_2026-01-22_12-34-00.zip

Screen.Recording.2026-01-22.at.13.31.11.mov

@claude

This comment has been minimized.

@ben-kaufman
Copy link
Contributor Author

@piotr-iohk sorry I made a stupid mistake accidentally putting 120 nano seconds as the loader timeout instead of 120 seconds.

I tested both scenarios and both worked now.

@piotr-iohk
Copy link
Collaborator

@piotr-iohk sorry I made a stupid mistake accidentally putting 120 nano seconds as the loader timeout instead of 120 seconds.

I tested both scenarios and both worked now.

Retested migration.

  • normal network flow ✔️
  • 100% loss flow
    • migration load screen disappears after ~2mins ✔️
    • but then user sees 0 balance, which may be a bit scary. There's yellow indicator that we are trying to connect, but the impression may be that something went very wrong. (perhaps for better user experience some toast, or another indication could be displayed after migration screen disappears saying that migration takes longer than expected, make sure that you have good network connection?)
    • after network is brought back, user still sees 0 balance despite app status shows green.
    • after restarting everything seems to be good ✔️

bitkit_logs_2026-01-22_14-28-59.zip

Screen.Recording.2026-01-22.at.15.24.12.mov

@ben-kaufman
Copy link
Contributor Author

So the issue is that it does load the balance after network restart but after a long time, I fixed it and now it should load in a few seconds after node starts. I also added a warning toast on data out of sync while connecting. I think that should make this good enough.

@claude
Copy link

claude bot commented Jan 22, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@ovitrif
Copy link
Collaborator

ovitrif commented Jan 22, 2026

@pwltr @piotr-iohk @jvsena42
Someone of you still available to (re) review & test this today or I should do it instead?!

@piotr-iohk
Copy link
Collaborator

Tested, LGTM 🙏

Screen.Recording.2026-01-22.at.22.02.37.mov

@ovitrif ovitrif merged commit 64e5cee into master Jan 22, 2026
9 checks passed
@ovitrif ovitrif deleted the fix/migration-offline branch January 22, 2026 22:32
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.

4 participants