Skip to content
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

Network error after signing out #662

Closed
eloquence opened this issue Dec 13, 2019 · 6 comments · Fixed by #750
Closed

Network error after signing out #662

eloquence opened this issue Dec 13, 2019 · 6 comments · Fixed by #750
Assignees
Labels
bug Something isn't working release blocker security

Comments

@eloquence
Copy link
Member

eloquence commented Dec 13, 2019

STR:

Expected result:

  • (For now) Reply immediately shows up as failed
  • (Likely post-beta) A prompt warning about pending operations before signing out

Actual result:

  • Reply stays in pending state, and we get a "server cannot be reached" error eventually, while the client is in offline mode.

Screenshot:
Screenshot_2019-12-12_20-23-52

@eloquence eloquence added the bug Something isn't working label Dec 13, 2019
@eloquence eloquence added this to the 0.2.0beta milestone Dec 13, 2019
@eloquence
Copy link
Member Author

(Added security label in case network operations are being attempted while the user expects to be offline, which may violate their opsec expectations.)

@eloquence eloquence changed the title Network error while reply is pending and client is oflfine Network error after signing out Dec 13, 2019
@eloquence
Copy link
Member Author

Actually also seeing this after just signing out without doing anything, so may be related to sync or other network operations as well.

@redshiftzero
Copy link
Contributor

see related change in https://github.com/freedomofpress/securedrop-client/pull/404/files#diff-dfebdbc5258e6805fadd416909ed2a90R45

when we sign out we invalidate the token, but we should probably both add some additional logic around ApiInaccessibleError (right now we pause the queue which is why this "server cannot be reached" error pops up) and either empty the queue when the user signs out or stop the threads

@sssoleileraaa
Copy link
Contributor

when we sign out we invalidate the token, but we should probably both add some additional logic around ApiInaccessibleError (right now we pause the queue which is why this "server cannot be reached" error pops up)

Exactly! We should just stop the "server cannot be reached" error that results from the queue being paused (intentionally by invalidating the token) if the user is signed out

and either empty the queue when the user signs out or stop the threads

I think emptying the queue makes sense, we already persist pending replies so these should show up as failed if the user logs back in, I believe.

@sssoleileraaa
Copy link
Contributor

i will work on this

@sssoleileraaa
Copy link
Contributor

ah yes @rmol this is closed when #750 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release blocker security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants