Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException:::sandwich.ApiResponse$Failure$Error.toString #99

Closed
caosiqiao4000 opened this issue Apr 6, 2023 · 2 comments

Comments

@caosiqiao4000
Copy link

caosiqiao4000 commented Apr 6, 2023

--sandwich 1.3.5
--okhttp 4.10.0
--okio-jvm 3.0.0
--Xiao Mi Note3 (Android 9,API 28)

java.lang.NullPointerException
at okio.Segment.pop(Segment.kt:95)
at okio.Buffer.readString(Buffer.kt:321)
at okio.Buffer.readString(Buffer.kt:302)
at okhttp3.ResponseBody.string(ResponseBody.kt:187)
at com.skydoves.sandwich.ApiResponse$Failure$Error.toString(ApiResponse.kt:82)
at com.skydoves.sandwich.ResponseTransformer__ResponseTransformerKt.message(ResponseTransformer.kt:759)
at com.skydoves.sandwich.ResponseTransformer.message(ResponseTransformer.kt:1)
at com.robertsi.httpresultcope.mapper.ErrorResponseMapper.map(ErrorResponseMapper.kt:37)
at com.robertsi.httpresultcope.mapper.ErrorResponseMapper.map(ErrorResponseMapper.kt:28)
at com.robertsi.httpresultcope.repository.HttpCommonRepository$getManual$1.invokeSuspend(HttpCommonRepository.kt:197)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@7db45e5, Dispatchers.IO]


Thank you for your open source Sandwich Project
I am currently using and found this error. I hope you can capture and handle this exception

@skydoves
Copy link
Owner

I think this issue is related to OkHttp than this library: square/okhttp#2745

@caosiqiao4000
Copy link
Author

caosiqiao4000 commented Apr 26, 2023 via email

@skydoves skydoves closed this as completed May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants