Are fetching ByteArrays using a loop officially br...
# ktor
j
Are fetching ByteArrays using a loop officially broken for iOS+Ktor, or is there an effort from the Ktor team to fix this? We have the same issue as here, I have added a comment with a stack trace: https://youtrack.jetbrains.com/issue/KTOR-5594/Darwin-Memory-leaks-when-receiving-response-body-as-ByteArray-in-a-loop
e
Hey, @jQrgen. The fix is already done in kotlinx-io migration branch. Let me check if we can put it in the patch release
🙌 1
j
Oh, nice! The quick response is also much appreciated. Where can I follow patch releases?
Is the
kotlinx-io
a migration branch in the Ktor repository?
e
It will be on a ticket when the fix will be merged
It is, but there are tests failinig. It will take some time
j
All right, on a ticket where? Do you need help with fixing the tests? :)))))
Would rather help out than re-implement something in Swift
Our iOS BETA users are in pain because their images for NFTs are not loading…
e
I will check tomorrow and give you an update
j
Thanks
PS: Is 3.0.0-beta-1 the latest version I can test now? I want to set up a migration branch to see how it breaks the app
Do you have any update on this? Thanks…
bump
e
I've test it with
main
and it is fixed. Could you try
3.0.0-beta-1
?
j
Great!
3.0.0-beta-1
is failing iOS tests in GitLab CI: https://gitlab.com/wallywallet/wallet/-/merge_requests/190/diffs
Maybe you could make a
3.0.0-beta-1-dev
release as a "hotfix"?
The issue is severely crashing on all iOS apps that use Ktor for this
e
There is an eap release with an update. Would you like to try it?
j
Yes please
e
Copy code
e: Could not find "io.ktor:ktor-utils-cinterop-threadUtils" in [/Users/sickpig/.gitlab-runner/builds/cpBUMqG7a/0/wallywallet/wallet, /Users/sickpig/.konan/klib, /Users/sickpig/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.22/klib/common, /Users/sickpig/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.22/klib/platform/ios_simulator_arm64]
btw that's a weird error, looks like a problem in the native toolchain
Could you report it in Kotlin YT?
j
To what?
e
sorry, youtrack (bug tracker)
j
The error message says that something can't find a ktor library?
e
This library is generated by the toolchain
j
By specifically what?
e
kotlin.multiplatform plugin for native
Here is the guide on how to add the repo for EAP builds: https://ktor.io/eap/
1
👀 1
j
Strange that the ktor library is missing there
Maybe the plugins needs to be updated?
e
The version
3.0.0-eap-852
should have all fixes
j
Nice thanks
Will try
e
Could you check what version of Kotlin and Gradle is in the project?
j
Ok, in a bit
BRB; the project is open source btw: https://gitlab.com/jQrgen/wally/-/tree/ktor-3-beta
If you wanna check yourself
AFK
e
1.9.22, 8.7 should be good
👍 1
j
`For request 'GET /artifact/androidx.test/core/io/ktor/ktor-client-core-macosarm64/3.0.0-eap-852/ktor-client-core-macosarm64-3.0.0-eap-852.pom'``
`Not Found``
macosarm64
target is not supported?
e
Sorry, wrong version number. Could you try
3.0.0-beta-2-eap-932
?
👍 1
j
oh
my bad
wrong version name
e
it also looks on the mvnrepository, could you check if eap repo is in place?
j
Gradle sync is running now, not instant crashing
Updated to use
3.0.0-beta-2-eap-932
correctly