weglide / bugtracker

WeGlide platform bug tracker.
https://www.weglide.org
11 stars 1 forks source link

Deleting a image in flight story takes long, without feedback to user #114

Closed niggli closed 2 years ago

niggli commented 3 years ago

Describe the bug I uploaded an image to my flight story (in HEIC format if that matters). After it showed up, I decided against it and clicked on delete. Nothing happened, but after 1-2 minutes it was gone. In this time I clicked multiple times, searched for another way to get rid of the image etc. - not a great user experience ;)

To Reproduce Steps to reproduce the behavior:

  1. Upload image to flight story
  2. Click on delete
  3. Wait

Expected behavior I expect either a instant delete or something in the fashion of "Please wait, image is beeing deleted..."

Screenshots

Device (please complete the following information):

samuel-git commented 3 years ago

Hi, will look into this, happend for me instantly but that depends on the connection. How many images/text did you have in the story? Maybe you can post the link here. Thanks!

niggli commented 3 years ago

Only one - after I deleted it, zero. The flight is here: https://www.weglide.org/flight/37233

And I attached the image file, had to ZIP it because HEIC wasn't accepted first.

IMG_4107.HEIC.zip

samuel-git commented 3 years ago

Okay, I cant upload this file. WeGlide responds with "Invalid image format" as it should. So I am curious how you managed to upload in the first place.

@moldhouse maybe we can add .heic support?

moldhouse commented 3 years ago

.heic support does require quite a few adjustments as we depend on Pillow (https://github.com/python-pillow/Pillow/issues/2806). So I am also curious how you managed to upload the image in the first place.

niggli commented 3 years ago

I didn't do anything special, so my guess is that the browser (Safari) converted it to jpg in the background: https://stackoverflow.com/questions/64093027/is-it-possible-to-make-ios-safari-upload-original-heic-photos-without-jpeg-conve

The image was shown after uploading, so the process worked somehow. But maybe that conversion by Safari is part of the problem, I can try to recreate the issue in the evening.

niggli commented 3 years ago

The behaviour is the same if I upload a jpg version of the same image. My connection is >50Mbps DSL and a ethernet network, so that shouldn't be part of the issue. Did you also try with Safari?

niggli commented 3 years ago

I tried this again today, again it was slow. Additionally a popup "Flight Story not found" (or something similar) was shown for a short time after saving the flight. I was too slow to make a screenshot, but I'm sure you'll find it in the code.

samuel-git commented 3 years ago

So definitely a Safari/Heic problem. We are not able to replicate the issue atm and will wait for more reports. A short dive in even with your excellent help did not yield any results.

Another short question: Does the version number on the start page footer displays 1.2.2 to you? Just to make sure we are on the same page (sorry for the pun).

niggli commented 3 years ago

Yes 1.2.2 is shown.

samuel-git commented 3 years ago

Okay, can you open the developer console in safari an look for (red) errors while deleting the image?

There should also be a request in the network tab of the dev console on delete.

An screenshot would be superb!

Thanks for your patience.

niggli commented 3 years ago

No problem, I hope I did it right. Before I even added a image to the flight story, the console looked like this:

Before deleting

After I deleted the flight, it took about a minute. There was no change to the console, but in the network tab there was a very long API request:

after deleting image

Interestingly, clicking on "Löschen" because I didn't really want to upload the flight, also lead to a very long running request:

after deleting flight

I hope it helps.

samuel-git commented 3 years ago

Thanks, this helps a lot. @moldhouse looks like an issue with handling of unexpected API input.

samuel-git commented 2 years ago

HEIC format is now supported, right @flyingjoe ?

flyingjoe commented 2 years ago

@samuel-git No, pillow still hasn't implemented it.