kpwhri / heartsteps

Heart Steps 2.0 Application
8 stars 1 forks source link

Tester stays in baseline screen #307

Closed jup014 closed 2 years ago

jup014 commented 2 years ago

Describe the bug A tester (eric-0002) stays in the baseline screen even after he finished the baseline period.

update: he missed wearing Fitbit on Monday (Feb 7) and re-wore on Tuesday (Feb 8). Now the baseline screen shows one circle filled.

To Reproduce Steps to reproduce the behavior:

  1. Login with Eric-0002
  2. The app shows a baseline screen with one circle filled.

Expected behavior He should be on the Dashboard front page. (out of baseline page)

Screenshots Screenshot_20220207-063131_JustWalk Screenshot_20220209-071724_JustWalk

Desktop (please complete the following information):

Smartphone (please complete the following information):

Todo

jup014 commented 2 years ago

participants.services.ParticipantService.is_baseline_complete():

is_staff = False start_date = 2022-02-04 days_worn = 5 baseline_period = 2 5 > 2, so baseline is complete

jup014 commented 2 years ago

It seems like some of the ionic-cordova implementations are not working properly.

This issue happens on Eric's phone, only when the app is installed through Google Play Store. We have some similar anecdotes in iPhone too, according to Rebecca and Pedja. Thus, I assume this is not an OS-level problem.

I couldn't find a solution to fix it but removed the path to the problem. It is caused by ModalController.create() with EnrollmentModal. The EnrollmentModal is usually called when the auth token is gone, and it is not expected in usual cases.

For now, I removed the retryAuthorization() function. If needed, we can reroute the user to the front page. (/)

jup014 commented 2 years ago

307 added "redirectToLogin" parameter in HeartSteps get/post/delete method

All critical server actions are set to be redirected if they fail.

Non-critical server actions, or iterative actions are set not to be redirected. (e.g., notification center)

Tested locally, and updated to google play console.