geteduroam / ionic-app

iOS and Android app for geteduroam
BSD 3-Clause "New" or "Revised" License
16 stars 12 forks source link

Choosing a profile while internet is unstable causes uncaught exception and inconsistent state #37

Closed jornane closed 4 years ago

jornane commented 4 years ago

How to reproduce (reproduced only on Android, but assume the same problem exists on iOS)

  1. Select an institution from discovery
  2. Make the internet connection unstable (e.g. connect to Wi-Fi, disable mobile data, pull the ethernet cable from your AP)
  3. Press Next
  4. Observe that a login screen shows up (should be impossible - the eap-config was not downloaded yet!)
  5. After a few seconds, an error shows up: Error: Uncaught (in promise): [object Object]
  6. Pressing "Back" will give the impression that the error was not fatal, but the Next button will not work even after entering credentials

These observations seem to indicate some problems with the application

  1. The app assumes that any eap-config it will download through the not-OAuth flow uses username/password, this assumption is not given and abeit being often correct, it is not always the case
  2. The app does not always handle connection issues, this is important in an app being used for configuring connectivity
  3. The username/password form can load before it is ready, and an error can keep it in an unfinished state; when this works well it is a slight performance improvement for the user, but it backfires when things go wrong

Please refer to the decision tree from phase I: the eap-config can be obtained through three different methods, and the application must decide its next step from the contents of the eap-config. The assumptions in the tree are to make testing easier, not to create shortcuts in the logic.

decision tree