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

Occasional IOException when invalid parcel is delivered to server #149

Closed
sdsantos opened this issue Sep 29, 2020 · 6 comments
Closed

Occasional IOException when invalid parcel is delivered to server #149

sdsantos opened this issue Sep 29, 2020 · 6 comments

Comments

@sdsantos
Copy link
Collaborator

Stacktrace:

     Caused by: java.io.IOException: unexpected end of stream on http://127.0.0.1:13276/...
        at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:202)
        at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106)
        at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:79)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
        at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197)
        at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:502)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.io.EOFException: \n not found: limit=0 content=…
        at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:348)
        at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
        at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:178)
        at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106) 
        at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:79) 
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) 
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34) 
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) 
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82) 
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) 
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) 
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) 
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) 
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) 
        at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197) 
        at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:502) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
        at java.lang.Thread.run(Thread.java:764) 
@gnarea gnarea transferred this issue from relaycorp/relaynet-gateway-android Sep 29, 2020
@gnarea gnarea transferred this issue from relaycorp/awala-jvm Sep 29, 2020
@gnarea
Copy link
Member

gnarea commented Sep 29, 2020

Thanks @sdsantos! Do you have any instrumentation test that I can run to reproduce this?

@gnarea
Copy link
Member

gnarea commented Sep 29, 2020

@sdsantos
Copy link
Collaborator Author

@gnarea
Copy link
Member

gnarea commented Sep 29, 2020

I can't run the test because the branch is broken due to a few compile errors: https://github.com/relaycorp/relaynet-gateway-android/pull/148/checks?check_run_id=1181531058 -- I'll get back to it when they've been fixed.

@gnarea
Copy link
Member

gnarea commented Sep 30, 2020

This issue has actually uncovered two separate issues:

  • The endpoint is returning a malformed HTTP response when the parcel is refused. It seems like the response headers weren't actually sent to the client! Yet all the unit tests passed -- it's great we're writing functional tests 😄
  • Unfortunately, parcelDelivery_invalidParcel is still failing. But now I think this is an issue with the test suite (failed to connect to /127.0.0.1 (port 13276) from /127.0.0.1 (port 46116) after 10000ms: isConnected failed: ECONNREFUSED (Connection refused)). Can you please look into it @sdsantos?

@gnarea gnarea transferred this issue from relaycorp/awala-poweb-jvm Sep 30, 2020
@gnarea
Copy link
Member

gnarea commented Sep 30, 2020

Actually, this issue is technically fixed now and the remaining issue seems to be introduced in #148, so I'm closing this issue now so we can pick up the convo in the PR.

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