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

Protobuf request in sample throws exception #571

Closed
vbuberen opened this issue Feb 24, 2021 · 2 comments
Closed

Protobuf request in sample throws exception #571

vbuberen opened this issue Feb 24, 2021 · 2 comments

Comments

@vbuberen
Copy link
Collaborator

✍️ Describe the bug

While updating #563 with latest changes from #569 saw the following exception in a stacktrace:

W/Chucker: Decoder com.chuckerteam.chucker.sample.PokemonProtoBodyDecoder@3e40612 failed to process request payload
    java.net.ProtocolException: Unexpected end group
        at com.squareup.wire.ProtoReader.nextTag(ProtoReader.kt:152)
        at com.chuckerteam.chucker.sample.Pokemon$Companion$ADAPTER$1.decode(Pokemon.kt:131)
        at com.chuckerteam.chucker.sample.Pokemon$Companion$ADAPTER$1.decode(Pokemon.kt:83)
        at com.squareup.wire.ProtoAdapter.decode(ProtoAdapter.kt:321)
        at com.squareup.wire.ProtoAdapter.decode(ProtoAdapter.kt:320)
        at com.chuckerteam.chucker.sample.PokemonProtoBodyDecoder.decodeRequest(PokemonProtoBodyDecoder.kt:10)
        at com.chuckerteam.chucker.internal.support.RequestProcessor$decodePayload$1.invoke(RequestProcessor.kt:71)
        at com.chuckerteam.chucker.internal.support.RequestProcessor$decodePayload$1.invoke(RequestProcessor.kt:13)
        at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
        at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170)
        at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
        at kotlin.sequences.SequencesKt___SequencesKt.firstOrNull(_Sequences.kt:133)
        at com.chuckerteam.chucker.internal.support.RequestProcessor.decodePayload(RequestProcessor.kt:76)
        at com.chuckerteam.chucker.internal.support.RequestProcessor.processPayload(RequestProcessor.kt:59)
        at com.chuckerteam.chucker.internal.support.RequestProcessor.process(RequestProcessor.kt:22)
        at com.chuckerteam.chucker.api.ChuckerInterceptor.intercept(ChuckerInterceptor.kt:66)
        at com.chuckerteam.chucker.sample.InterceptorTypeKt$activeForType$1.intercept(InterceptorType.kt:20)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
        at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)

💣 Steps to reproduce

Run the sample and click on Do HTTP activity

🔧 Expected behavior

No exception in logcat

📱 Tech info

@cortinico cortinico added the bug Something isn't working label Feb 26, 2021
@MiSikora
Copy link
Contributor

To be honest, that was implemented intentionally to inspect logging. One of the postman requests is not protobuf and PokemonDecoder matches based on URL.

I don't mind if you want to change it but just mentioning it FYI.

@vbuberen
Copy link
Collaborator Author

Didn't know about it being on purpose. Ok, closing.

@cortinico cortinico removed the bug Something isn't working label Feb 26, 2021
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

3 participants