You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone,
I am currently trying to send a SMS via MessageBird and show the user an error popup when the message could not be delivered.
My SMS always reach their target but a lot of times (I cant tell when exactly) I get an exception from MessageBird which triggers my popup to show up even though the message could be delivered.
I get the following exception (I replaced the part after Adress with placeholder since I dont know if I can share that): java.io.IOException: unexpected end of stream on com.android.okhttp.Address"placeholder"
What could be the issue for this?
Hi @moritzsu,
Thanks for creating the issue. I found this link on StackOverflow which suggests adding android:usesCleartextTraffic="true". Besides this, I don't see a problem with SDK that could cause this error for now. I will investigate further. Did you find anything on the Android side?
Sadly I did not find anything related to this on my side - I can not replicate the error consistenly either.
Since it is not possible for me to use clear text traffic I can not use your solution.
Activity
DevPJ9 commentedon Jan 27, 2023
I think it is related to you not closing connection after every request.
check out this post from stack overflow: https://stackoverflow.com/questions/45838774/java-io-ioexception-unexpected-end-of-stream-on-connection-in-android
Hope this helps.
moritzsu commentedon Jan 27, 2023
I am not doing any networking operations, I let all of that be handled by the MessageBird API.
The code I am testing with, is pretty much like the example at: https://github.com/messagebird/java-rest-api/blob/master/examples/src/main/java/ExampleSendMessage.java
denizkilic commentedon Feb 2, 2023
Hi @moritzsu,
Thanks for creating the issue. I found this link on StackOverflow which suggests adding
android:usesCleartextTraffic="true". Besides this, I don't see a problem with SDK that could cause this error for now. I will investigate further. Did you find anything on the Android side?moritzsu commentedon Feb 6, 2023
Sadly I did not find anything related to this on my side - I can not replicate the error consistenly either.
Since it is not possible for me to use clear text traffic I can not use your solution.