pace icon indicating copy to clipboard operation
pace copied to clipboard

Blazor - Pace causing blazor websocket to close

Open keyboardxtreme opened this issue 6 years ago • 7 comments

When i add pace.js in my blazor server application, the blazor web socket closes as soon as the application starts with the below error

blazor.server.js:1 [2019-10-08T06:25:08.745Z] Error: Connection disconnected with error 'Web Socket is not in the OPEN state'. I am a newbie in JavaScript, i wanted to know if there is any place in pace where if force close web socket connections or where it tracks web socket requests. Is there a configuration that i can change so it doesn't track web socket requests? I tried changing the lines below:

... ajax: { trackMethods: ['GET'], trackWebSockets: true, ignoreURLs: ['localhost:*'] } };

and it didn't help. Any help will be greatly appreciated.

keyboardxtreme avatar Oct 08 '19 06:10 keyboardxtreme

I have the same proble. Help please

eduin1178 avatar Oct 20 '19 04:10 eduin1178

I was getting same error. So I switched the order of pace.js and blazor.server.js in my layout and it started working. So now my _layout is showing as below. Let me know if this helps you.

jaypan13 avatar Nov 11 '19 06:11 jaypan13

I will review it and tell you. Thank you for your contribution

eduin1178 avatar Nov 11 '19 18:11 eduin1178

I have this issue also!

mohamadbahmani avatar May 11 '21 11:05 mohamadbahmani

I was getting same error. So I switched the order of pace.js and blazor.server.js in my layout and it started working. So now my _layout is showing as below. Let me know if this helps you.

It does not work! actually, this solution solves the problem and it causes a new problem! Now some part of the Theme does not work. for example, the navbar does not collapse!

mohamadbahmani avatar May 11 '21 12:05 mohamadbahmani

you need to disable websocket support in pace

<script> window.paceOptions = { ajax: { trackWebSockets: false } }; </script>

before loading pace

pace seems to beoverwriting the global WebSocket object

getriebesand avatar Feb 09 '22 07:02 getriebesand

None of the suggestions here have worked. The progress bar just sticks at 99% and the little loader icon stays visible.

seanrockster avatar Aug 05 '22 09:08 seanrockster