Element X Android - Unable to send Videos via "Photo & Video Library" option
Steps to reproduce
Enter a chat Tap the + icon Choose "Photo & Video Library" option Select a video with at least 40 secs of length Preview screen is shown
Outcome
App immediately crashes on the preview screen.
What did you expect?
Video to be sent
What happened instead?
App immediately crashes on the preview screen.
Your phone model
Pixel 6a - GrapheneOS, A16 Pixel 7a - Stock Android A16
Application version and app store
Confirmed on 25.07.1 from Playstore & Zapstore 25.8.0 (APK from pre-Release)
Homeserver
self-hosted I don't believe it's a Synapse config issue as I'm able to WORKAROUND this issue by SHARING the file from my Files app instead of sending via the "Photo & Video Library" option
Will you send logs?
Yes, have sent a few but nothing to ID it by - On at least one of them I've included the message Unable to send Videos via "Photo & Video Library" option #5115
Extra details
Files should be standard H264 MP4 files taken via both phones cameras. Very Short-length (single-digit seconds) videos although very clunky/slow seem to go through after a while and don't crash at the preview screen. No major issue with images.
I see this in the logs:
Thread: JNA Cleaner, Exception: java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 127344 free bytes and 124KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
It seems like the videos were too large for the SDK to process them: https://github.com/matrix-org/matrix-rust-sdk/issues/1735. We have planned work to prevent trying to upload files larger than the homeserver's max file upload size, which would help avoiding this case, but ideally the SDK should upload any file without fully loading it.
I see this in the logs:
Thread: JNA Cleaner, Exception: java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 127344 free bytes and 124KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.It seems like the videos were too large for the SDK to process them: matrix-org/matrix-rust-sdk#1735. We have planned work to prevent trying to upload files larger than the homeserver's max file upload size, which would help avoiding this case, but ideally the SDK should upload any file without fully loading it.
Does this apply even though this can be worked around by simply sharing (I presume as an attachment) the file, rather than using the 'Photo & Video Library' option? Do both options upload differently?
@jackedproxy @jmartinesp
This issue occurs every time on my phone — it’s 100% reproducible. It’s been a week, and I believe such a critical bug should be prioritized. If not addressed soon, it could seriously impact trust in ElementX.
Should be fixed by https://github.com/element-hq/element-x-android/pull/5258 in EXA 25.09.1
Confirm the exact same behavior (October the 19th 2025). Version 25.10.0 Android 16, LineageOS 23, no Google (should that make any difference).
Generic "error" while trying to send videos through "send photos and videos".
I thought it was my server at first (I am experimenting with self-hosting Synapse, which I find quite complex by itself) but then I tried to send a video via Element Desktop (Arch/KDE) and it went through no problems.
Cheers Dario
Generic "error" while trying to send videos through "send photos and videos".
Then I don't think it's the same issue. This issue was about the preview screen crashing the whole app, so you wouldn't see the error dialog. Could you open a new one, adding info about the type of video (format, codecs, size, etc.) or alternatively adding a link to the video if it's something you can share? Thanks.
also occurring for me, when I want to share any video file I have to go back to element classic, in my case the app just hangs on the sending animation