Tonomy-Foundation / Tonomy-ID

Tonomy ID is the cross-platform mobile wallet (Android and iOS) for public and private Antelope blockchains. This application allows you to sign transactions on the block chain, share your DID and Verifiable Credentials containing your identity with others in a consensual way and log into web2 and web3 applications.
Apache License 2.0
14 stars 1 forks source link

App Freezes when open with no Internet #1112

Open theblockstalk opened 1 month ago

theblockstalk commented 1 month ago

Steps to replicate the issue

  1. create or login to an account
  2. close app and remove the memory
  3. Turn off Internet ( I blocked it using my VPN)
  4. open app

What do you expect to happen?

  1. I am on my user home screen, logged in

What actually happens

  1. App crashes and then freezes on the splash screen

Also, why does it always freeze when we go to the splash screen? can we get it so that it Elisa can recover and take user back to the home screen?

Your environment

theblockstalk commented 3 weeks ago

also getting freeze issues when I create account (after hCaptcha) when internet is not great.

theblockstalk commented 3 weeks ago

approaches

  1. monitor net connection and handle (blanket the error)
  2. when we redirect user to splash screen, instead redirect them to the more appropriate screen. e.g. when they logout send them straight to the UserHome screen
  3. handle the connection error directly (don't use NetInfo)
  4. add new state that skips initialization except for when the user first opens the app
theblockstalk commented 3 weeks ago
  1. the initialize() should only be called when user opens the app for first time - not any other time
    • flags to check when to call it (approach 4)
    • check that when it is not called it keeps working (maybe need approach 2?)
  2. when initialize() is called. use error handling to check if network error (not NetInfo object). if there is an network connection issue:
    • ideal case: keep the user in their current state, and try initialize every 10s or so in the background. once initialization works change their state as normal (approach 3)