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

[Unknown] Sending a < 1 MB PNG Results in Error Code 5 #571

Open
OdinVex opened this issue Jan 17, 2023 · 22 comments
Open

[Unknown] Sending a < 1 MB PNG Results in Error Code 5 #571

OdinVex opened this issue Jan 17, 2023 · 22 comments

Comments

@OdinVex
Copy link

OdinVex commented Jan 17, 2023

I attempted to send a message of 255-characters with a PNG of 990.9 kB in size, it failed with 'error code 5'. My provider allows 8 MB attachments. Settings have set the 'resize' to unlimited and, even 2 MB, still fails. Is it because it is a PNG and not some crap-quality JPEG?

@tibbi
Copy link
Contributor

tibbi commented Jan 17, 2023

what app and OS version are you using?

@OdinVex
Copy link
Author

OdinVex commented Jan 17, 2023

what app and OS version are you using?

Simple SMS Messenger: 5.17.2
Android OS: 11, older phone.

@Muuhdist
Copy link

For the past couple weeks, I have been getting the same Error 5 message anytime I try to send a photo, no matter the size of the photo.
Simple SMS Version 5.17.2
Android 12

@Atreyagaurav
Copy link

Same here, it fails a lot for image captured from my phone. But screenshots with small sizes are sent fine.

@naveensingh
Copy link
Contributor

Hey, y'all.

The error is related to the max MMS limit and images captured by phones nowadays are often large. Here is a test APK with improved image compression: https://github.com/Naveen3Singh/Simple-SMS-Messenger/releases/download/compression_test/sms-messenger-core-debug.apk

Let me know if this works for any of you, thanks!

@OdinVex
Copy link
Author

OdinVex commented Feb 16, 2023

Hey, y'all.

The error is related to the max MMS limit and images captured by phones nowadays are often large. Here is a test APK with improved image compression: https://github.com/Naveen3Singh/Simple-SMS-Messenger/releases/download/compression_test/sms-messenger-core-debug.apk

Let me know if this works for any of you, thanks!

I can't even send a 1K favicon png.

Edit: 113 bytes, 16x16. I can send 8 MB PNGs with stock Messages and the file checksum matches the original file, so it's SMS Messenger that isn't working correctly. I'd debug it myself, but I despise Android development.

@naveensingh
Copy link
Contributor

Are you able to send any other media like audio or document?

@OdinVex
Copy link
Author

OdinVex commented Feb 16, 2023

Are you able to send any other media like audio or document?

4.8 MB Video: No Error 5


250 KB SVG: No "Unknown Error" (This is an XML file containing instructions to draw an image, it isn't binary, it's Text.)
500 KB JPEG: Yes


15 KB Text File: Yes
1 MB Text File: No

Conclusion: Compression is not the answer, something else is wrong.

Messages sends them all, checksums match, too. Even an 8 MB test binary file (dd if=/dev/random of=./Test.txt bs=1M count=8) is sent via Messages.

@Muuhdist
Copy link

Muuhdist commented Feb 16, 2023 via email

@naveensingh
Copy link
Contributor

naveensingh commented Feb 16, 2023

@OdinVex

250 KB SVG: No "Unknown Error" (This is an XML file containing instructions to draw an image, it isn't binary, it's Text.)

the logic requires attachment previews to load properly else they are discarded. Support for loading SVGs is not yet added (probably an oversight) hence the failure. Thanks for bringing it into the spotlight.

500 KB JPEG: Yes

but large JPEGs (>1MB) fail?

Messages sends them all

It could be the RCS feature (unlikely because you, as a power user, would have noticed). It's more likely that the code that generates MMS Pdu is old and needs to be improved/updated.

Do older versions work for you? (they shouldn't because the error 5 you see still happened but wasn't visible to users before)

Edit: Error 5 is an IO error.

@OdinVex
Copy link
Author

OdinVex commented Feb 16, 2023

the logic requires attachment previews to load properly else they are discarded. Support for loading SVGs is not yet added (probably an oversight) hence the failure. Thanks for bringing it into the spotlight.

It should be assumed to treat all files as binary unless otherwise selectively modified.

but large JPEGs (>1MB) fail?

Untested, I just know my service provider has confirmed 8 MB sizes as perfectly fine.

It could be the RCS feature (unlikely because you, as a power user, would have noticed). It's more likely that the code that generates MMS Pdu is old and needs to be improved/updated.

My provider doesn't support RCS (Mint Mobile, a VMNO operating on T-Mobile backend).

Do older versions work for you? (they shouldn't because the error 5 you see still happened but wasn't visible to users before)

Edit: Error 5 is an IO error.

I don't have any old APKs to test with, at the moment. What version first had it? If you happen to know, I'll try a version before it.

@naveensingh
Copy link
Contributor

naveensingh commented Feb 16, 2023

What version first had it?

The changes were introduced in 5.17.2

You can try 5.17.1 or 5.17.0, thanks

@OdinVex
Copy link
Author

OdinVex commented Feb 16, 2023

What version first had it?

The changes were introduced in 5.17.2

You can try 5.17.1 or 5.17.0, thanks

Initial tests to myself on 5.17.0 has 8 MB zip files working fine. Rebooting again to test other extensions, will follow up. Can't test with another person until maybe 5 hours from now.

Edit: The 4.8 MB video file appears to be sending fine, no error (yet). Edit: The video sent fine.

Edit: The SVG reports "An unknown error occurred". The 1 MB Text file (random binary generated) works fine. Again, this is all 5.17.0. Seems to work a bit better for more stuff, no Error 5 anywhere.

@naveensingh
Copy link
Contributor

Many thanks but IIRC that was the issue. The MMS messages appeared as sent but were never actually sent because of the error (that was passed silently)

Do lmk how the test with another person goes (at your leisure)

@OdinVex
Copy link
Author

OdinVex commented Feb 16, 2023

Many thanks but IIRC that was the issue. The MMS messages appeared as sent but were never actually sent because of the error (that was passed silently)

Do lmk how the test with another person goes (at your leisure)

Will do. I do think the 1 MB and 8 MB files were sent rather quickly, though the 4.8 MB file sent slowly enough to think a transfer really happened.

@tibbi
Copy link
Contributor

tibbi commented Feb 17, 2023

can someone test sending 2 casual images like 10mb? It behaves like it was sent for me, even have the 2 ticks as delivered, but the receiver doesnt receive anything. The current Google play version at least shows an error 5 in that case.

@OdinVex
Copy link
Author

OdinVex commented Feb 18, 2023

can someone test sending 2 casual images like 10mb? It behaves like it was sent for me, even have the 2 ticks as delivered, but the receiver doesnt receive anything. The current Google play version at least shows an error 5 in that case.

Edit: Scratch everything I put up before, the app is definitely broken, I had been testing by sending to myself, sometimes the app works with that, sometimes not, no longer assuming a logic issue on that. 5.17.0 and 5.17.4 tested, both fail to actually send to an actual contact (aside a tiny JPG). I couldn't even send a 1 MB random bin text file (my end thought was sent, 2 checkmarks). 10 MB JPG failed. A small 50 KB JPG worked fine. I'm going to need to switch to a third party app for a while, may not be available for testing.

@jessewriter
Copy link

jessewriter commented Sep 15, 2023

so for me i had to restart my phone and send the image again and it worked. not sure what caused the error code 5 repeatedly. phone pixel 6a. sms messenger up to date as of 9/15/23, provider mint mobile

@bodtx
Copy link

bodtx commented Sep 15, 2023

Same workaround.
Same problem with qksms

@QuestioningEspecialy
Copy link

The reset workaround didn't work for me. Neither did setting the Resize sent MMS images options to No limit or 100KB, sending a 1.5MB screenshot of the failed messages, or sending a 918.5KB half resolution version of the 7.7MB photo.
What did work was setting the default messenger to my phone's original one (Messaging) and sending it from there. 🤷🏿‍♂️

v5.19.3
Pixel 6a
GrapheneOS
Android v14

@inson1
Copy link

inson1 commented Feb 10, 2024

@QuestioningEspecialy SMT apps were sold to ad company. SimpleMobileTools/General-Discussion#241
Fork is here https://github.com/FossifyOrg

@Soundtoxin
Copy link

I wasn't aware of these apps being abandoned or forked, but for others reading along, here's the issue matching this one in the other repo: FossifyOrg/Messages#45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants