Hi guys. While testing our browser JS app after mi...
# ktor
a
Hi guys. While testing our browser JS app after migrating to the latest Ktor 3, we encountered
AbortError
. In our logic, we make multiple requests and then read data from the
BodyReadChannel
. Sometimes, we need to cancel the recent requests, and at this point that the error randomly occurs somewhere inside the Ktor library. Maybe someone can tell if this is a known issue, or we should report this?
Copy code
Uncaught (in promise) AbortError: BodyStreamBuffer was aborted
    at InvokeOnCancelling.handler_1 (JsClientEngine.kt:48:1)
    at protoOf.invoke_py2q9a_k$ (JobSupport.kt:1571:1)
    at notifyCancelling (JobSupport.kt:365:1)
    at tryMakeCompletingSlowPath (Standard.kt:158:1)
    at tryMakeCompleting (JobSupport.kt:894:1)
    at cancelMakeCompleting (JobSupport.kt:727:1)
    at protoOf.cancelImpl_465b6c_k$ (JobSupport.kt:698:1)
    at protoOf.cancelInternal_fraw7c_k$ (JobSupport.kt:663:1)
    at protoOf.cancel_hkmm2i_k$ (JobSupport.kt:648:1)
    at InvokeOnCancelling.handler_1 (HttpClientEngine.kt:103:1)
e
Hey! This exception is from the cancel abortion. It looks like it needs to be wrapped in Ktor specific exception. Could you log an issue?
a
I cannot catch that error to log, it looks like is thrown internally somewhere in Ktor library. Or what do you mean "by log an issue"?
e
create a new issue on YT 🙂
a
Ah, ok 🙂
r
Hi, was this issue captured on YouTrack yet? If so, any ETA on fix version? Thanks! Edit: I think this is it. But seems like no updates on it. Would appreciate some info here as it is quite annoying on web.
a
@Rok Oblak Hi, yes, that's correct - this is the ticket for the problem. I agree that it’s quite frustrating to deal with on the web, especially during development. Actually, it’s a blocker for our team in migrating to Ktor 3. Please upvote the ticket if you haven't already.
👍 1