"The WebSocket protocol is not supported on this platform."

1,576 views
Skip to first unread message

Daniel Pilon

unread,
Jul 31, 2018, 9:48:45 AM7/31/18
to RavenDB - 2nd generation document database
Getting the error below while running on a PosReady7 Windows image. Looks like this implementation is not compatible with this Windows Version. Do I have an alternative here?

System.PlatformNotSupportedException: The WebSocket protocol is not supported on this platform.

Server stack trace: 
   at System.Net.WebSockets.ClientWebSocket..ctor()
   at Raven.Client.Documents.Changes.DatabaseChanges.CreateClientWebSocket(RequestExecutor requestExecutor)
   at Raven.Client.Documents.Changes.DatabaseChanges..ctor(RequestExecutor requestExecutor, String databaseName, Action onDispose)
   at Raven.Client.Documents.DocumentStore.CreateDatabaseChanges(String database)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Raven.Client.Util.AtomicDictionary`1.GetOrAdd(String key, Func`2 valueGenerator)
   at Raven.Client.Documents.DocumentStore.Changes(String database)
   at Raven.Client.Documents.Operations.OperationExecutor.<SendAsync>b__11_0()
   at Raven.Client.Documents.Operations.Operation.<Process>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Raven.Client.Documents.Operations.Operation.<Initialize>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Raven.Client.Extensions.TaskExtensions.<WaitWithTimeout>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Raven.Client.Documents.Operations.Operation.<WaitForCompletionAsync>d__23`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Raven.Client.Util.AsyncHelpers.RunSync[T](Func`1 task)
   at Raven.Client.Documents.Operations.Operation.WaitForCompletion[TResult](Nullable`1 timeout)
   at Raven.Client.Documents.Operations.Operation.WaitForCompletion(Nullable`1 timeout)

Oren Eini (Ayende Rahien)

unread,
Aug 1, 2018, 3:14:31 AM8/1/18
to ravendb
Try using .NET Core 2.1 , with the SocketsHttpClient, that might do it.
But IIRC, web sockets just aren't supported on Win7

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paweł Pekról

unread,
Aug 1, 2018, 6:21:20 AM8/1/18
to RavenDB - 2nd generation document database
Daniel,

I've did a small test on Win7 using a .NET Core 2.1.2 console app. Everything worked fine there. From my brief research, in 2.1 they have switched to managed web sockets for better platform compatibility.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Daniel Pilon

unread,
Aug 1, 2018, 8:38:00 AM8/1/18
to RavenDB - 2nd generation document database
The most recent patch (4.0.6-patch-40047) references 2.1.1 and the error persists while testing in a PosReady7 image.

If WebSockets is the only alternative here, this may become a showstopper for us, given I'll have a >100k deployments targeting this Windows version.

Paweł Pekról

unread,
Aug 1, 2018, 9:32:07 AM8/1/18
to rav...@googlegroups.com
Daniel,

the RavenDB.Client is a .NET Standard library. It's behavior may differ a bit, because it can be used on a full .NET Framework or a .NET Core application. What framework your application is using/targetting?

P.

Oren Eini (Ayende Rahien)

unread,
Aug 1, 2018, 9:34:19 AM8/1/18
to ravendb
Also, may need:  AppContext.SetSwitch("System.Net.Http.UseSocketsHttpHandler", true);
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Daniel Pilon

unread,
Aug 1, 2018, 10:33:37 AM8/1/18
to RavenDB - 2nd generation document database
My application targets .NET Framework 4.6.2

Paweł Pekról

unread,
Aug 1, 2018, 10:57:15 AM8/1/18
to RavenDB - 2nd generation document database
I've created a ticket to track this issue: http://issues.hibernatingrhinos.com/issue/RavenDB-11662

The problem is that the full .NET Framework is not taking an advantage from the SocketsHttpHandler. Is there a possibility for you to migrate your application to .NET Core 2.1?

Daniel Pilon

unread,
Aug 1, 2018, 11:02:48 AM8/1/18
to RavenDB - 2nd generation document database
Not at all...

Paweł Pekról

unread,
Aug 1, 2018, 11:10:30 AM8/1/18
to rav...@googlegroups.com
Daniel,

we will be adding a convention that will switch Operation.WaitForComplete from using Changes API to simple polling. This will resolve the issue.

Are you using Changes API inside your application for any other task?

P.

On Wed, Aug 1, 2018 at 5:02 PM Daniel Pilon <danie...@gmail.com> wrote:
Not at all...

Daniel Pilon

unread,
Aug 1, 2018, 11:28:17 AM8/1/18
to RavenDB - 2nd generation document database
Not really, just Operations.

Paweł Pekról

unread,
Aug 6, 2018, 6:58:48 AM8/6/18
to rav...@googlegroups.com
Hi Daniel,

we have released 4.0.6 client with new convention store.Conventions.OperationStatusFetchMode. You can set it to Polling to switch from ChangesApi (WebSockets) to simple polling.

On Wed, Aug 1, 2018 at 5:28 PM Daniel Pilon <danie...@gmail.com> wrote:
Not really, just Operations.

Daniel Pilon

unread,
Aug 6, 2018, 8:36:07 AM8/6/18
to RavenDB - 2nd generation document database
Thanks, Paweł! Will effectuate the upgrade and setup accordingly.
Reply all
Reply to author
Forward
0 new messages