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

galex

02/15/2019, 5:09 AM
While trying to upload files and the file is a little big (>700KB) from kotlin-react with ktor-client I still hit a buffer limit:
Copy code
"IllegalArgumentException: should should be greater than write space + end gap (size = 9, writeRemaining = 0, endGap = 8, rem+gap = 8
    at IllegalArgumentException_init_0 (<http://localhost:9000/bundle.js:162304:32>)
    at require$ObjectLiteral_1.doFail (<http://localhost:9000/bundle.js:34344:9>)
    at IoBuffer.writeBufferAppend_ehtrw3$ (<http://localhost:9000/bundle.js:35661:7>)
    at ByteReadPacket_0.ByteReadPacketBase.prepareRead_87ik6q$ (<http://localhost:9000/bundle.js:31628:10>)
    at ByteReadPacket_0.ByteReadPacketBase.readAsMuchAsPossible_v6e8td$_0 (<http://localhost:9000/bundle.js:31444:15>)
    at ByteReadPacket_0.ByteReadPacketBase.readAsMuchAsPossible_v6e8td$_0 (<http://localhost:9000/bundle.js:31455:19>)
    at ByteReadPacket_0.ByteReadPacketBase.readAsMuchAsPossible_v6e8td$_0 (<http://localhost:9000/bundle.js:31455:19>)
    at ByteReadPacket_0.ByteReadPacketBase.readAsMuchAsPossible_v6e8td$_0 (<http://localhost:9000/bundle.js:31455:19>)
    at ByteReadPacket_0.ByteReadPacketBase.readAsMuchAsPossible_v6e8td$_0 (<http://localhost:9000/bundle.js:31455:19>)
    at ByteReadPacket_0.ByteReadPacketBase.readAsMuchAsPossible_v6e8td$_0 (<http://localhost:9000/bundle.js:31455:19>)"
I post via
client.submitForm {}
and I’ve tried
submitFormWithBinaryData {}
as well, no differences 😞
e

e5l

02/15/2019, 5:43 AM
Hi @galex, could you file a github issue with reproducer?
It looks like io problem
g

galex

02/15/2019, 5:44 AM
Yup will do
Should I create that in github or youtrack? on kotlinx-io?
e

e5l

02/15/2019, 5:47 AM
Github. Ktor. I’ll investigate and route.
g

galex

02/15/2019, 5:48 AM
Ok, it will take me some time as I’ve got here one mpp project + client project + backend project.. gosh 😮