signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.45k stars 6.09k forks source link

MMS Receiving not working with non signal users #8571

Closed aeppacher closed 4 years ago

aeppacher commented 5 years ago

Bug description

Cannot receive MMS from non signal users at all

Steps to reproduce

Attempts to fix

Actual result: Message just says mms fails to download, click to retry Expected result: See the mms

Device info

Device: OnePlus 6T Android version: 9.0.0 Signal version: 4.32.8 Carrier: Verizon

Link to debug log

https://debuglogs.org/c4b1cd7ad755c63f96d26c173b5324b5d7125dedf51032e09e0e1715e0f52280

greyson-signal commented 5 years ago

Looks like we're having trouble establishing an MMS connection:

2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection: null
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection: java.io.FileNotFoundException: open failed: ENOENT (No such file or directory)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at android.os.ParcelFileDescriptor.openInternal(ParcelFileDescriptor.java:313)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at android.os.ParcelFileDescriptor.open(ParcelFileDescriptor.java:211)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at org.thoughtcrime.securesms.providers.MmsBodyProvider.openFile(MmsBodyProvider.java:77)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at android.content.ContentProvider.openAssetFile(ContentProvider.java:1626)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at android.content.ContentProvider.openTypedAssetFile(ContentProvider.java:1806)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at android.content.ContentProvider.openTypedAssetFile(ContentProvider.java:1872)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:487)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1503)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1340)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at android.content.ContentResolver.openInputStream(ContentResolver.java:1060)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at org.thoughtcrime.securesms.providers.MmsBodyProvider$Pointer.getInputStream(MmsBodyProvider.java:133)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at org.thoughtcrime.securesms.mms.IncomingLollipopMmsConnection.retrieve(IncomingLollipopMmsConnection.java:92)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at org.thoughtcrime.securesms.mms.CompatMmsConnection.retrieve(CompatMmsConnection.java:76)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at org.thoughtcrime.securesms.jobs.MmsDownloadJob.onRun(MmsDownloadJob.java:140)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at org.thoughtcrime.securesms.jobmanager.Job.doWorkInternal(Job.java:111)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at org.thoughtcrime.securesms.jobmanager.Job.doWork(Job.java:64)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at androidx.work.Worker$1.run(Worker.java:84)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2019-01-28 17:14:07.325 EST W IncomingLollipopMmsConnection:    at java.lang.Thread.run(Thread.java:764)
2019-01-28 17:14:07.337 EST W CompatMmsConnection: null
2019-01-28 17:14:07.337 EST W CompatMmsConnection: org.thoughtcrime.securesms.mms.MmsException: java.io.FileNotFoundException: open failed: ENOENT (No such file or directory)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at org.thoughtcrime.securesms.mms.IncomingLollipopMmsConnection.retrieve(IncomingLollipopMmsConnection.java:105)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at org.thoughtcrime.securesms.mms.CompatMmsConnection.retrieve(CompatMmsConnection.java:76)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at org.thoughtcrime.securesms.jobs.MmsDownloadJob.onRun(MmsDownloadJob.java:140)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at org.thoughtcrime.securesms.jobmanager.Job.doWorkInternal(Job.java:111)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at org.thoughtcrime.securesms.jobmanager.Job.doWork(Job.java:64)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at androidx.work.Worker$1.run(Worker.java:84)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at java.lang.Thread.run(Thread.java:764)
2019-01-28 17:14:07.337 EST W CompatMmsConnection: Caused by: java.io.FileNotFoundException: open failed: ENOENT (No such file or directory)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at android.os.ParcelFileDescriptor.openInternal(ParcelFileDescriptor.java:313)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at android.os.ParcelFileDescriptor.open(ParcelFileDescriptor.java:211)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at org.thoughtcrime.securesms.providers.MmsBodyProvider.openFile(MmsBodyProvider.java:77)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at android.content.ContentProvider.openAssetFile(ContentProvider.java:1626)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at android.content.ContentProvider.openTypedAssetFile(ContentProvider.java:1806)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at android.content.ContentProvider.openTypedAssetFile(ContentProvider.java:1872)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:487)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1503)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1340)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at android.content.ContentResolver.openInputStream(ContentResolver.java:1060)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at org.thoughtcrime.securesms.providers.MmsBodyProvider$Pointer.getInputStream(MmsBodyProvider.java:133)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  at org.thoughtcrime.securesms.mms.IncomingLollipopMmsConnection.retrieve(IncomingLollipopMmsConnection.java:92)
2019-01-28 17:14:07.337 EST W CompatMmsConnection:  ... 8 more
2019-01-28 17:14:07.344 EST I CompatMmsConnection: Falling back to receiving via legacy connection
2019-01-28 17:14:07.345 EST W MmsDownloadJob: null
2019-01-28 17:14:07.345 EST W MmsDownloadJob: java.io.IOException: Both lollipop and fallback APIs failed...
2019-01-28 17:14:07.345 EST W MmsDownloadJob:   at org.thoughtcrime.securesms.mms.CompatMmsConnection.retrieve(CompatMmsConnection.java:98)
2019-01-28 17:14:07.345 EST W MmsDownloadJob:   at org.thoughtcrime.securesms.jobs.MmsDownloadJob.onRun(MmsDownloadJob.java:140)
2019-01-28 17:14:07.345 EST W MmsDownloadJob:   at org.thoughtcrime.securesms.jobmanager.Job.doWorkInternal(Job.java:111)
2019-01-28 17:14:07.345 EST W MmsDownloadJob:   at org.thoughtcrime.securesms.jobmanager.Job.doWork(Job.java:64)
2019-01-28 17:14:07.345 EST W MmsDownloadJob:   at androidx.work.Worker$1.run(Worker.java:84)
2019-01-28 17:14:07.345 EST W MmsDownloadJob:   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2019-01-28 17:14:07.345 EST W MmsDownloadJob:   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2019-01-28 17:14:07.345 EST W MmsDownloadJob:   at java.lang.Thread.run(Thread.java:764)
aeppacher commented 5 years ago

Any ideas on what could cause this/what I could do to fix it?

greyson-signal commented 5 years ago

I don't have any immediate ideas, sorry. Just wanted to note what the issue was for future reference.

aeppacher commented 5 years ago

I am thinking this may have something to do with using a oneplus phone on Verizon. Its a new CDMAless service they offer. The default APN can't be changed and it disallows any custom apns from being used. This is the apn in use https://photos.app.goo.gl/opc3dtBE3AJ2mgQR8

dolangish commented 5 years ago

I too have this problem and am using a oneplus 6t on the Verizon network. MMS works fine in other apps like the Android "Messages" app.

jadedgnome commented 5 years ago

I'm using a h2o sim on a unlocked sprint device and i've been experiencing the same thing.

p.s my APN settings are correct

leondague commented 5 years ago

FWIW, I got someone on Google Hangouts to send an MMS with a PNG image file to my AT&T Samsung S7, Signal 4.33.5, Android 8.0.0, and I seemed to get it OK.

emptyflask commented 5 years ago

Same problem with Signal 4.33.5 on a Samsung Galaxy S9 and T-Mobile.

dschoel commented 5 years ago

Same issue on OnePlus 6T with Verizon https://debuglogs.org/3cce7d2364339a489a354f6b7efe6e565e95dda0c6401e2e62bdddbba2b216c4

gbakeman commented 5 years ago

Chiming in here as another OP6T user on Verizon. Then again, back when I had an HTC One M8 user also on Verizon, I remember Signal had the same issue...

https://debuglogs.org/433a6f92aad3742488b8f7bf903797e050e975574583daae623d4b523b347393

JoshRacine commented 5 years ago

Same issue with new phone I got yesterday.

Carrier: Verizon Phone: Razer Phone 2 (Latest updates, android 9) Signal Version: 4.36.2

Old nexus 6p did not have this issue. Same carrier, same signal version, android 8.1.0.

seanhead commented 5 years ago

also seeing this on a OP6T connected to verizon.

crc128 commented 5 years ago

Started happening to me sometime after the 19th Feb 2019.

Carrier: Optus Phone: Samsung S5 Current Signal Version: 4.34.5.461

robojerk commented 5 years ago

Usually if I have wifi connected I get the problem, turning it off fixes it. If I don't have wifi on when I experience the issue, turning Airplane mode on then off gets things working. Pixel 2XL on TMO.

rbavery commented 5 years ago

Same problem on Android S7. Carrier: vErizon. Signal version 4.38.3.

Debug log: https://debuglogs.org/48507d6ad975b3e21fe3674c587f7139f5538e33eb9087e3327664aaf0bb148f

alt-grr commented 5 years ago

It never worked for me, on many Android versions, including 9.

pgkdc commented 5 years ago

Same issue on blackberry key2le on verizon. Also a CDMA-less device.

sfstout commented 5 years ago

Same issue with OnePlus 7 Pro on Verizon. Able to receive MMS fine using the default app. I love Signal and would love to keep using it as my default app.

Interestingly, I am able to send MMS messages, I just cannot receive them.

Steps to reproduce:

  1. Have a non-Signal user send an MMS message
  2. Wait to receive

Expected results: Receive MMS message

Observed results: Do not receive MMS message, instead get "Error downloading MMS message, tap to retry".

Additional info: If I tap to retry, it still fails.

Debug log: https://debuglogs.org/a79d1bf259faac21ec373eb5d27907a82ca4c9f6fe23222421385bf10cc345be

Version: 4.39.4

dtenenba commented 5 years ago

Same issue with a Google Pixel 3 (blueline) on AT&T (unlocked).

I do find I am able to see the MMS if I reboot the phone. Killing and restarting the Signal App is not enough to do it.

Signal 4.39.4

Debug log: https://debuglogs.org/747cb071ff28b4f21e8b9c0fd2cef63de9a031a76243cf646f8b6b6b3b65efc1

This is a fairly big blocker as I receive a number of messages like this every day.

Coehill commented 5 years ago

I'm getting this issue too with a Samsung Galaxy S8, latest OS version, and latest signal version. Every time I tap to retry, it fails to download the image. For now, I am using a different messaging app as this is a necessary functionality for me. I would love nothing more than to go back to using Signal!

Android Version 9 Signal 4.40.4 Rogers ISP

Debug Log: https://debuglogs.org/41520d64f26830573acdbbb612271fa562a7472ca264bec238ca82048468d1c1

akwala commented 5 years ago

+1

Signal 4.41.6 Android 9 Moto G5 Plus XT1687 AT&T

Coleslaw3557 commented 5 years ago

Same issue. OnePlus 7 Pro - Verizon - CDMA Less feature activated.

Coleslaw3557 commented 5 years ago

Exact same issue. One Plus 7 Pro - VZW with CDMA Less enabled.

Whitak3r commented 5 years ago

Same problem here. Oneplus 7 pro, Verizon CDMA-less. Signal to signal works fine... All non signal users "fail to download mms"

GrahamHensley commented 5 years ago

I have the same issue. One Plus 7 Pro Verizon CDMA-less MMS send correctly from Signal, when received always "fail to download mms" switching to Android Messages MMS are received correctly Signal 4.43.8

lahma0 commented 5 years ago

I also have the same problem on Verizon with the OnePlus 7 Pro. As already stated by others, this phone is registered as a "CDMA-less" device on Verizon's network (specifically, "Feature #83856" has to be added to the line the device is used on).

The behavior is the same regardless of whether I have 'WiFi Calling' compatibility mode turned on/off in the Signal settings and the outcome is also the same regardless of whether I am connected only to WiFi or only to mobile data (LTE). As others have also stated, sending/receiving MMS messages works fine in other SMS applications. I feel absolutely naked when Signal is not set as my default SMS/messaging, so I hope this can be resolved soon. I would be happy to provide packet captures or anything else that would be helpful in fixing the issue so please just let me know (my bootloader is currently locked, so I will need a bit of time to unlock it and gain root, but I would be happy to do so in order to provide any info that would be useful). Signal 4.43.8 Debug Log: https://debuglogs.org/b41ec97282c18311c88f95224270c8b3f752f68f3a1e17adef15dbd4202ec823 (Relevant lines start @ 07-12 04:39:18.573)

Rewzilla commented 5 years ago

Same issues here...

Debug log suggests it's failing to download the MMS

Whitak3r commented 5 years ago

Had anyone had any luck fixing this? I recently hard reset my phone just to check if I was using some magisk rom/modual to see if that was the problem, nope. I was using magisk + xxx NoLimits. I have a few other minor problems unrelated to messaging.

I reset everything and now I'm using stock OOS on oneplus 7 pro rooted. 9.5.10.... Still no mms through non signal users...

akwala commented 5 years ago

+1

Signal 4.41.6 Android 9 Moto G5 Plus XT1687 AT&T

In my case, some Group/MMS messages appear as expected in groups with non-Signal users, but the majority fail to download.

I have also seen the failed-to-download MMS errors, for messages from participants of an unsecured group, appear as if they were sent to/as individual conversations with the respective senders, instead of appearing in the group conversation.

andrewjs18 commented 5 years ago

I'm also having this issue with my oneplus pro 7 on verizon's network. signal to signal MMS works fine. when someone not using signal sends an MMS, it fails to download and retrying doesn't do anything, as others have mentioned above.

specs: oneplus pro 7 on verizon's network oxygen os 9.5.10.GM21AA signal 4.44.7

debug log: https://debuglogs.org/48ebfe93dd41bd93caa15d37d1847a358e96596e8dd54d20e88d997ee249932b?fbclid=IwAR0QrjuBE0DkhB1P9ziaR-V85wA21Ln0DoCtvXu1DqDN0DbK5sW0vALW3yY

victort commented 5 years ago

same issue here, CDMA Verizon Palm PVG100 (the tiny phone) standalone edition.

Worked fine on my blackberry Priv.. does not work on this, my new phone.

Android v8.1.0

mdaniel commented 5 years ago

I now have this working for my Pixel 3 on "Visible" (who appears to be actually Verizon).

In my specific circumstance, the MMS Content-Location PDU was coming back with just servlets/mms?message-id= without the explicit inclusion of, you know, the message-id. However, thankfully I was able to find someone with a correct looking URL which led me to wonder if the message-id was actually in the MMS PDU, just hiding elsewhere. In my case, yes it was, and it turns out there is also an SmsManager knob MMS_CONFIG_APPEND_TRANSACTION_ID just for such a circumstance, which one can interrogate [SmsManager.getCarrierConfigValues()](https://developer.android.com/reference/android/telephony/SmsManager.html#getCarrierConfigValues()) to discover if your carrier is expecting it.

As soon as I checked for that boolean (which at least for Verizon Visible was correctly coming back as true) and appended the tx-id as they asked, poof, MMS reception started to work for me. I was even able to retroactively download failed messages from earlier this week since the Signal database was already storing all the required information.

diff --git a/src/org/thoughtcrime/securesms/mms/IncomingLollipopMmsConnection.java b/src/org/thoughtcrime/securesms/mms/IncomingLollipopMmsConnection.java
index a3c58e551..8064845e4 100644
--- a/src/org/thoughtcrime/securesms/mms/IncomingLollipopMmsConnection.java
+++ b/src/org/thoughtcrime/securesms/mms/IncomingLollipopMmsConnection.java
@@ -70,7 +75,10 @@ public class IncomingLollipopMmsConnection extends LollipopMmsConnection impleme
     try {
       MmsBodyProvider.Pointer pointer = MmsBodyProvider.makeTemporaryPointer(getContext());

-      Log.i(TAG, "downloading multimedia from " + contentLocation + " to " + pointer.getUri());
+      final String transactionIdStr = Util.toIsoString(transactionId);
+      Log.i(TAG, "downloading subscriptionId=" + subscriptionId +
+              "multimedia from \"" + contentLocation + "\"" +
+              "[transactionId=\"" + transactionIdStr + "\"] to \"" + pointer.getUri()+"\"");

       SmsManager smsManager;

@@ -80,10 +88,19 @@ public class IncomingLollipopMmsConnection extends LollipopMmsConnection impleme
         smsManager = SmsManager.getDefault();
       }

+      // fixes https://github.com/signalapp/Signal-Android/issues/8571
+      final Bundle configOverrides = smsManager.getCarrierConfigValues();
+      // this *reads* like passing such a thing into downloadMultimediaMessage() would cause *it*
+      // to do the appending, but at least on Android 10 that is not the case
+      if (configOverrides.getBoolean(SmsManager.MMS_CONFIG_APPEND_TRANSACTION_ID)) {
+        //  && contentLocation.endsWith("message-id=")
+        Log.i(TAG, "Appending transactionId to contentLocation at the direction of CarrierConfigValues");
+        contentLocation += transactionIdStr;
+      }
       smsManager.downloadMultimediaMessage(getContext(),
                                            contentLocation,
                                            pointer.getUri(),
-                                           null,
+                                           configOverrides,
                                            getPendingIntent());

       waitForResult();

I have no idea if it would work for anyone else, nor how the Signal team wants to proceed -- do you want a PR with :point_up: or wait for someone else to confirm the fix works for them?

lahma0 commented 4 years ago

I have no idea if it would work for anyone else, nor how the Signal team wants to proceed -- do you want a PR with ☝️ or wait for someone else to confirm the fix works for them?

@mdaniel , great work man! I'm on a OnePlus 7 Pro on Verizon and as I reported earlier in this thread, I am experiencing the same MMS issues. I am going to try to build an APK with your changes and try it out so I can confirm whether the solution is identical on Verizon (at least on my phone model). I don't currently have Eclipse installed, so it will probably take me a little bit to get my development environment setup so I can compile the APK. As soon as I do though, I will report back here with my findings. Thanks again for your contribution! P.S. I'm going to shoot you a PM to ask a quick question if you don't mind.

mdaniel commented 4 years ago

so it will probably take me a little bit to get my development environment setup so I can compile the APK

If you speak docker, they appear to have a Dockerfile, although watch out for the PKCS11 stuff, as I don't know if that's involved in debug builds or not, just raising your awareness. I'll try to start a docker build now to "play along at home" and see if one can, in fact, build apks entirely in docker

Aside from the fact that the Android Studio is based on IntelliJ, I think you will find IntelliJ has overall better support for android + gradle + damn near everything.

I'm going to shoot you a PM to ask a quick question if you don't mind.

By far the better approach would be to use these comments, or their community forum, or even Reddit to avoid information silos. If it interests you, it likely interests others, too

Good luck to us all, and I hope it fixes the problem in your situation, too

andrewjs18 commented 4 years ago

@lahma69 looking forward to your testing. I'm also on a oneplus 7 pro with verizon..

mdaniel commented 4 years ago

8837 needs to land before one can build in docker; I guess the Signal team uses image caching or doesn't build in docker for that PR to be open since May :-(

lahma0 commented 4 years ago

Ya, I appreciate the advice. I decided to install IntelliJ instead. I used Eclipse previously when I was doing Android development but the last Android project I worked on (a client app for communicating with a bluetooth low energy prototype device) was quite a long time ago (like Android 4.4/5.0). A docker image would have been nice, but it's no big deal. I went ahead and just installed it on my Windows box. I'm juggling several different things at the moment, but I will try to get it compiled some time tonight or in the morning. (Btw, I quickly realized that Github no longer has PMs after posting my previous reply. I was just going to ask whether you might send me the APK you had already compiled, but I think it is better that I went ahead and did it myself. That way if I need to make any modifications or insert some quick lines for logcat output or something I can.)

lahma0 commented 4 years ago

I haven't forgotten to test your build @mdaniel... Just been super busy. I'm going to try to get to it today if I can. I'll post an update just as soon as I do.

lahma0 commented 4 years ago

Alright.. So I can now officially confirm that implementing the changes suggested by @mdaniel in the file IncomingLollipopMmsConnection.java do indeed fix the MMS problems described in this issue (#8571). Or more precisely, implementing those changes restores complete MMS functionality for me on my OnePlus 7 Pro on Verizon (running Android 9/Oxygen OS 9.5.11.GM21AA).

Strangely, I was not able to retroactively download previously failed MMS messages as @mdaniel suggested he was able to. I'm not sure why this would be different for me, but I don't think its really of much importance since the primary issue is solved. Hopefully, now that there are at least 2 confirmed reports of this change fixing the described issue, the Signal devs will either implement the changes themselves or allow @mdaniel to submit the changes himself for their approval.

If anyone wants to test if these changes fix the problem for them as well, but don't want to spend the time and effort to setup a build environment, I will share the APK I compiled/signed myself. You should be aware of the risks of installing an unverified APK and if you don't trust me (which you probably shouldn't if you don't know me), you should probably limit your use of the APK to testing only (and there may still be risks because of the inherently private information required to setup Signal and the permissions it requires). While it would be a relatively straight forward task for someone with the necessary tools/skills to verify that the only file I've changed is IncomingLollipopMmsConnection.java, I doubt anyone is going to go take the time to do that in this instance. So, with all of that out the way, all you need to do is download the modified APK, backup your existing Signal messages, uninstall Signal (this is required since this APK is signed with a different key), and install the modified APK. Again, unless you trust me, I wouldn't restore your backup messages (requiring you to input your backup/restore password). Just do the minimal setup and then test the MMS functionality that was failing for you previously. Signal-play-universal-release-SignedWithTestKeys-4.47.6-MMSFix.apk

It would be very helpful to get some input from one of the official developers on how to best move forward on getting these changes implemented. Thanks again for finding the fix @mdaniel!

geoffro10 commented 4 years ago

FWIW, I was having similar problems with MMS messages being delivered on my Pixel with Google Fi. Switched to regular messaging and all was fine. Tried the @lahma69 APK and did some test messaging and it worked fine. Not sure if it's coincidence or not, just wanted to add my input. Thanks @mdaniel and @lahma69 for your work.

lahma0 commented 4 years ago

Hey @geoffro10. It is good to know that the fix implemented by @mdaniel worked for someone else. What version of Android are you running on your Pixel?

geoffro10 commented 4 years ago

@lahma69 , I'm on Android 10.

pjv commented 4 years ago

i don't want to run an unknown APK on my phone, but i really DO want signal to receive MMS messages (and especially group MMS texts). Can any official signal-android dev chime in here and say something about the likelihood and timing of this patch being evaluated for merging?

mdaniel commented 4 years ago

I wired up a CircleCI build for this branch: https://circleci.com/gh/mdaniel/Signal-Android/8#artifacts/containers/0 which means one of two things: you can inspect the build log to see that nothing underhanded went on, or you can clone the repo, apply that patch, apply the .circleci/config.yml to your own fork, build it (CircleCI does not charge for building open source projects), and then install your own built APK

There are two three further caveats about that build: up until this point, I had been applying that patch to v4.47.6 but that APK is built from master, in preparation for (hopefully!) going through the PR process to land the change for real, and the second caveat is that I have been building release builds for my phone using my android key, so I've never actually tested any of the unsigned debug builds, and the build is against CircleCI's generic android docker image (not the one from #8837) since there was some userns tomfoolery that made CircleCI unhappy. They probably work fine just be aware if those are things which are relevant to you

greyson-signal commented 4 years ago

Ah, well, discovered that commit isn't foolproof. Gonna revert it. Breaks downloads for some people who have that "append transaction id" flag set. More research will have to be done to figure out exactly what's happening here.

mdaniel commented 4 years ago

I did read that adding options is bad and similarly about the "power users," but as a for-your-consideration, leaving the code in but perhaps behind a toggle (even if hidden in the Advanced screen) would allow the folks in this issue to continue to test if it fixes the problem for them, with their phones (on their carriers), without giving up the (tiny?) forward progress we made

Regrettably, that commit a few weeks ago was the first time I had ever had to deal with the Android telephony API, so the number of potential dragons feels enormous, but without gathering more reports of "works for me with $phone on $carrier" and "not for me with $otherPhone on $otherCarrier" I fear this issue will go back onto the backburner as not a priority for Signal


FWIW, I also went sniffing around F-Droid to see if there were other open source MMS-friendly apps from which we could learn, and discovered there is a fork of Signal, wherein they -- unsurprisingly -- had this same bug. However, in their issue they report that the stock OmniROM Messages app cured their woes by updating the rom's APN configuration. So I believe it's plausible that the users for whom this doesn't work are on an old rom that just outright advertises incorrect MMS settings for their carrier.

AMP3D commented 4 years ago

This issue has been plaguing me as of April 2017 at least!

I'm on a Galaxy S7 and the Verizon network. It seems to almost always happen when I send a message at the same time as I am receiving messages from one or more people in the MMS group. That combination throws everything into limbo for a while. Eventually (sometimes up to an hour?) later, everything is downloaded and i'm bombarded with a massive amount of messages that have been queuing up since the time the original error occurred.

This is by far the biggest problem Signal has and why i'm reluctant to recommend it. Thankfully MMS messages are not common for me so I can text 90% of the time just fine.

Here are my logs: https://debuglogs.org/0ac6d9bd7352c9ca0484576aa0d95d84257be3e2138e269ef02d7d5f7f7025e1

pwdove commented 4 years ago

@mdaniel

Works for me

Oneplus 6t OxygenOS 9.0.16 Verizon

Stock signal failed, same as everyone else.

mdaniel commented 4 years ago

Apologies, which "works for you?" A local build, or the Signal release v4.48.4 that contained the fix?

pwdove commented 4 years ago

Sorry. The apk posted. Shows v4.47.6 on my phone