Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Wrong image in chat preview

Open yendar28 opened this issue 12 years ago • 31 comments

Hello,

when I send an image, in the chat there is shown an image I sent before instead of the right one I just have sent. When it is clicked, the right one is shown in full screen.

Even when I delete the conversation and I send a new image, the old wrong picture is shown in chat. (Fullscreen shows the right image). Does Deletion of conversation not delete data of the conversation?

Greets

yendar28 avatar Feb 27 '14 17:02 yendar28

Hmm, I can't reproduce this. My image preview is the correct one, even when I send multiple different images in a row. What version of Android are you using? And, while I can't imagine why it would matter, is this a group or single conversation? Trying to reproduce.

mcginty avatar Feb 27 '14 22:02 mcginty

sender: Android 2.3.6 reciever: Android 4.1.2 (both original, without jailbreak, mod or something) It's a single conversation. A wrong image first was shown at reciever. after some tries on sender, too. But not the same wrong image. I'll try some more variations of sending with exact noting of execution and result, perhaps that could help you.

yendar28 avatar Feb 28 '14 11:02 yendar28

Had a similar issue only on the sender phone ( android4.0). Not on the recipient (4.4). The next two pictures are displayed right at sender. But I can't open the pictures in the gallery by touching it.

christosk avatar Feb 28 '14 21:02 christosk

+1 this issue... Took 3 different pictures, A, B, C. Sent image A OK, Sent image B OK... Next day i send image C however it displays image A on my side. Tried to sent image C again and it displays image B on my side. On the recipients phone it just displays black image. 'Refreshed Push Directory' and sent C again and finally displayed correct image on my side but recipient did not receive any images. Image only changes to incorrect one after it's sent, so one cannot tell beforehand. Same issue happened a couple of other times with same recipient however not tested enough with others. All sent over data channel. Sender: Android 4.3.1 CM 10.1.

phrag avatar Mar 01 '14 19:03 phrag

Happening frequently still, however recipient see's correct image whilst i see a random one. Last time i sent new image, but see the previous image that was sent to me by same person. Very confusing... Possibly dangerous if this bug could affect cross conversation, ie. wrong image to wrong person, although i have no reason to suggest this, just hilighting potential threats. I would really like this bug fixed as i am now a heavy user of this application along with friends/family, and very much want to see it succeed. Happy to provide any more information or tests if it helps. Thanks for the great work =)

phrag avatar Mar 02 '14 16:03 phrag

I got the same problem with Android 4.2.2 (Samsung). The picture I see in the chat is one from another chat. However the person got the right picture.

laxas avatar Mar 12 '14 17:03 laxas

I'm able to reproduce this easily between a pair of phones:

Nexus 4 - 4.4.2, vanilla Nexus 5 - 4.4.2, vanilla

Additional details:

  • Both phones are using the stock Android Gallery, NOT the Google+ "Photos" for external viewing (probably not relevant).
  • This happens with both encrypted local storage in TextSecure and without.
  • Verified with both AT&T and T-Mobile MVNOs, although my testing mostly via secure communication over wifi.
  • I can verify that image thumbnails for sent pictures also show up incorrectly at times.

Workaround: Force stopping the app and restarting it yields the correct picture thumbnail, however this is fairly useless as a workaround - you need to know you received the wrong image.

bconway avatar Mar 26 '14 01:03 bconway

My environment:

  • Nexus 5 - 4.4.2 Stock
  • Currently up-to-date TextSecure installed.

I've noticed that this issue occurs more frequently for me when a certain sequence of events happens.

  1. Person A sends me an MMS message containing a picture.
  2. I delete the conversation of person A.
  3. I take a photo with my camera and send it to person C.
  4. The thumbnail is the photo that person A sent me, however person C receives the correct photo.

Killing the application seems to resolve the issue, so my guess is it might be cache or temporary index related.

deanpearce avatar May 27 '14 20:05 deanpearce

Still an issue here with the latest TextSecure version. Same phones as my post above. Thanks.

bconway avatar May 29 '14 17:05 bconway

Is this bug still present?

bconway avatar Sep 16 '14 12:09 bconway

I did not encounter it anymore, but I don't get to many pictures via Textsecure, so I cannot be sure, the bug is really gone.

Am 16.09.2014 um 14:52 schrieb Brian Conway:

Is this bug still present?

— Reply to this email directly or view it on GitHub https://github.com/WhisperSystems/TextSecure/issues/840#issuecomment-55737208.

oktarinen avatar Sep 16 '14 17:09 oktarinen

To answer my own question, the wrong image is still shown in the conversation dialog as of 2.1.8.

I also get an error trying to send encrypted images over a few hundred KB and fall back to MMS, but that's no doubt filed elsewhere.

Back to Hangouts for now.

bconway avatar Sep 16 '14 19:09 bconway

This issue is still present for me. TextSecure v2.2.0, Android v4.4.2 on Nexus 5. Noticed when my brother sent me an image I didn't like and it kept reappearing when other people sent me images.

Steps to reproduce (by texting images to your own phone number):

  1. Send image A
  2. Delete received image A
  3. Send image B
  4. Delete received image B
  5. Send image C
  6. By now you should have seen the issue

prophetzopu avatar Oct 28 '14 16:10 prophetzopu

Worth noting that I also regularly delete images out of my stream after I've seen them, perhaps this issue happens more frequently in that context.

bconway avatar Oct 28 '14 16:10 bconway

@GeorgeMiller Great! Thanks for the steps to reproduce!

Reproduced on step 3 already: Self send message showed preview of the image sent before. Received preview was correct... Stayed in the conversation while trying. . After reentering the conversation the previews were correct again?!

Still on a pre 2.2.0 Version (no selfie short circuit)

Edit: not correct after reentering every time.😕

McLoo avatar Oct 28 '14 17:10 McLoo

@McLoo Glad the steps to reproduce actually worked on another device!

Upon re-entering the conversation, the previews did not correct for me. After attempting to reproduce several times, I notice that when you click on the previews and answer "Yes" to "View secure media?" the images vs previews get very out of sync. I have not looked at TextSecure's source, but I imagine keeping encrypted and unencrypted data paired can be a headache... and FWIW security-wise mismatching previews with actual content could be considered a feature.

prophetzopu avatar Oct 28 '14 17:10 prophetzopu

Wohoo reproduced cross conversational. Send image in group Deleted group Self sent outgoing image had preview from image sent in group

Getting closer to the wrong preview issues!

_Edit: maybe related to #508_

McLoo avatar Oct 28 '14 19:10 McLoo

Very reproducible by sending pic, deleting, sending pic. Thanks very much everyone for working out steps, that makes my life way easier. Will get fix out soon.

mcginty avatar Oct 30 '14 02:10 mcginty

Still present :/

ghost avatar Feb 01 '15 14:02 ghost

The basics of this problem is that it is possible for both message and part IDs to be reused. ImageSlide has its own internal cache that is used for image previews and the index to this cache is the part URI which is derived from the part ID. MmsDatabase contains a SlideDeck cache which uses message IDs for indexes.

Potential fixes that I'm aware of:

  1. migrate the _id columns in the part and mms tables to be INTEGER PRIMARY KEY AUTOINCREMENT.
  2. implement proper cache expiration by expiring cache for parts and messages on insert.

Migrating the part and mms tables is not possible unless the user had enough free storage space, checking for and working around that is pretty complicated. Fixing the cache expiration should be easier but requires a refactoring of how ImageSlide and PartDatabase access cache.

rhodey avatar Mar 10 '15 21:03 rhodey