ucam-department-of-psychiatry / camcops

Cambridge Cognitive and Psychiatric Test Kit (CamCOPS)
Other
12 stars 8 forks source link

Client single-user sees unhelpful message if the server version changes #263

Closed martinburchell closed 12 months ago

martinburchell commented 1 year ago

If a patient using the app in single user mode registers with a server and the server is then upgraded, upload of tasks will fail. The message they see is "There was a problem sending your completed tasks to the server". In clinician mode, the error log is visible and they will see (for example) "Server version (2.4.15) doesn't match stored version (2.4.14). Please re-fetch server information."

The workaround is to re-register the patient, though they will lose any tasks not yet uploaded.

We could try to fetch the server information before uploading.

RudolfCardinal commented 1 year ago

Yes, good idea. The options might be (1) fetch regardless (likely reliable, but maybe a little slow), or (2) do a version check and fetch if the version has changed. But things can change other than the version (e.g. change of string files). Could also consider fetching everything when updating schedules (because a change in strings might affect what the user sees) and version-check-and-fetch-if-changed on upload?

RudolfCardinal commented 1 year ago

Looks good! Cunning -- I see that it goes back a step in the sequence, so that all the other checks are then completed next time round. Very nice.