SocketTimeOutException in Chrome ARC app - google-chrome-arc

I am getting java.net.SocketTimeOutException (Read timed out) for some of our Apis in ARC app. It started happening since last few days. Everything was working fine earlier. I have correctly set the ConnectTimeout and ReadTimeout values in the HttpsURLConnection. What we observed is that the server is sending the response on time but the client (ARC app) is not receiving the response and ending up with TimeOut exception. This happens with some Apis but not all.
Note: We have no issue on Android. This is the problem with ARC app.
Is there any change in the ARC runtime which is causing it?

Related

Offline-directline: My webchat app keeps sending GET requests to /directline/conversations/ endpoint. Is this normal?

I had a local bot which I wanted to test in WebChat client instead of Emulator. After researching for a while and failing to connect normally, I stumbled upon a package called offline-directline which helped me connect my local bot successfully. My directline runs on 4000, webchat runs on 3000 and local bot runs on 3979.
I took a peak in the network tab later and I see my client keeps making GET requests to /directline/conversations/ endpoint. At first I thought it happens when I am sending messages in my WebChat client but it keeps sending them repeatedly. Around 50 GET requests in a minute.
I am not sure if this is a normal behavior. Would really appreciate an input. Thank you.

Azure SignalR not working on few types of phone

I am developing a Xamarin Forms app for Android where in i need to receive events from server using Azure SignalR function. This is working fine in few phones, however on few I get strange errors.
Redmi 4 running Android 7.1 I see that the connection is successful, it it does not receive any messages.
Redmi 1s running Android 4.4 KitKat, it gets connected and I can receive messages, however soon it gets disconnected stating that remote party closed the websocket connection without completing the close handshake or 30000 ms elapsed without receiving a message from server
BTW I have a background Service where I am creating this SignalR Hub and connecting so that even if my app goes to sleep, I can still receive the server events.
it works fine on some of the other newer phones in my home. so my question is what is the best way to debug these kind of issues. I don't see any logs in the Device Log that can help me understand what is going on.

What causes connection abort?

On iPhone, sometimes when I open the app, all immediate HttpClient requests fail. I saw a message that said...
Software caused connection abort
Upon retrying, there's no problem.
What could cause this?
It happens when the app is first opened on iPhone and Android and when the app is opened from clicking on a notification. In both of these situations a web request is sent immediately.
Is it possible that the connection is not ready yet and, rather than waiting, it's throwing an exception?
Faced a similar problem today!
I added an await Task.Delay(200); before launching the httprequest (only when app was launched from notification tap) and the issue is fixed.

Are there any reasons why Heroku might silently reject requests with status code 400?

I'm trying to diagnose an issue whereby an embedded device running an HTTP client to issue requests to a Node.js Web application running on Heroku is receiving empty responses with status code 400.
The problem I'm facing is that the presumably failing requests do not even appear in the Heroku logs, so it's certainly not the Web application code returning those 400s.
On the other hand issuing requests to the Web application from a browser works just fine and the requests do appear in the Heroku logs.
I'm trying to figure out whether the embedded client is really sending requests at all and I'm wondering if there are any reasons why Heroku might send back those 400s without the requests even appearing in the logs.
The cause was related to a badly implemented HTTP client in the device that was issuing requests omitting the host header.
Adding the header solved the problem.

Continuous websocket traffic with SignalR

I've been using SignalR successfully for some time using serverSentEvents transport. I've just installed my application on Windows Server 2012 RC and now when I connect SignalR is using websockets (as you'd expect).
It appears to work OK except there is a continuous stream of websocket traffic between server and browser - about once a second it's sending about 90 bytes.
From the debugger window in Chrome, it looks like it's sending a connection upgrade request each time.
I am successfully receiving messages sent by the server, but I seem to be worse off than when using long polling.
The browser is Chrome version 19.0.1084.52.
Any idea why this is happening?
This was down to my own stupidity - but I thought I'd answer in case anyone else has the same problem.
I had built the solution SignalR.Hosting.AspNet instead of SignalR.Hosting.AspNet45
So the method AcceptWebSocketRequest was throwing a NotSupportedException; because the client websocket upgrade failed, it just tried again about a second later.
I guess the client could show an error or something in this case to aid debugging.

Resources