Sending image hangs indefinitely
Steps to reproduce
- Open an existing 1:1 room with another user on the same homeserver.
- Tap the "+" icon in the bottom-left corner.
- Tap "Photo & Video Library".
- Tap an image.
- Tap the send button.
Outcome
What did you expect?
The image should be sent to the other user.
What happened instead?
The "Sending..." dialog and animated spinner are displayed indefinitely (or at least for the two minutes that I've waited). After I click "Cancel", the send button no longer responds to taps. I get the same results after closing the image activity and trying again.
This happens when sending to different users on my homeserver. I'm able to send image attachments to the same users without any problems from Element Web v1.11.99.
It doesn't appear to be connectivity-related; I see the same behavior on cellular and wifi. I believe that this worked for me in the past.
Your phone model
Pixel 7a
Operating system version
Android 15
Application version and app store
Element X 25.04.3 (Play Store)
Homeserver
Synapse 1.128.0
Will you send logs?
Yes
Are you willing to provide a PR?
No
This doesn't appear to happen consistently. Immediately after filing this issue, I killed and restarted Element X and was able to send the same image to the same user successfully.
I've sent logs with a description referencing this issue number and including timestamps of when the hanging and successful attempts occurred.
If/when I see this again, I'll check whether restarting Element X resolves the problem.
Having the exact same issue and it isn't persistent. Even if the image is shot inside Element X it won't send.
Your phone model: Pixel 8 Pro
Operating system version: Android 15 (BP1A.250405.007.B1)
Application version and app store: Element X 25.05.3 (Play Store)
Update: Force-Stop and restart the app seems to fix the problem.
I still see this frequently with Element X 25.06.2 from the Play Store. Every time it's happened, I've been able to send the image without any trouble after force-stopping and restarting the app.
@derat am looking through element-x-android debug logs and can't find any which match up to this report. is there a matrix ID or something I can look for?
@ara4n, thanks for the reply. I still encounter this regularly, so I just sent debug logs again from the app after triggering it. I included #4685 in the description.
thanks, have found the rageshake now and correlated it here.
In the report that I just sent, I attempted to send a photo taken within Element X. From within the conversation view:
- tap
+button - tap
Take photo - tap photo button to take photo
- tap photo button again to confirm photo
- tap send button without adding a caption
Right - it looks like this was fixed in https://github.com/matrix-org/matrix-rust-sdk/pull/4195, which has been sitting behind a feature flag on EXA since November but unfortunately was overlooked for being enabled by default. It's unclear why it's biting some people more than others.
To test, please enable developer settings in the app (tap the version number in Settings 7 times) and then try toggling on the "Media upload through send queue" setting and seeing if you can reproduce it.
Sorry for the sequence of fails here (failure to triage, failure to respond, fixing the bug ages ago, failing to remove the featureflag on the fix...), and thanks for being reactive now.
Thanks for following up on this! So far, the results seem promising:
- Tried to send an image from "Photo & Video Library" without changing anything; it hung as before.
- Enabled the "media upload through send queue" setting.
- Tried to send the image again (without restarting the activity); it still hung.
- Killed the activity (but not the process, as I understand it) by swiping up in the Android task switcher.
- Relaunched the activity.
- Was able to send the same image successfully.
Previously, I had to force-stop the process via "App info" before I'd be able to send again. Since that wasn't necessary this time, I'm hopeful that the send-queue setting improved things and that an activity restart was necessary to pick up the change -- does that sound plausible to you?
I'm not sure what the conditions were for this to start failing before; I'd be able to send images immediately after starting the app but it'd begin consistently hanging at some later point. It's still working now, but I've created a reminder to test this again tomorrow. I'll leave another comment here when I've done that.
fab, thanks for testing; please let us know if it sticks. unsurprised you had to restart the app for it to take effect.
I'd say it shouldn't need to restart the app to take effect, so it might be something else. Please continue testing and reporting, as we can't reproduce on our side for now.
@ganfra: Thanks, I'll continue testing and will update this issue. I'm at a loss as to what triggers this as well: I typically see it whenever I try to send an image if I haven't already force-stopped the app recently, but someone else on the same homeserver using a Pixel 8 tells me that they've never experienced the problem when sending images to me. It's unclear to me what's causing the difference in outcomes.
I think that this is unfortunately still broken. "Media upload through send queue" is still checked, but sending images (both photos taken within Element and ones from my media library) is hanging again now.
ugh, thanks for the update. please can you rageshake again after reproing it and we'll chase.
Sure, just triggered it again and sent logs with issue #4685 in the description.
Thanks for the rageshake, but can you go to dev settings and :
- Enable Send Queue trace logs
- Set the Tracing log level to Trace
Then try to repro and rageshake again! Thanks
@ganfra: Sure, I've updated those settings. I restarted the app per the UI which made the problem go away like usual, but I'll keep testing until it comes back and then I'll rageshake and comment here -- probably won't take more than a day or so.
I've been trying several times per day to reproduce this, but haven't seen it again yet. I'll continue trying. If it hasn't shown up again after a week, I think it'd be safe to say that the frequency is at least greatly reduced by "Media upload through send queue".
I finally just saw this again! I triggered it around 2025-08-04 15:35 UTC by sending a small image from my photo library to another user on the same homeserver. I sent logs with Issue #4685 in the description. Please let me know if there's anything else that you need from my end.
I took a look at the logs and sadly, there's nothing there that could help us debug the issue:
// Entering the media preview screen
2025-08-04T15:37:13.791834Z DEBUG elementx: [Lifecycle] onResume AttachmentsPreviewNode |
// Lots of timeline loading logs here, but nothing related to the media upload or sending the media event
...
// After 20s a dialog of some kind is dismissed (I guess the 'Sending...' one)
2025-08-04T15:37:32.226573Z TRACE elementx: OnDispose progressDialog |
2025-08-04T15:37:33.196149Z DEBUG elementx: Do not delete the uri |
...
// Then exiting the media preview screen
2025-08-04T15:37:33.919078Z DEBUG elementx: [Lifecycle] onPause AttachmentsPreviewNode |
2025-08-04T15:37:33.919760Z DEBUG elementx: [Lifecycle] onDestroy AttachmentsPreviewNode |
Maybe we'll need to add some extra logs to catch this bug. When you tried this, was the send queue for media uploads enabled or disabled?
Thanks for taking a look. "Media upload through send queue" was enabled (and has been since 2025-07-30 -- I haven't made any settings changes since then apart from enabling Send Queue logs on 2025-08-01 as requested above).
For whatever it's worth: even though I've still seen this a few times since enabling "Media upload through send queue" (as mentioned above), the frequency seems like it's been greatly reduced. Previously, the app seemed like it would consistently get into this state after just one or two days. Now, sending images at least works more often than not. I'm happy to provide more information if you can think of anything else that'd help debug this, but it'll be tougher for me to repro the issue.