-
Notifications
You must be signed in to change notification settings - Fork 275
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
Xamarin.Android throws not implemented exception #108
Comments
Do you have the stacktrace of this exception? |
|
Which target of the library do you use? I though it is .netstandard one because I didn't release assemblies for 0.15 in the Xamarin platform. |
Looks like it's monoandroid10, or is that not what you were looking for? |
Are you sue if you use WebSocket4net 0.15? |
Installing 0.15 seems to want to target netstandard 1.3, which causes the error, downgrading to 0.14.1 seems to target |
So the version you have problem now is 0.14.1? |
Installing version 0.14.1 works, but installing version 0.15 does NOT work |
So the exception was thrown when you used websocket4net 0.14.1? |
No the exception is thrown on version 0.15 |
That means you use websocket4net 0.15 .nerstandard version in Xamarin. Is my understanding correct? |
That is true |
Ok, let me see if we have a work around for this issue. |
I did a fix. Could you build the websocket4net by your own with the latest source code? And set the environment before you start the connection like the code below: Environment.SetEnvironmentVariable("PREFER_DNS_IN_ADVANCE", "true"); |
I downloaded the source today built the WebSocket4Net.Xamarin solution in release mode. I then referenced the MonoDroid version of the dll in a test project. Put this code in the
I disabled wifi and mobile data on the device before launching the application. The error still persists. Same stack trace. |
Could you check the version numver of the dll you use? And Could you send me the stacktrace again? IT might be different with the old one. |
Can you use the .net standard version? |
We too see this issue - it's most easily repeated when attempting to connect to an invalid host from Android. I'll try adding the PREFER_DNS_IN_ADVANCE and see what happens. |
PREFER_DNS_IN_ADVANCE had no appreciable effect; this is running off of:
The project is all using .NET Standard so I'm assuming it's using the .NET Standard versions of WebSocket4Net and SuperSocket. The wrapping project that consumes these packages are at .NET Standard 1.6. Here's the stack trace:
|
There is a patch for Mono that we need to review, but would love a test case: |
i used the websocket4net 14.1 for a .net framework projekt and switched to .net standard now to use it within xamarin.android and xamarin.ios as well. Which just doesn't work with my implementation on android and ios because of the issue. Any news on this? Or steps to get it work for the moment? |
Hi, This issue results in instant application crash on both android & iOS, I believe anyone using current version 0.15.2 will stumble upon this issue. Any update or when can we get a fix for this issue? |
Ok, let me check this issue again. |
Well i updated visual studio and xamarin for my project recently and somehow i dont get that error anymore |
@NeroBoron , Are you testing on real device (Android/iOS) or emulator? Also I encountered this issue if i try to open a web-socket while device is in airplane mode. |
On real ones, iPhone 8 and Samsung Galaxy A5 2017 to be specific. Can test it with airplane mode in about a week |
Fwiw, we no longer receive this exception after updating mono. |
This issue is resolved after upgrading mono. |
On Xamarin Android when attempting to open a connection when there is no internet connection causes the app to crash with a
System.NotImplementedException
. I've put this code in myMainActivity
in theOnCreate()
methodI'd be happy to provide additional information if necessary.
The text was updated successfully, but these errors were encountered: