-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent sync complete toast #2942
Comments
@f-odhiambo While there is an ENQUEUED WorkState for scheduled jobs, there is no such SyncJobStatus and as a result, when a job is enqueued, the RegisterFragment is instructed to mark it as FINISHED. Since every job enters an ENQUEUED phase regardless of whether it is a periodicSync or oneTimeSync, the "Sync Complete" toast shows up immediately the jobs are enqueued. The oneTimeSync jobs quickly jump into STARTED state and so you see the "Syncing" on the UI. Then once the oneTimeSync is complete, the "Sync Complete" toast shows up for the second time |
While looking at this, I spotted what I believe to be a bug or something that can make spotting sync issues harder. When you initially start the app, the sync ends in a FAILED state that is preceded by a GLITCH state. On the UI, the "Sync Completed" toast shows up but then a sync retry begins. The retry is expected since GLITCH should prompt a retry. I will look into the flow and figure out why the "Sync Complete" toast shows up even on failure when a GLITCH happens right before FAILED @f-odhiambo @dubdabasoduba please let me know if we should show a "Sync Failed. Retrying..." toast or something during a Glitch as there is no handler for the GLITCH status I've added some Timber entries in the code to demonstrate The below shows that both types of job do enter an ENQUEUE phase so there probably be a different logic to handle them The below shows the GLITCH phase (I have added a handler for it in the code). I am currently getting 403 and 502 errors on SID-EIR (currently following up with @f-odhiambo on that- my credentials may be bad or something else) and that is likely what causes the GLITCH. The retry is expected and that's why you see the manual oneTimeSync restart. However, as noted above, I will fix the issue where the UI shows "Sync Complete" even during a GLITCH and subsequent FAILED state We may also need to decide how many times the app should retry sync after failure. It appears to retry indefinitely. Let me know if that is the case |
Related ticket here #2947 |
@kelvin-ngure did you stop getting the 403s and 502s mentioned in the comment above? |
@dubdabasoduba no. I just sent you some logs |
@ndegwamartin @f-odhiambo from What I see in the upgrade PR. To fix this, we would first need to migrate from using |
@kelvin-ngure yeah this needs to be done. Created a ticket here to track this #3059. Feel free to update the ticket with other info needed. |
This is still blocked, see google/android-fhir#2472 |
Describe the bug
After clicking sync(On the registers menu) two toast messages are shown "Sync complete" then a second later "Syncing"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After clicking on sync the toast message syncing should be shown then later sync complete should show.
Recorder_21122023_131103.mp4
The text was updated successfully, but these errors were encountered: