Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMS MSISDN/Line1 headers missing #1935

Closed
tecknicaltom opened this issue Sep 18, 2014 · 21 comments
Closed

MMS MSISDN/Line1 headers missing #1935

tecknicaltom opened this issue Sep 18, 2014 · 21 comments
Assignees
Milestone

Comments

@tecknicaltom
Copy link
Contributor

I'm new to using TextSecure and I'm sorry if this is a dupe but I couldn't find a similar issue.

I just made TextSecure my default messaging app and when trying to download an MMS image, I receive "Error connecting to MMS provider..." I used the following manual MMS settings, as found in my phone's system menu (##3282#):
MMSC URL: http://mmsc.vmobl.com:8088
MMS Proxy Host: 68.28.31.2
MMS Proxy Port: 80

A debug log can be found at http://hastebin.com/idofelenev I think the log cut off the attempt to download MMS with the proxy, but in previous attempts it looked similar.

Virgin Mobile US, Android 4.4.2, TextSecure 2.1.8

@moxie0
Copy link
Contributor

moxie0 commented Sep 18, 2014

Thanks @tecknicaltom, this looks like the same issue as #1904 (although yours is better titled!). I'm going to close this, it'd be great if you could follow along over in the other issue. Thanks.

@moxie0 moxie0 closed this as completed Sep 18, 2014
@tecknicaltom
Copy link
Contributor Author

I don't think this is the same issue as #1904. Linked below is a new debug log demonstrating this issue in TextSecure 2.1.9 (after #1904 was fixed). Note the handling of the 401 response with and without a proxy on lines 83 and 108 of the log, looking like it's coming from:
https://github.com/WhisperSystems/TextSecure/blob/master/src/org/thoughtcrime/securesms/mms/MmsConnection.java#L141

http://hastebin.com/raxikeluci

Virgin Mobile US, Android 4.4.2, TextSecure 2.1.9

@mcginty mcginty reopened this Oct 15, 2014
@McLoo
Copy link
Contributor

McLoo commented Oct 16, 2014

@tecknicaltom could you try proxy address 205.239.233.136 with Port 80 and Port 81?
@mcginty didn't check, but do we care about user and password?
User Name: Sprint
Password: *

@mcginty
Copy link
Contributor

mcginty commented Oct 16, 2014

looks like we need to care

@mcginty
Copy link
Contributor

mcginty commented Oct 16, 2014

@tecknicaltom just pushed a new version of MmsMonster (https://play.google.com/store/apps/details?id=org.whispersystems.mmsmonster) that has some experimental authentication support. Should show up in a couple hours. Would you mind trying that out sending me the logs?

@NTICompass
Copy link

I've got an LG Volt running Android 4.4.2 (rooted) on Virgin Mobile. I've never got MMS to work with TextSecure on any of my Virgin Mobile phones (I had an Optimus V then an Optimus F3).

This might not be any sort of new info, but here's my debug log: http://hastebin.com/udibumayas

I have the MMS settings set to:

In the logs, I see:

W/MmsDownloadClickListener(13933): Content location: http://mmsc.vmobl.com:8088/ammsc/?Amuir0p7H-4BrZKMU
W/MmsDownloader(13933): Downloading mms at mmsc.vmobl.com
W/MmsDownloader(13933): Connecting directly...
W/MmsCommunication(13933): Getting MMSC params for apn null
W/TelephonyUtil(13933): Choosing MCC+MNC info from TelephonyManager.getSimOperator()
W/ApnDatabase(13933): Choosing locally-overridden MMS settings
W/MmsCommunication(13933): returning vacuous success since MMS radio is not in use
W/IncomingMmsConnection(13933): got successful route to host mmsc.vmobl.com
W/MmsCommunication(13933): connecting to http://mmsc.vmobl.com:8088/ammsc/?Amuir0p7H-4BrZKMU
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
V/TelephonyAutoProfiling(13933): [getValue] FEATURE key : support_copytosim_tp_oa_address_ntt_docomo, value : null
W/MmsCommunication(13933): * response code: HTTP/1.1 401 Authorization Required
W/IncomingMmsConnection(13933): java.io.IOException: unhandled response code
W/IncomingMmsConnection(13933):     at org.thoughtcrime.securesms.mms.MmsConnection.makeRequest(MmsConnection.java:149)
W/IncomingMmsConnection(13933):     at org.thoughtcrime.securesms.mms.IncomingMmsConnection.retrieve(IncomingMmsConnection.java:73)
W/IncomingMmsConnection(13933):     at org.thoughtcrime.securesms.service.MmsDownloader.retrieveAndStore(MmsDownloader.java:174)
W/IncomingMmsConnection(13933):     at org.thoughtcrime.securesms.service.MmsDownloader.handleDownloadMms(MmsDownloader.java:110)
W/IncomingMmsConnection(13933):     at org.thoughtcrime.securesms.service.MmsDownloader.process(MmsDownloader.java:66)
W/IncomingMmsConnection(13933):     at org.thoughtcrime.securesms.service.SendReceiveService$SendReceiveWorkItem.run(SendReceiveService.java:276)
W/IncomingMmsConnection(13933):     at org.thoughtcrime.securesms.util.WorkerThread.run(WorkerThread.java:46)

Not sure why it's not using the proxy info.

P.S. TextSecure 2.2.0

P.P.S. I ran MmsMonster, and it gave me: https://gist.github.com/d1cabcb3a8ae70c7f479

@mcginty
Copy link
Contributor

mcginty commented Nov 13, 2014

Looks like MmsMonster works for you, so I can just integrate the authentication code from that into TextSecure. Will probably fix your issues.

@NTICompass
Copy link

Glad my logs were useful! :-)

@NTICompass
Copy link

I noticed the app got updated to 2.3.3 in the store. I still can't get MMS to download, I'm still getting 401 errors.

https://gist.github.com/anonymous/47913d1902c4c8dc8ac8

I'm not sure if I need to change my MMS settings or not.

@mcginty
Copy link
Contributor

mcginty commented Dec 7, 2014

Hey @NTICompass! So yeah, we don't do authentication when there's no username and password specified in our APN list. Perhaps that entry is outdated? Can you do some research with your provider to see if they recently added a required username and password in order to login, or if they maybe require a custom User-Agent or something?

Unfortunately, this is about the extent to which logcats are helpful, and after this it's the game of figuring out the correct settings.

@NTICompass
Copy link

I found this: http://buzzmobile.us/virgin-mobile-apn-settings-usa/
All of my Google searching has given me this same info.

But those settings still give 401. I'll see if I can find anything else, or see if Virgin Mobile USA will tell me the settings.

@NTICompass
Copy link

I can't seem to find the right settings. I found something that may help, though: http://virgin-mms.wikispot.org/

P.S. When I e-mailed Virgin Mobile USA, this is what they said:

Unfortunatelly [sic], since TextSecure is a third party vendor application we
do not have trouble shooting [sic] steps for this application, we would like
to recommend you that you uninstall the application or contact the
vendor for this application so that you can get the necessary trouble
shooting [sic] steps.

@NTICompass
Copy link

Sorry if I'm bothering you too much about this issue, but I want to help get this fixed so I can get MMS working.
I knew that MMS worked via the native messaging app, so I went out to find out how. I installed tPacketCapture and found some neat info after opening the pcap file in Wireshark.

It was connecting to: http://mmsc.vmobl.com/ammsc/?Amuir0p7H-4BrZKMU

Accept: */*, application/vnd.wap.mms-message, application/vnd.wap.sic
x-wap-profile: x-wap-profile: http://device.sprintpcs.com/LG/LS740-VIRGIN/LS740ZV4.rdf
Accept-Language: en-US
X-MDN: 15555555555
Host: mmsc.vmobl.com
Connection: Keep-Alive
User-Agent: LS740 VIRGIN

(The X-MDN header is my phone number, I obviously didn't want to post it here)

Does this help? Can TextSecure be configured to send the same HTTP headers as the native messaging app? Is it sending the X-MDN header?

I can send the PCAP file if you want, I don't want to post it here.

@mcginty
Copy link
Contributor

mcginty commented Dec 12, 2014

This is the opposite of bothering - great research!

I think we need to, at the very least in the Manual MMS settings, allow custom HTTP headers (the User-Agent here is also different than what we use, and the x-wap-profile is Virgin-specific). When I make that change, it'll enable you to experiment with just setting X-MDN, for example, and seeing if that goes through. Then we can go from there to figure out how we can make this work by default.

@moxie0
Copy link
Contributor

moxie0 commented Dec 12, 2014

The Android L SmsManager tells you want headers you need to include.

On 12/11/2014 05:07 PM, Jake McGinty wrote:

This is the opposite of bothering - great research!

I think we need to, at the very least in the Manual MMS settings, allow
custom HTTP headers.


Reply to this email directly or view it on GitHub
#1935 (comment).

http://www.thoughtcrime.org

@NTICompass
Copy link

@mcginty: I think all that's needed is the X-MDN header, I'm not sure about the others. Once this change is set, I'll see what headers work. I was testing using rest-client and just adding the X-MDN header made the 401 error go away.

@moxie0: It looks like the SmsManager class adds a lot of new constants and methods.

@privacy1776
Copy link

I have this same issue as others of not being able to download via MMS. I am on the Virgin Mobile network, and have found a workaround (kinda) to being able to receive MMS. My phone has 4g service, and I have noticed if I change my network settings from LTE/CDMA to just CDMA and disable WIFI, I can receive MMS's. I have tried downloading with just WIFI, it does not work, the only thing that worked for me was just using CDMA without LTE.

Hope this can help someone fix this bug.

@NTICompass
Copy link

@privacy1776 I was just reading around the internet for info about my phone (LG Volt), and I found this: http://androidforums.com/threads/mod-universal-lte-virgin-mobile-apn-fix-wip-cm-aosp-4-4-x.840298/

This is for the Galaxy S3, so I don't know if it'll work on my or your phone. I haven't yet tried, but maybe if you looked in the file, you can figure it out what it's doing and maybe it can help.

@privacy1776
Copy link

I'm sorry I forgot to mention that the stock messaging app works fine in any configuration, the issue is only with textsecure.

@privacy1776
Copy link

Any progress with this issue? This is the only deal breaker I have with textsecure, I cannot recommend it as people I know will want to use MMS and ask me why it doesn't work.

@mcginty
Copy link
Contributor

mcginty commented Mar 6, 2015

@NTICompass that forum link you sent also just adds X-MDN: ##LINE1##. Looks like that's a solution that works for more than just you :).

@mcginty mcginty changed the title MMS doesn't download, 401 response MMS MSISDN/Line1 headers missing Mar 6, 2015
@mcginty mcginty added this to the 2.7.0 milestone Mar 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

6 participants