-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Web] Failed to complete negotiation with the server: XMLHttpRequest error. #27
Comments
I have the same problem. Any information on when it will be fixed? |
|
@AmbujaAK maybe try to look there |
Same issue, these plugin not working on flutter web , Any Idea till when it will going to be fixed? |
The XMLHttpRequest error is due to Cors policy issue. I managed to solve it by doing the next steps in a C# application. 1- Define in your startup.cs file a new porperty ie: 2-At your configure method in the same Startup.cs file add the next line to add Cors 3- Use Cors at your Configure method in the same Startup.cs file Please give it a shot and let everyone know if this worked out for you. |
Allowing Cors solved it for me too. But the port could change between runs so I made the server code a bit more generic.
|
@jamiewest Hi ! I bumped into this same error but I found a different solution that does not involve configuring 'CORS'.
You can simply set skipNegotiation to true, but when reading the docs on the microsoft site (https://docs.microsoft.com/en-us/javascript/api/%40aspnet/signalr/ihttpconnectionoptions?view=signalr-js-latest#skipnegotiation) , it says that you have to be using Web Sockets for this to work. By the way what are the downsides to setting skipNegotiation to true, any security issues or something? Environment |
The text was updated successfully, but these errors were encountered: