Jetpack Section: Backup/Restore Error Handling#15673
Conversation
|
You can trigger an installable build for these changes by visiting CircleCI here. |
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
@momo-ozawa I wasn't able to test the For me, the screen just sits there and nothing happens. I'm not sure if disabling wi-fi is the best option to test this... perhaps we can edit some code to simulate server-side errors? @emilylaguna would you mind testing that? |
|
@leandroalonso I'm having the same issue as well. 😢 |
- Set max retry count to 3x - If we retry 3x and the get request still fails, show the status update failed screen
|
@leandroalonso @emilylaguna |
| messageTitle: NSLocalizedString("Hmm, we can't update the status of your backup.", comment: "Title for the Jetpack Backup Status Failed message."), | ||
| messageDescription: "No need to worry. We'll notify you when your backup is ready.", // FIXME: Placholder text |
There was a problem hiding this comment.
@leandroalonso @emilylaguna (cc: @osullivanchris @zwarm)
Per our Slack discussion, the message title displays Hmm, we can't update the status of your backup.
Trying to come up with a good message description... let me know what you think. Open to suggestions. 👍
There was a problem hiding this comment.
I think the message is probably ok. But I have some questions about the flows I'll add separately.
|
Hi, wondering if I need a particular build number to test this out? I tried to install the latest one-off, but I'm not sure if I'm seeing the correct behaviour. Thanks for the clear scenarios to follow. Use case 1 and 2, I was able to get through them, but I saw snackbar/toast messages which doesn't look like what's in the screenshots. Honestly, I thought the snackbar is working well though. Use case 2 and 3 didn't work for me, it just got stuck. I am slightly concerned about the screenshots. I feel like the error states might need to be something on top of the UI, or appear as an end result in the flow, rather than adapting the copy of the current step. But that's why I really want to play with it, my assumption could be totally wrong until I actually see it in the flow. |
|
@osullivanchris use the build number 40744
|
|
Thanks @leandroalonso ! I can see that flows 1 and 2 changed to a dialog rather than a Snackbar/toast message. This is fine too. Though I thought the Snackbar was pretty good. I cannot restore for some reason. Looking at flow 4:
I have a couple of issues
|
Actually, we do show a snackbar if we encounter an error after sending the initial restoreSite / prepareBackup request. The "No connection" alert is shown if we can establish that there's no network connection before sending the initial restoreSite / prepareBackup request.
Do you mean you can't proceed to the Restore Status screen? |
Failure vs Unknown Status
I do think we should distinguish between "failure" and "unknown status".
Here's a quick overview of the current restore logic:
[1] Alternative presented in section below What should we do if we end up in the Unknown Status state?
I assumed that if we ended up in an "Unknown Status" state, we'd proceed to the Done view. An alternative to the Done view: we could take users back to the activity log, and simply display a snackbar with the message |
|
Now that I think of it, I guess the I'll push the changes if I get an OK on the "snackbar" implementation! RPReplay_Final1611289325.mov |
When I tapped restore, even online, I got an error.
Yeah I didn't have a problem with going to the 'Done' view itself. It was just the information I was seeing there, plus the lack of distinction between unknown and failed. The table makes things clearer for me to understand, thanks for that.
So now, if it fails, it proceeds to the next step but telling the user it failed. If the status doesn't update, it will just stay there indefinitely, but if the user closes the modal, then they get the Snackbar message? I think it generally makes sense. The only two options I can think of are (a) should we show the snackbar while they are still in the modal rather than waiting until they close it, and (b) I wonder should we change the "0%" to say something like "Unknown progress" ... but better!
I just use the words interchangeably so apologies for any confusion. I think 'toast' is a generic industry term, and Snackbar is what Material Design calls it. Generally, if this isn't enough info and I'm slowing you down only getting one reply per day due to our timezone overlap, ping me on slack and we can jump on a call! |
Weree you testing on a simulator? I've noticed that the wifi gets wonky on the simulator... it doesn't come back online for me once I turn it off. :(
Yes.
Not exactly. In my "snackbar" solution, if the status doesn't update, the Progress view is dismissed automatically. Then once the user is back in the Activity Log, the Sorry about the confusion! 🙏
No worries!
Thanks! Sounds good to me! |
it was ok my device but maybe I wasn’t set up right!
oh cool. That could work. I suppose they would have to close it themselves anyway if nothing happens. But I’m thinking the process could actually complete, we just don’t know about it...would we know if it’s done..? |
leandroalonso
left a comment
There was a problem hiding this comment.
@momo-ozawa tested all the scenarios, it all worked as expected except for the backup. It seems that the error screen is triggered over and over again:
Yikes! Will take a look. @osullivanchris and I are almost at a decision for what to do when the status update fails (Original comment: #15673 (comment)). When I push the final changes for the status update failure case, I'll also try to fix the issue you mentioned 👍 |
…ling # Conflicts: # WordPress/Classes/ViewRelated/Jetpack/Jetpack Restore/Restore Warning/Coordinators/JetpackRestoreWarningCoordinator.swift
Unknown Status
Download triggering repeatedly
|
leandroalonso
left a comment
There was a problem hiding this comment.
I can update the status failed UI in a different PR (Worried that this PR is getting big/stale)
100% agree.
I can address this in a different PR, if you could let me know the steps to reproduce this bug 🙏
I'm still able to reproduce it here:
- Generate one backup
- As soon the progress bar is filled with some progress (in my case it goes right to 88%) turn off the wifi
- Wait for a few seconds
- It starts
The failure block in refreshBackupStatus is called over and over again and this "stacks" the view being presented. Eventually, this stops (after all the VCs are presented). Check this debug output:
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus called
$$ refreshBackupStatus failure // Those failures all come at once
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
$$ refreshBackupStatus failure
I'm wondering if that is perhaps just a Simulator behavior? We can address that in a future PR anyway. :)


Part of #15191
Description:
To test:
Restore: No Internet Connection
RestoreRestore to this pointConfirmBackup: No Internet Connection
Download backupCreate downloadable fileRestore: Restore Status Update Failed
RestoreRestore to this pointConfirmBackup: Backup Status Update Failed
Download backupCreate downloadable fileRestore: Restore Failed
I'm not sure how to trigger this, but you can temporarily route the "restore status update failed" error to display the Restore Failed VC.
PR submission checklist:
RELEASE-NOTES.txtif necessary.