Failure to decode received MMS
<!-- Hello, Please keep in mind that one person is essentially "at the helm" for this project. When you file an issue, I have to directly respond to it, and I am maintaining this in my spare time. I will close issues that are duplicates, already solved, or not bugs in mmsd-tng; and reserve the right to close it with a vague message (since hunting down references takes up time that could be spent working on mmsd-tng). If you aren't sure about the issue (or I closed it with a vague message), please ask on the "Open Source MMS/VVM/Other Wacky Telepathy Standards" Matrix/IRC Channel (They are the same channel), as you will likely be helped faster this way (since many knowledgeable people are on this channel): #opensourcemms:matrix.org #opensourcemms on OFTC IRC Chat If you are sure there is an issue/bug in mmsd-tng, and it is not a duplicate/already solved, please use the below steps to describe the behavior, in doing so will make it easier for me to help with the issue/bug (Not having this will make me either ask for it, or just make me close the issue since I cannot help): --> ## Summary <!-- (Summarize the bug encountered concisely) --> With mmsd-tng 2.6.0-3 and modemmanager 1.22.0-3+b1 on a Mobian/trixie PinePhone v1.2b and manually switching from my mobile provider's 'Internet' APN to its 'MMS' APN, I can send MMSes successfully, but I cannot fully receive them. Journalctl logs suggest that the message is received, but suggests that it was not decoded correctly. ## Steps to reproduce <!-- (How one can reproduce the issue - this is very important) --> ```` $ sudo systemctl stop ModemManager.service $ nmcli conn show |grep gsm Internet UUID1-UUID1-UUID1-UUID1-UUID1-UUID1 gsm -- MMS UUID2-UUID2-UUID2-UUID2-UUID2-UUID2 gsm -- $ systemctl --user stop mmsd-tng.service $ sudo systemctl start ModemManager.service $ systemctl --user start mmsd-tng.service $ nmcli conn show |grep gsm Internet UUID1-UUID1-UUID1-UUID1-UUID1-UUID1 gsm -- MMS UUID2-UUID2-UUID2-UUID2-UUID2-UUID2 gsm -- $ nmcli d |grep MMS cdc-wdm0 gsm connected MMS $ nmcli conn show |grep gsm MMS UUID2-UUID2-UUID2-UUID2-UUID2-UUID2 gsm cdc-wdm0 Internet UUID1-UUID1-UUID1-UUID1-UUID1-UUID1 gsm -- ```` * A person with another phone sends me an MMS. ## Carrier Settings <!-- What Carrier, APN, MMSC, and MMS Proxy are you using? Are there multiple APNs? --> [T-Mobile Poland](https://gitlab.gnome.org/GNOME/mobile-broadband-provider-info/-/blob/main/serviceproviders.xml#L10563) ```` <apn value="mms"> <usage type="mms"/> <name>MMS</name> <mmsc>http://mms/servlets/mms</mmsc> <mmsproxy>213.158.194.226:8080</mmsproxy> </apn> ```` ## What is the current bug behavior? <!-- (What actually happens) --> * No new message appears in the `chatty` gui. * The log from `journalctl` shows that a message was received, but not decoded correctly: ```` 18:09:15 mobian mmsdtng[48520]: ../src/mmsutil.c:mms_parse_headers() handler for type 0x16 was success 18:09:15 mobian mmsdtng[48520]: MMS transaction id: XXXXXXXXXXXXXXXXXXXX@xxxx.mmsc.t-mobile.pl 18:09:15 mobian mmsdtng[48520]: MMS version: 1.1 18:09:15 mobian mmsdtng[48520]: Subject: 18:09:15 mobian mmsdtng[48520]: Class: Personal 18:09:15 mobian mmsdtng[48520]: Size: 56983 18:09:15 mobian mmsdtng[48520]: Expiry: 2024-10-23T18:09:14+0200 18:09:15 mobian mmsdtng[48520]: Location: http://XXX.XXX.XXX.XXX:9800/mm1?id=XXXXXXXXXXXXXXXXXXXXXXXX 18:09:15 mobian mmsdtng[48520]: ../src/service.c:time_to_str() Time 1717834664 , Human Format 2024-10-23T18:09:14+0200 ... 18:09:16 mobian mmsdtng[48520]: ../src/mmsutil.c:extract_from() Successfully decoded text! 18:09:16 mobian mmsdtng[48520]: ../src/mmsutil.c:mms_parse_headers() handler for type 0x09 was success 18:09:16 mobian mmsdtng[48520]: ../src/mmsutil.c:mms_parse_headers() saw header of type 0x17 18:09:16 mobian mmsdtng[48520]: ../src/mmsutil.c:mms_parse_headers() running handler for type 0x17 18:09:16 mobian mmsdtng[48520]: ../src/mmsutil.c:mms_parse_headers() handler for type 0x17 was success 18:09:16 mobian mmsdtng[48520]: ../src/mmsutil.c:mms_parse_headers() header 0x05 was mandatory but not marked 18:09:16 mobian mmsdtng[48520]: Failed to decode /home/mobian/.cache/mmstng/modemmanager/receive.XXXXXX.mms ```` ## What is the expected correct behaviour? <!-- (What you should see instead) --> The expected behaviour is that I see a message with an image attached in `chatty`. ## Relevant logs and/or screenshots <!-- (Paste any relevant logs - please use code blocks (```) to format console output, logs, and code, as it's very hard to read otherwise.) --> Full log: https://paste.debian.net/hidden/cd892bc6 ## Context * PinePhone v1.2 on Mobian/trixie * Linux 6.6.56+sunxi64-1 * Modem FLOSS firmware 0.7.2, ADSP 30.006.30.006 ```` $ dpkg -l |grep -Ei "chatty|linux-image|(network.|modem)manager|mmsd" ii chatty 0.8.5-1+b1 arm64 Messaging application for mobile and desktop ii gir1.2-modemmanager-1.0:arm64 1.22.0-3+b1 arm64 GObject introspection data for modemmanager rc libkf5modemmanagerqt6:arm64 5.107.0-1 arm64 Qt wrapper library for ModemManager ii linux-image-6.1-sunxi64 6.1.67+sunxi64-1 arm64 Linux 6.1 for sunxi64 devices ii linux-image-6.6-sunxi64 6.6.56+sunxi64-1 arm64 Linux 6.6 for sunxi64 devices ii mmsd-tng 2.6.0-3 arm64 Multimedia Messaging Service Daemon - The Next Generation ii modemmanager 1.22.0-3+b1 arm64 D-Bus service for managing modems ii modemmanager-dev:arm64 1.22.0-3+b1 arm64 D-Bus service for managing modems - development files ii network-manager 1.50.0-1 arm64 network management framework (daemon and userspace tools) ii network-manager-gnome 1.36.0-1 arm64 network management framework (GNOME frontend) ```` As stated in the summary, I have tried sending MMSes to someone on another phone; these MMSes were received on that person's phone. ## Code tracing <!-- (If you can, link to the line of code that might be responsible for the problem) --> The `Failed to decode` error message seems to come from `service.c` in either line * 1918: https://gitlab.com/kop316/mmsd/-/blob/master/src/service.c?ref_type=heads#L1918 or * 3374: https://gitlab.com/kop316/mmsd/-/blob/master/src/service.c?ref_type=heads#L3374
issue