Message disappears on send when sharing photo
I first noticed this after the recent update to the Photos app. When sharing from within that app, a toast notification says "Sharing to TextSecure..." and the message composition process continues as expected. When sent, the message disappears.
This bug does not happen when the sharing process is started from within TextSecure through either the paperclip icon or the "Add attachment" menu option.
Nexus 5, Android 5.1.1 (LMY48B), T-Mobile US
I can reproduce this on Nexus 4, stock Android 5.1.1 and the new Photos app which was released at Google I/O 2015 (version 1.0.0.94391081).
At first I thought this might be duplicate of the issue (which I can't find now) where attaching images from the cloud would not work. But I'm able to reproduce this both with on device images and cloud images.
After sharing from Photos the image thumbnail appears correctly in the conversation but when you tap Send it just disappears. Also if you type some text to accompany the image both the text and image just vanish after sending. The recipient does not get the disappeared messages.
Debug log: https://gist.github.com/anonymous/0fdb01ccab1c4dc2e0af
W/PartDatabase( 5001): inserting part to mms 513
W/PartDatabase( 5001): Writing part data from URI
W/MessageSender( 5001): ws.com.google.android.mms.MmsException: java.io.IOException: java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{8b379a8 5001:org.thoughtcrime.securesms/u0a89} (pid=5001, uid=10089) that is not exported from uid 10069
W/MessageSender( 5001): at org.thoughtcrime.securesms.database.PartDatabase.writePartData(PartDatabase.java:404)
W/MessageSender( 5001): at org.thoughtcrime.securesms.database.PartDatabase.insertPart(PartDatabase.java:441)
W/MessageSender( 5001): at org.thoughtcrime.securesms.database.PartDatabase.insertParts(PartDatabase.java:228)
W/MessageSender( 5001): at org.thoughtcrime.securesms.database.MmsDatabase.insertMediaMessage(MmsDatabase.java:757)
W/MessageSender( 5001): at org.thoughtcrime.securesms.database.MmsDatabase.insertMessageOutbox(MmsDatabase.java:724)
W/MessageSender( 5001): at org.thoughtcrime.securesms.sms.MessageSender.send(MessageSender.java:102)
W/MessageSender( 5001): at org.thoughtcrime.securesms.ConversationActivity$14.doInBackground(ConversationActivity.java:1058)
W/MessageSender( 5001): at org.thoughtcrime.securesms.ConversationActivity$14.doInBackground(ConversationActivity.java:1055)
W/MessageSender( 5001): at android.os.AsyncTask$2.call(AsyncTask.java:292)
W/MessageSender( 5001): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
W/MessageSender( 5001): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
W/MessageSender( 5001): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
W/MessageSender( 5001): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
W/MessageSender( 5001): at java.lang.Thread.run(Thread.java:818)
W/MessageSender( 5001): Caused by: java.io.IOException: java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{8b379a8 5001:org.thoughtcrime.securesms/u0a89} (pid=5001, uid=10089) that is not exported from uid 10069
W/MessageSender( 5001): at org.thoughtcrime.securesms.mms.PartAuthority.getPartStream(PartAuthority.java:52)
W/MessageSender( 5001): at org.thoughtcrime.securesms.database.PartDatabase.writePartData(PartDatabase.java:398)
W/MessageSender( 5001): ... 13 more
W/MessageSender( 5001): Caused by: java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{8b379a8 5001:org.thoughtcrime.securesms/u0a89} (pid=5001, uid=10089) that is not exported from uid 10069
W/MessageSender( 5001): at android.os.Parcel.readException(Parcel.java:1546)
W/MessageSender( 5001): at android.os.Parcel.readException(Parcel.java:1499)
W/MessageSender( 5001): at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3314)
W/MessageSender( 5001): at android.app.ActivityThread.acquireProvider(ActivityThread.java:4624)
W/MessageSender( 5001): at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2472)
W/MessageSender( 5001): at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1442)
W/MessageSender( 5001): at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1064)
W/MessageSender( 5001): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:921)
W/MessageSender( 5001): at android.content.ContentResolver.openInputStream(ContentResolver.java:646)
W/MessageSender( 5001): at org.thoughtcrime.securesms.mms.PartAuthority.getPartStream(PartAuthority.java:49)
W/MessageSender( 5001): ... 14 more
we need a content provider permissions wizard to help address this issue and PR #3154
lol, check it out, google thought it'd be funny to encode the actual URI into the path of their bullshit URI
bullshit URI
content://com.google.android.apps.photos.contentprovider/0/1/content%3A%2F%2Fmedia%2Fexternal%2Fimages%2Fmedia%2F75627/ACTUAL
decoded bullshit URI
content://com.google.android.apps.photos.contentprovider/0/1/content://media/external/images/media/75627/ACTUAL
I heard iOS got some cool new things at WWDC today, Google IO brought us this. :fire: :computer: :fire:
I am still seeing instances of this bug with photos and videos shared via the Gallery app to Signal. Sometimes, right after hitting "send", the whole message simply disappears. Debug log https://gist.github.com/ef9e3dddd567535c478cc9814fa78868