Zulip-desktop: Message not stored in drafts after quitting

Created on 1 Apr 2019  路  11Comments  路  Source: zulip/zulip-desktop

When we close the app after typing something in the message box, the message is not saved in drafts.

  • Operating System:

    • [ ] Windows

    • [x] Linux/Ubutnu

    • [ ] macOS

  • Clear steps to reproduce the issue:
  • Open up zulip desktop and type a message in the message box.
  • Don't lose focus on the message box and quit the app using Ctrl+Q.
  • The message is not saved in the drafts.

Same steps reproduced in webapp seem to store the message in drafts perfectly.

  • Relevant error messages and/or screenshots:
    Screenshot from 2019-04-01 14-28-28
    Screenshot from 2019-04-01 14-29-05
    "THIS IS A TEST!!!!!!!!" message is not stored in drafts.
Bug waitinneeds-repro

All 11 comments

@zulipbot label "Type: Bug"

I can't reproduce this on my macOS desktop app. I highly doubt the issue has anything to do with the desktop app since I have seen the draft not being saved issue in webapp a couple of time also though can't reproduce this now.

@akashnimare i have tested it multiple times and i think it is an existent issue on Ubuntu. @abhigyank can you please test and tell if this is the case for you or not ?

The webapp attempts to save the draft content during close using a beforeunload event listener. My guess is that depending how forcibly you quit the app, that code may or may not get to finish running before the app closes, so this autosave method might not be 100% reliable.

i can reproduce this on Ubuntu

@timabbott is there anything we could do for this in the web app?

If we can reproduce this, what I'd try is e.g. adding some sort of logging statement statement in that beforeunload to see if it's not being called by the browser, or it's being called but failing. I guess I'm not sure what the right process there is because one is quitting the app.

I would also definitely read through these Google results to see if any of the suggestions there help; a few seem potentially relevant but it's hard for me to tell without testing https://www.google.com/search?q=electron+quit+app+beforeunload&oq=electron+quit+app+beforeunload

@vsvipul can you test this against master? I think https://github.com/zulip/zulip-desktop/pull/783 should fix this.

@akashnimare will test it right now. Didn't get any notification for this message.

@akashnimare Works fine for me now. This issue can be closed. Great work @priyank-p !!

Closing since it's definitely same as #767 and is fixed in master.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EpicEric picture EpicEric  路  6Comments

abhigyank picture abhigyank  路  4Comments

brainwane picture brainwane  路  5Comments

syncopated picture syncopated  路  3Comments

brainwane picture brainwane  路  9Comments