iNPUTmice / Conversations

Conversations is an open source XMPP/Jabber client for Android

Home Page:https://conversations.im

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image handling (display, use in conversations...) is broken under 2.13.0-beta+playstore

kalon33 opened this issue · comments

Using latest beta in Google Play Store, I can't display images into the conversation anymore, or join images to conversation.

I got an I/O error (but I have plenty of free space), when trying to send an image to a contact.

Images previews from images I sent before or that were sent to me in conversation are replaced by black squares and I get errors when trying to open them.

It happens since the latest update (I think the changelog was the use of Android 14 target API), never had it before.

I'm using a Xiaomi 11T, running Android 13.

Thanks for your help!

Thank you for your report.

We need the debug output that you can see by attaching your phone to a computer and running adb logcat -s conversations (during an attempt to send a file)

@kalon33 you made sure all permissions are granted? File/Media/whatever

@kalon33 tested beta.2 already?

Okay, I think I have two issues running .2 on one of my devices (maybe the root cause is the same?):

One is unable to send, unfortunately the log during sending doesn't seem to contain anything interesting (no errors):

11-06 12:03:31.706 D/conversations(20122): app switched into background
11-06 12:03:33.674 D/conversations(20122): reInit(hasExtras=false)
11-06 12:03:33.676 D/conversations(20122): scrolledToBottomAndNoPending=true
11-06 12:03:33.676 D/conversations(20122): jump to first unread message
11-06 12:03:33.677 D/conversations(20122): guessMimeTypeFromUriAndMime(content://com.android.providers.media.documents/document/image%3A1000030252,null)
11-06 12:03:33.691 D/conversations(20122): mimeFromUri:image/jpeg
11-06 12:03:33.732 D/conversations(20122): app switched into foreground
11-06 12:03:33.732 D/conversations(20122): ConversationFragment.onBackendConnected()
11-06 12:03:35.203 D/conversations(20122): AxolotlService (jxj2bdin@conversations.im): Finding devices without session for wiktor@metacode.biz
11-06 12:03:35.204 D/conversations(20122): ConversationsActivity.commitAttachments() - attaching image to conversations. CHOOSE_IMAGE
11-06 12:03:35.230 D/conversations(20122): guessMimeTypeFromUriAndMime(content://com.android.providers.media.documents/document/image%3A1000030252,image/jpeg)
11-06 12:03:35.242 D/conversations(20122): mimeFromUri:image/jpeg
11-06 12:03:35.245 D/conversations(20122): attachImage: type=1
11-06 12:03:35.246 D/conversations(20122): copy image (content://com.android.providers.media.documents/document/image%3A1000030252) to private storage /storage/emulated/0/Pictures/Conversations/64d567b7-be5e-464d-bfa5-543d59e48d4f.jpg
11-06 12:03:35.247 D/conversations(20122): received uri permission for content://com.android.providers.media.documents/document/image%3A1000030252

And the UI shows the following issue:

conv

(Just to clear the obvious I'm not out of space, there are literally dozens of GB of free space)

The second issue, Android 14 sending to Android 13 device:

11-06 12:41:10.966 D/conversations(20122): creating file: /data/user/0/eu.siacs.conversations/cache/979b3bcc-4275-4f65-aeee-25879c7c1230
11-06 12:41:11.225 D/conversations(20122): jxj2bdin@conversations.im: unable to download file
11-06 12:41:11.225 D/conversations(20122): java.io.IOException: Operation not permitted
11-06 12:41:11.225 D/conversations(20122): 	at java.io.UnixFileSystem.createFileExclusively0(Native Method)
11-06 12:41:11.225 D/conversations(20122): 	at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:317)
11-06 12:41:11.225 D/conversations(20122): 	at java.io.File.createNewFile(File.java:1006)
11-06 12:41:11.225 D/conversations(20122): 	at eu.siacs.conversations.http.HttpDownloadConnection.decryptFile(Unknown Source:49)
11-06 12:41:11.225 D/conversations(20122): 	at eu.siacs.conversations.http.HttpDownloadConnection.decryptIfNeeded(Unknown Source:16)
11-06 12:41:11.225 D/conversations(20122): 	at eu.siacs.conversations.http.HttpDownloadConnection.-$$Nest$mdecryptIfNeeded(SourceFile:0)
11-06 12:41:11.225 D/conversations(20122): 	at eu.siacs.conversations.http.HttpDownloadConnection$FileDownloader.run(Unknown Source:12)
11-06 12:41:11.225 D/conversations(20122): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
11-06 12:41:11.225 D/conversations(20122): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
11-06 12:41:11.225 D/conversations(20122): 	at java.lang.Thread.run(Thread.java:1012)
11-06 12:41:11.225 D/conversations(20122): update unread count to 1

Btw this issue seems to be breaking "expected size" of a file as now it thinks the file is 16 bytes bigger (maybe because of this) and pressing the "download" button sends the wrong range value (16 bytes past the end of the file) which then triggers errors on the server side (e.g. my nginx returns 416).

Both of my devices contain the same version:

ver2

I hope this helps. 👋

@wiktor-k do you use Google Android 14 on Pixel phones and use multiple user profiles? If so maybe it's https://arstechnica.com/gadgets/2023/10/google-promises-a-rescue-patch-for-android-14s-ransomware-bug/ ?

Nope, it's stock Samsung Android on both of them. The one that's running Android 13 is Samsung A52s 5G.

Ugh, I was about to create a backup and test it with a fresh client but the file permissions apparently also prevent backups: 😱

D conversations: unable to create backup
D conversations: java.io.FileNotFoundException: /storage/emulated/0/Download/Conversations/Backup/<redacted>.2023-11-07.ceb: open failed: EPERM (Operation not permitted)
D conversations: 	at libcore.io.IoBridge.open(IoBridge.java:574)
D conversations: 	at java.io.FileOutputStream.<init>(FileOutputStream.java:236)

(This is after pressing the "Backup" item in settings)

That's exactly the issue I get. Sorry for not having been able to send a log since I reported the issue, I have some problems wiring my phone on my computer to run adb.

@kalon33 look up "wireless adb" you can connect locally say to adb in Termux, no PC or cable needed ;)

It seems to have been fixed in 2.13.0-playstore. @wiktor-k is this also working for you?

I’m gonna be honest with you. My current best understanding of the issue is that if you ever installed 2.13.0-beta on a device that got upgraded from 11 or 12 to 13 it will be broken permanently until you reinstall.
2.13.0 didn’t make any storage related changes over 2.13.0-beta.2. So unless the mere fact that the app got upgraded fixed anything I don’t think 2.13.0 did it.

Yeah, I tried with the latest thing from Play Store and it did not work. I've uninstalled the app, withdrawn from the beta testing, installed stable (2.12) and it's working fine. Too bad that the messages could not have been backed up but such is life I guess 🤷‍♂️