sta / sta/websocket-sharp

""Operation is not supported on this platform." MacOS

Open
#487 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

My Application:

using WebSocketSharp;
using System;

namespace TestProject{
    class Program{
        static void Main(string[] args){
            WebSocket ws = new WebSocket("ws://localhost:9090/ws");
            ws.SslConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls12;
            ws.OnMessage += (sender, e) => {
                Console.WriteLine("Says:" + e.Data);
            };
            ws.ConnectAsync();
            ws.Send("Auth");
            Console.ReadKey( true );
        }
    }
}

Error:

System.PlatformNotSupportedException: "Operation is not supported on this platform."
  at System.Func`1.BeginInvoke(AsyncCallback callback, Object object)\n   at WebSocketSharp.WebSocket.ConnectAsync()\n   at TestProject.Program.Main(String[] args) in /Users/qrpike/Projects/TestProject/TestProject/Program.cs:15

System Details:

Visual Studio Community 2017 for Mac
Version 7.6.3 (build 1)
Installation UUID: 93217eed-bb8a-4b16-9e34-95aba35b01be
Runtime:
	Mono 5.12.0.301 (2018-02/4fe3280bba1) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)

	Package version: 512000301

NuGet
Version: 4.3.1.4445

.NET Core
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	2.1.2
	2.0.5
SDK: /usr/local/share/dotnet/sdk/2.1.302/Sdks
SDK Versions:
	2.1.302
	2.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin/Sdks

Xamarin.Profiler
Version: 1.6.3
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools
Xcode 9.4.1 (14161)
Build 9F2000

Operating System
Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
    Thu Jun 21 22:53:14 PDT 2018
    root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with WebSocket.ConnectAsync() and the reported Func.BeginInvoke stack trace. Reproduce the example on the listed Mono/macOS environment and determine whether the connection failure is specific to that platform. Done means the cause and a supported resolution or limitation are established and covered by an appropriate regression test or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.