Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Mobile Androind app: 'stream was reset: PROTOCOL_ERROR' #8439


User avatar
0
tinytownsoftware created

I just finished writing the Android application. Everything is working fine with the localhost server. I changed the ApiUrlConfig.DefaultHostUrl const to point to my live website (previously it was localhost). Then I ran it in the emulator in Debug mode, but got the above exception. I'm not sure why it would do that. The website itself works just fine. Here is the full stack. Does it have anything to do with the fact that I am running it in Debug mode in the emulator?

{Java.IO.IOException: stream was reset: PROTOCOL_ERROR at ModernHttpClient.NativeMessageHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00428] in /Users/paul/code/paulcbetts/modernhttpclient/src/ModernHttpClient/Android/OkHttpNetworkHandler.cs:135 at BalanceForecasting.ApiClient.AuthenticationHttpHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00037] in C:\Users\Robert\Documents\BalanceForecastingZero\src\BalanceForecasting.Application.Client\ApiClient\AuthenticationHttpHandler.cs:29 --- End of managed Java.IO.IOException stack trace --- java.io.IOException: stream was reset: PROTOCOL_ERROR at com.squareup.okhttp.internal.spdy.SpdyStream.getResponseHeaders(SpdyStream.java:145) at com.squareup.okhttp.internal.http.SpdyTransport.readResponseHeaders(SpdyTransport.java:104) at com.squareup.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:830) at com.squareup.okhttp.internal.http.HttpEngine.access$200(HttpEngine.java:95) at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:823) at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:684) at com.squareup.okhttp.Call.getResponse(Call.java:272) at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:228) at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:199) at com.squareup.okhttp.Call.access$100(Call.java:34) at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:162) at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33) 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) }


8 Answer(s)
  • User Avatar
    0
    tinytownsoftware created

    Changing the Azure http version for my website from 2 to 1.1 fixed the problem. It seems the latest version of Flurl does not support http2, which is very odd. Do you guys have a different version of AbpApiClient.cs that does not use Flurl? Maybe HttpClient?

  • User Avatar
    0
    alper created
    Support Team
    • What's your AspNet Zero version? (if an old one, you can download the latest to see the problem occurs on the new version)
    • Is your website hosted on Azure?
    • Does your website use HTTPS?
    • Is it just happening on the emulator? (try on real device to narrow problems)
  • User Avatar
    0
    rdcinformatics created

    AspNetZero version 8.0.0 Website is hosted on Windows Server 2019 and uses HTTPS It happens on the emulator and on real device

  • User Avatar
    0
    alper created
    Support Team

    sometimes self signed HTTPS certificates occur this issue. can you send us your website URL to [email protected]

  • User Avatar
    0
    tinytownsoftware created

    No, it is an issue with Flurl specifically not supporting Http 2.0. Once I change the Azure website back to Http 1.1, everything works fine. So I will just use 1.1 for now.

  • User Avatar
    0
    ashvinu created

    Hello. I'm having the same issue with ASP.Net Zero version 8.1.0 with ASP.Net core MVC & JQuery. I have sent my app url and all details to [email protected] yesterday and is still waiting for a response. Please assist.

    Thanks and Regards Kirtee

  • User Avatar
    0
    ebenzle created

    Also having the same issue. Any solutions?

  • User Avatar
    0
    ashvinu created

    Applying the code change mentioned at https://github.com/tmenier/Flurl/issues/495#issuecomment-579841595 solved the issue for me