question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connection closed with an error. Unknown error

See original GitHub issue

Web socket connection to Azure services returns error after trying to connect from several browser tabs:

{"type":7,"error":"Connection closed with an error."}

Several tabs succeed to connect to sockets and receive mesages, but most of connections returned this type of error. I have no clue what is going wrong because no error description returned.

I am using Azure services on Free plan, but dashboard shows that all is under the message/connection limits (max 18 connections): image

I have tried to configure signalR options EnableDetailedErrors, but with no result - no error description. Startup.cs:

services.AddSignalR(conf =>
{
    conf.HandshakeTimeout = TimeSpan.FromSeconds(300);
    conf.EnableDetailedErrors = true;
})
.AddAzureSignalR(configure => 
{
    configure.ConnectionString = connString;
    configure.ConnectionCount = 1;
    configure.AccessTokenLifetime = TimeSpan.FromHours(24);
});
app.UseAuthentication();
app.UseMvc();
app.UseFileServer();              

app.UseAzureSignalR(routes =>
{
    routes.MapHub<ChatHub>("/hub/chat");
});

Javascript client:

var connection = new HubConnectionBuilder()
      .withUrl('/hun/chat', { accessTokenFactory: () => this.authService.getAccessToken() })
      .build();
connection.serverTimeoutInMilliseconds = 300000;
connection.start();

Microsoft.AspNetCore.SignalR: 1.0.2 Microsoft.Azure.SignalR: 1.0.0-preview1-10015

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
xscriptcommented, Sep 11, 2018

Then it is probably just intermittent network issue. I will close this issue for now. Feel free to reopen it or create another issue if you have further questions.

0reactions
ToniaDemchukcommented, Sep 11, 2018

Thank you for reply. I cannot reproduce it anymore. Debug logs don’t show any suspicious items.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERR_CONNECTION_CLOSED: 3 Effective Solutions to Fix It
ERR_CONNECTION_CLOSED is a Chrome error that indicates that the browser fails to connect to the web server. Therefore, the connection is closed, ...
Read more >
❌ How To Fix "ERR_CONNECTION_CLOSED" in Chrome ...
1. Check Your Internet Connection ... The first thing you should do when you see the ERR_CONNECTION_CLOSED message is to check your internet ......
Read more >
Scraping using selenium error connection closed
im using selenium for scraping a website,but i got this error.what does this mean? am i blocked? what should i do to do...
Read more >
"The underlying connection was closed: Unknown error ...
Almost all users who face this issue use Avira Antivirus but uninstalling it has in many cases not led to the problem being...
Read more >
Unknown Error Code 100 - The connection is closed.
Looking for help with "Unknown Error Code 100 - The connection is closed." Our set up is running our main servoy solution as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found