-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
"Request failed" error when message is Deleted with "Show Next Message..." option is enabled #1220
Comments
The handling of controller.abort() was interpreted incorrectly because i misread the documentation.
I thought it was a string, but it is a DOMException object. |
Thanks for fixing this. BTW, the Double Requests possible fix in |
The main reason why this happens is After 'MessageMove' or 'MessageDelete' it does: MessagelistUserStore.reload(!MessagelistUserStore.length) But there are some caveats due to uncheck/removal/page changes that cause multiple autoSelect and MessageList requests. So now i made big changes to handle them |
Solved, or do you still see this issue? |
Describe the bug
When the "Show Next Message..." option is enabled and a message is deleted the "Request Failed" screen is briefly shown. This error mostly happens when connection between Snappymail and the Mail server is slow. This is somewhat an edge case to have slow connection server side but it does help with flushing out bugs
To Reproduce
Steps to reproduce the behavior:
Possible Solution
The problem seems to be two fold:
Abort handling error:
controler.abort
is called here:snappymail/dev/Remote/AbstractFetch.js
Lines 37 to 40 in 99d68bc
string
not typeerror
here:snappymail/dev/Remote/AbstractFetch.js
Lines 61 to 66 in 99d68bc
One possible way to fix this is:
This way the error will be properly propagated to here:
snappymail/dev/Remote/AbstractFetch.js
Lines 165 to 171 in 99d68bc
and the
fCallback
will have the properiError
code, which will skip the 'Request failed` screen here:snappymail/dev/Common/UtilsUser.js
Lines 296 to 301 in 99d68bc
Double Requests
On slower connections there are duplicate requests under certain conditions that actually cause the
AbortError
.The first request is properly initiated from here:
snappymail/dev/Stores/User/Messagelist.js
Lines 454 to 464 in 99d68bc
The second request can be initiated by the
remove()
call from here sometime:snappymail/dev/Stores/User/Messagelist.js
Line 475 in 99d68bc
because on slow connection it will pass
this.autoSelect()
check here:snappymail/dev/Common/Selector.js
Lines 65 to 71 in 99d68bc
It is possible to fix the
this.autoSelect()
check like sohere:
snappymail/dev/Stores/User/Messagelist.js
Lines 167 to 172 in 99d68bc
@the-djmaze I can submit a PR as well.
Thanks for all the work you put into this app btw
The text was updated successfully, but these errors were encountered: