https://kotlinlang.org logo
#ktor
Title
# ktor
a

Alex Pogrebnyak

10/10/2023, 1:09 PM
Hi from IceRock! We have several applications on kotlin multiplatform. To work with the network we use ktor. On iOS 17.1, we started getting a strange error: io.ktor.utils.io.charsets.MalformedInputException: Malformed or unmappable bytes at input It is rarely reproduced, but Crashlytics already has more than 140 reports with this error. Plays randomly for any request. Does not play on earlier versions of iOS or Android. Ktor version: 2.3.0 Kotlin version: 1.8.21 Does anybody face such issue?
👍 1
s

Sam

10/10/2023, 1:25 PM
There was a thread about a similar issue recently. In that case, we tracked it down to an issue with %-encoded data in the URL. The default
Url
constructor assumes that %-encoded values are UTF-8 characters, which isn't necessarily true. That said, I think an error like this could equally be caused by bad payload data, if you're dealing with text requests or responses.
e

e5l

10/10/2023, 2:46 PM
Hey! We’ve replaced internal encoder with the platform default. Could you try it with the latest version of Ktor and make an issue for that?
👌 1
2 Views