Open Apotischman opened 2 years ago
Something odd in the steps above. I would expect any 'Failed to fetch' error message to be shown after going back online first. I see this when following the steps (which is great):
Also it may not be realistic for a user to clear storage whilst offline, because any submission problems would probably be seen whilst online.
I'm noticing that the form does not always refresh. This may only be the case if multiple Enketo offline-capable tabs were open. This is not the reported issue though.
I was just able to reproduce this on my phone when not connected. See my recent email with a URL to try out. I saved the link to the form entry page, went offline and tried accessing. I still get the fail to fetch message instead of "no internet"
I am now able to reproduce it. I had to turn off some dev settings related to Service Workers (i.e. the cached application). No need to submit a record first.
The cached app tries to load a form but fails to fetch it.
The user should be brought to a screen that says "This form is no longer available."
@Apotischman, this text string will be added to enketo/enketo-express and I'm trying to get it right before triggering translation update requests. You could override it in this fork, but it's nice if you don't have to.
I think "This form is no longer available" is confusing since this happens when the user is offline (and there may some other obscure conditions under which it occurs). We have a separate case for a form that is no longer available on the server (with its own message). I propose to use "Failed to download form" in this case. What do you think?
"Failed to download form" works for us. Thanks!
Describe the bug When a user clicks "Clear Storage" and clicks "Delete All", the page refreshes with a cryptic error message
To Reproduce
Expected behavior The user should be brought to a screen that says "This form is no longer available."