Canceling an image load can leave the Uploading stuck

AI-generated summary

Canceling an Image Load Leaves Uploading Stuck

peterlewis reported an issue where canceling an image upload would leave the uploading process stuck. This occurred in Discourse 1.8.9 on Safari/Sierra (10.12.6). The user found that canceling the reply and clicking reply again would update the state to “Uploading 0%”, but the issue would persist until the page was reloaded.

peterlewis provided reproduction steps, which involved dragging a large image, waiting for it to start, canceling, and repeating the process. zogstrip suggested that the issue might have been fixed by @gerhard, but gerhard clarified that they had only fixed the issue on mobile.

After further investigation, zogstrip was unable to reproduce the issue on Windows 10/Chrome 63.0.3239.132. peternlewis later confirmed that the issue appeared to be fixed.

If I upload an image, and cancel the upload, it can get in a stuck state:

20171028-110958

The spinner is still spinning, but is clearly never going to finish, and I can no longer press Reply when stuck in this state,

If I cancel the reply, and then click reply again, it is still stuck in the state, although now it says “Uploading 0%”.

I have to reload the page to get it unstuck.

This is Discourse 1.8.9, Safari/Sierra (10.12.6)

2 Likes

I’ve heard that bug but was never able to reproduce locally. Any chances you could find reproduction steps?

4 Likes

Yep, I think I have it - it happens on the second drag/cancel.

Safari/Mac OS X 10.12.6 (Sierra).

  • Reply
  • Drag a large image in
  • Wait for it to start
  • Cancel
  • Drag a large image in
  • Wait for it to start
  • Cancel

This caused the bug every time for me.

6 Likes

I’m pretty sure this has been fixed by @gerhard.

@peternlewis can you confirm this has been fixed?

I fixed it on mobile, because it didn’t work there at all after the composer refactoring.

This bug seems to describe a different issue.

1 Like

Ok, I’ll have a look then.

I did try on Windows 10 / Chrome 63.0.3239.132 and could not reproduce the issue. I was always able to properly cancel the upload.

Yes, it appears fixed. Thanks.

2 Likes