Tusky icon indicating copy to clipboard operation
Tusky copied to clipboard

Media Upload Issues

Open gudenau opened this issue 6 years ago • 24 comments

When I attempt to upload pictures from my cell phone to https://mastodon.technology they almost always fail. No error other than "media upload failed".


  • Tusky Version: 4.1

  • Android Version: 9.0

  • Android Device: Pixel XL

  • Mastodon instance (if applicable): https://mastodon.technology

  • [x] I searched or browsed the repo’s other issues to ensure this is not a duplicate.

Edit: @ashfurrow

gudenau avatar Jan 17 '19 21:01 gudenau

Yes, there seem to be problems with our upload code. I will add better error messages so we can finally nail them down.

connyduck avatar Jan 18 '19 17:01 connyduck

I'm also experiencing this.


  • Tusky version: 4.1
  • OS: LineageOS 15.1 (Android 8.1)
  • Device: Moto G5 Plus
  • Mastodon instance: social.coop

nevillepark avatar Feb 06 '19 18:02 nevillepark

almost always fail

Are the files that work PNG, GIF, or videos -- something that "send reduced" wouldn't touch?

edit: I might be misunderstanding this as at a glance I thought perhaps that Tusky was including "send-reduced" into the codebase to make attachments/uploads smaller and faster.

feld avatar Feb 19 '19 21:02 feld

@gudenau Can you try the latest version? Seems to be working fine to me.

I've had a similar issue on other instances but it was because of the instance itself, not the app.

mihudevcom avatar Feb 20 '19 08:02 mihudevcom

@nevillepark Can you try the latest version? @gudenau @nevillepark For both of you: when you experience trouble uploading images try the instance in your browser too. If the issue happens on both then it's a problem with the instance. If it happens only on the app then it might be a problem with the app.

mihudevcom avatar Feb 20 '19 08:02 mihudevcom

@mihudevcom It only happens with the app.

nevillepark avatar Feb 25 '19 01:02 nevillepark

On a Pixel 3 running Tusky 5.1, with an account on mastodon.social, some (but not all) image uploads fail with “The upload failed” after a second. It seems that it's only screenshots (PNG) which I have cropped with the Pixel's built-in screenshot editor: full-screen screenshots (also PNG), new photographs, and existing photographs (JPEG) succeed. The same cropped screenshot uploads just fine using the web interface from Firefox on the same device.

wjt avatar Feb 25 '19 09:02 wjt

Hello there, I encounter issues too. On a private instance (only a few accounts) image upload on toot creation is inconsistent. Just now, I tried to upload twice it failed. Looked around in options, wrote a toot. Then I tried again, with the same image, and it worked.

Picture upload works from browser. It's pictures from my phone, JPG, that fail regularly but not consistently

Tusky version: 12 Android version: 9 Android device: Asus Zenfone 5

ghost avatar Aug 15 '20 02:08 ghost

Can reproduce, Pixel 2, Android 11, Tusky 15.1

Video uploads fail 3/3 tries, photo uploads work but still randomly fail

5HT2 avatar Jun 13 '21 20:06 5HT2

Same. Running version 15.1 on LineageOS. Also has similar media issues with AndStatus and Fedilab, so it may be related to the instance?

tokenwizard avatar Jul 21 '21 00:07 tokenwizard

I'm running glitch-soc on my instance, I doubt that's the issue.

5HT2 avatar Jul 21 '21 16:07 5HT2

I can upload perfectly well from the webapp but not from Tusky, for the two instances I tested. So there’s something going on between Tusky and Mastodon somewhere that makes much more flaky than it should.

I find it weird that the progress ring fills up, and then there’s a weird delay where nothing happens for a few seconds and often, with my fast connection, it’s where it fails.

ariasuni avatar Jul 22 '21 16:07 ariasuni

Note that the issue is still here in Tusky 16.0 beta 2. I tried to use logcat to see what’s going on, but nothing is logged.

ariasuni avatar Feb 10 '22 15:02 ariasuni

Sounds like a timeout issue. The progress ring shows the percentage of uploaded bytes, and then it waits for the server to reply. And (I'm not sure about this part) when the server takes too long to respond because it is still processing the upload, Tusky ends the connection because it only waits for 30 seconds. Does this sound like something that could be happening? How long do media uploads take on the web for the same instance? @ariasuni

connyduck avatar Feb 10 '22 17:02 connyduck

Oh wait. We are using /api/v1/media to upload media, but there is /api/v2/media which is asynchronous (it does not wait for the media to be processed before returning) and should take way shorter. Fix coming asap, but I am not sure if we can get it into Tusky v16.

connyduck avatar Feb 10 '22 17:02 connyduck

Can you please test if this still occurs with the current Tusky nightly? @ariasuni

connyduck avatar Mar 01 '22 19:03 connyduck

Can you please test if this still occurs with the current Tusky nightly? @ariasuni

I have not noticed this issue recently.

tokenwizard avatar Mar 01 '22 20:03 tokenwizard

It’s way, way better! But when uploading four photos at once, some just get stuck with the round loading bar at 99% instead of being «removed» like before, but it’s hard to reproduce so…

ariasuni avatar Mar 17 '22 16:03 ariasuni

I made another change, please test it in the next release

connyduck avatar May 01 '22 15:05 connyduck

Hi, I am having the same issue, "upload failed" for Image files.
Android 10, one plus 5 phone/app , Tusky 17. image upload Works fine on desktop, no go on app.
@[email protected] anything i should try? thank you.

DonF22 avatar May 19 '22 14:05 DonF22

I made another change, please test it in the next release

Hi, is next release 17 or higher than 17. Thanks

DonF22 avatar May 19 '22 15:05 DonF22

@DonF22 Version 18

connyduck avatar May 19 '22 15:05 connyduck

Confirmed, my issue is fixed in app version 18. Many thanks!!

DonF22 avatar May 19 '22 16:05 DonF22

lineage_gts4lv-userdebug 11 RQ3A.211001.001 Tusky 18.0 mastodon on social.librem.one

Upload does not work. It stopped working on my device a while ago, but I can't say exactly when.

Is there a way to get/provide debugging information about why the upload is failing? I tried uploading pictures (screenshot, camera, edited - all the same).

chri2 avatar Jul 07 '22 14:07 chri2

I suspect some issues here may be related to #2770

toniher avatar Dec 22 '22 11:12 toniher