-
Notifications
You must be signed in to change notification settings - Fork 195
Getting this error when trying to connect in StartReceive() #72
Comments
Which version of ClientEngine do you use right now? |
Not sure about ClientEngine version but I am using WebSocket4Net dll v4.0.30319. How do I get the ClientEngine version to check it? |
v4.0.30319? It doesn't seem like a product version. It might be the .net framework version. |
Oh maybe this is it? 0.14.1.0 |
Yes, it is. Could you try the latest version 0.15? Can you use .netstandard library in your project? |
Can you link the most recent version, not showing up in NUGET? Thanks in advance |
Nevermind found it |
Ok I added the most recent version did a clean and build, restarted visual studios and same error is still occurring. |
My project is using .net4.5, and it was working great for several months. |
I went to Hockey App to get the crash log there as well: Xamarin caused by: android.runtime.JavaProxyThrowable: System.NotImplementedException: The method or operation is not implemented. |
I am still working on this issue. I have narrowed it down further and I believe the issue is with Android and using the DNS host name (which crashes )as opposed to an IPaddress (which works). |
Is there a good approach allow me to reproduce it? |
What I think may be happening is a timeout on the connection, which occurs after just a few milliseconds on the android end. So I have to find a way to adjust the android timeout. |
I also get the stack trace @jphoc13 reported on Sep. 19 (4 comments up) in my Xamarin app on Android:
If I downgrade to WebSocket4Net 0.14.1 and remove the SuperSocket library, the app does not crash, and is able to disconnect/reconnect when network comes and goes. The Pusher library I'm using is quite old, so it may need to be updated to work with 0.15.0. |
As @jphoc13 stated above, it works with IP address and does not work with Host name. I am experiencing the same issue on Xamarin.Android project using SocketIoClientDotNet 1.0.3 with WebSocket4Net 0.15. |
Could you try adding this environment variable in the application? Environment.SetEnvironmentVariable("PREFER_DNS_IN_ADVANCE", true); |
I've got the same issue and used to work fine in 0.14 on Xamarin. I've also found this question on StackOverflow asking the same question. |
Did you try this Environment.SetEnvironmentVariable("PREFER_DNS_IN_ADVANCE", true); It is the solution for the error |
I can't seem to code around it with 0.15.1
I get Operation in progress error immediately after connecting. Wondering whether this is a bug in .NET dotnet/corefx#24055 |
This is working for me after updating to 0.15.2 and SuperSocket 0.10. Now I am able to enter/exit airplane mode without the app crashing. I do not have the PREFER_DNS_IN_ADVANCE environment setting. Thanks @kerryjiang ! |
Really? In Xamarin?
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Eric Hedstrom <[email protected]>
Sent: Saturday, February 24, 2018 4:09:22 PM
To: kerryjiang/SuperSocket.ClientEngine
Cc: Kerry Jiang; Mention
Subject: Re: [kerryjiang/SuperSocket.ClientEngine] Getting this error when trying to connect in StartReceive() (#72)
This is working for me after updating to 0.15.2 and SuperSocket 0.10. Now I am able to enter/exit airplane mode without the app crashing. I do not have the PREFER_DNS_IN_ADVANCE environment setting.
Thanks @kerryjiang<https://github.com/kerryjiang> !
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#72 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAb1fHoKVW6LzjiZfR_Sam2ERCMey7FUks5tYKSygaJpZM4Pc2rB>.
|
This looks to be the underlying issue in the following: |
@whybe94 why the thumbs down? These all look to be the same issue. |
I have a live mobile app using Xamarin.Forms and the iOS version works fine but on Android I can't get past this error. Any advice on how to debug this?
"System.InvalidOperationException: Operation already in progress\n at System.Net.Sockets.SocketAsyncEventArgs.SetLastOperation (System.Net.Sockets.SocketAsyncOperation op) [0x00021] in :0 \n at System.Net.Sockets.Socket.InitSocketAsyncEventArgs (System.Net.Sockets.SocketAsyncEventArgs e, System.AsyncCallback callback, System.Object state, System.Net.Sockets.SocketOperation operation) [0x00039] in :0 \n at System.Net.Sockets.Socket.ReceiveAsync (System.Net.Sockets.SocketAsyncEventArgs e) [0x00073] in :0 \n at SuperSocket.ClientEngine.AsyncTcpSession.StartReceive () [0x0000e] in <4ba236fbf29248a4985a92e6e3907e4a>:0 "
The text was updated successfully, but these errors were encountered: