-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.The author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityarea-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and servers
Description
Describe the bug
!This situation occurs only in projects using next.js
I am using version "next": "^11.0.0", and I am getting this error in my link.
----> When I update the signalR version, I get the following error.
My new signalR version -> "@microsoft/signalr": "^5.0.7",
Old signalR version -> "@microsoft/signalr": "^3.1.9",
To Reproduce
To reproduce this issue, check to have the following code:
const mainHubConnection = new signalR.HubConnectionBuilder()
.withUrl(sportProgram, {
skipNegotiation: true,
transport: signalR.HttpTransportType.WebSockets,
})
.configureLogging(signalR.LogLevel.Information)
.build();
let startSocket;
const handleSocketConnection = () => {
if (eventData) {
startSocket = () => {
try {
mainHubConnection.start()
.then(() =>
mainHubConnection.invoke("listen", programType, sportId)
.catch((err) => {
Sentry.captureException(err);
}));
} catch (err) {
Sentry.captureException(err);
setTimeout(startSocket, 5000);
}
};
mainHubConnection.on("ReceivedSportProgramBySportId", (event) => {
if (Object.keys(event).length > 0) {
handleEventChange(event);
}
});
if (sliderEvent) {
startSocket();
}
}
Further technical details
- ASP.NET Core version 5.0
- Webstorm 2021.1.3
tuceo, didemkome, vkgencer, muratdogan17 and sammaniamsam
Metadata
Metadata
Assignees
Labels
Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.The author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityarea-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and servers
