RetryAndFollowUpInterceptor - java.io.IOException: Canceled
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- android, java
- Lĩnh vực
- api, mobile-dev
Hướng nghiên cứu
Bắt đầu với buildDirectionsApiClient và callback enqueueCall được nêu trong báo cáo, sau đó lần theo cách Mapbox Directions SDK sử dụng Retrofit và OkHttp liên quan đến việc hủy. Tái hiện trường hợp IOException: Canceled xảy ra không liên tục và xác định xem lệnh gọi có bị hủy bởi vòng đời của client hay bởi các yêu cầu đồng thời hay không. Công việc được xem là hoàn tất khi nguyên nhân hủy đã được xác định và được ghi lại bằng một trường hợp có thể tái hiện hoặc một lỗi SDK đã được xác nhận.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Issue
Multiple RetryAndFollowUpInterceptor - java.io.IOException: Canceled
Description
We are getting randomly multiple java.io.IOException: Canceled when using the Mapbox Directions SDK. Code snippet is:
SDK used
//Mapbox Directions API
implementation "com.mapbox.mapboxsdk:mapbox-sdk-services:6.13.0"
Code Snippet
for origin = "Point{type=Point, bbox=null, coordinates=[-58.449951171875, -34.55467987060547]}"
for destination = Point{type=Point, bbox=null, coordinates=[-58.484619140625, -34.57625961303711]}
private fun buildDirectionsApiClient(origin: Point, destination: Point): MapboxDirections {
val routeOptions = RouteOptions.builder()
.geometries(DirectionsCriteria.GEOMETRY_POLYLINE6)
.overview(DirectionsCriteria.OVERVIEW_SIMPLIFIED)
.profile(DirectionsCriteria.PROFILE_DRIVING)
.coordinatesList(listOf(origin, destination))
.build()
return MapboxDirections.builder()
.accessToken(accessToken)
.routeOptions(routeOptions)
.build()
}
and the way we are executing the calls is:
client?.enqueueCall(object : Callback<DirectionsResponse> {
override fun onResponse(
call: Call<DirectionsResponse>,
response: Response<DirectionsResponse>
) {
response.body()?.routes()?.firstOrNull()?.let { route ->
mapbox.getStyle {
val source: GeoJsonSource? = it.getSourceAs(ROUTE_SOURCE_ID)
val lineString = LineString.fromPolyline(
route.geometry()!!,
Constants.PRECISION_6
)
// Set the map's camera position taking into account the route drawing
val coordinateList = lineString.coordinates()
animateMarker.setBoundary(coordinateList)
val camera = mapbox.cameraForCoordinates(coordinateList, getPadding())
mapbox.easeTo(camera, source, lineString)
}
}
}
override fun onFailure(call: Call<DirectionsResponse>, t: Throwable) {
DevMetrics.monitor(errorParams("Mapbox cannot draw route points reason is ${t.cause} - ${t.message}"))
onError()
}
})
Not sure if we are doing something wrong because it mostly works and draw the route but randomly it shows us this exception coming from Retrofit and OkHttp
- Ngôn ngữ chính
- Java
- Star
- 438
- Fork
- 117
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mapbox/mapbox-java
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mapbox/mapbox-java#1640 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
mapbox/mapbox-java#1635 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
mapbox/mapbox-java#1619 ·
-
Mapbox-java incompatible with gson 2.13.0 and up - call to internal GSON classes that were renamed Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
mapbox/mapbox-java#1614 · 2 bình luận · 1 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
mapbox/mapbox-java#1612 · 1 reaction ·
Tất cả issue của mapbox/mapbox-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
elastic/gradle-plugins#157 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
cryptomator/hub#497 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
johanhaleby/occurrent#1120 ·