Skip to content
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

Error: Optional(["message": Error during negotiation request.]) #75

Closed
sathyabaman opened this issue Dec 15, 2016 · 8 comments
Closed

Comments

@sathyabaman
Copy link

Hi iam trying to connect to Hub. But getting the error like this

Starting...
Error: Optional(["message": Error during negotiation request.])
Disconnected.

I have posted the full question here in stackoverflow.
http://stackoverflow.com/questions/41162408/signal-r-in-swift

Can you please help me to fix this.

@adamhartford
Copy link
Owner

Does it work with SwiftR.useWKWebView = false?

If so, make sure you have CORS enabled on your server. CORS is required for WKWebView to work with SwiftR.

@tejasverixo
Copy link

Having same issue. Help us to fix this.

@adamhartford
Copy link
Owner

@tejasverixo Please answer same questions RE: wkWebView = false, and whether or not CORS is enabled on your SignalR server.

@tejasverixo
Copy link

tejasverixo commented Dec 20, 2016

Thanks for quick reply. But i got solution.

By default SwiftR.useWKWebView = false - It's working fine.
but as per the example if its "True" - It's Not working.

//As per the "Master" branch update i m getting following error

//Code
connection = SignalR("http://swiftr.azurewebsites.net")

//Error
"Cannot invoke initializer for type 'SignalR' with an argument list of type '(String)'"

Note: I did Installation using Pod

I have posted the full question here in stackoverflow.
http://stackoverflow.com/questions/41221263/signalr-implementation-using-swift-3-0

@adamhartford
Copy link
Owner

@tejasverixo I posted this on SO, but will paste here too:

The pod (swift3), the swift23 branch, and the master branch (API changes) are all different code. You'll need to pick one version of the library and stick with it. If WKWebView = false works, but true doesn't, that means you probably don't have CORS enabled on your SignalR server.

CORS is most likely the culprit here.

@podiyaaa
Copy link

hey im having same issue. when i false SwiftR.useWKWebView it, server responding with this error
message = "Error during start request. Stopping the connection."; source = "Internal Server Error";

@qazaleh
Copy link

qazaleh commented Feb 8, 2017

Hi I am trying to use swiftR , i don't know anything about this, I do not chat application. I don't know where should call server method from client and send parameter to server, or call client method from server and send JSON to client. please help me to fix this, thanks.

@georgenimber
Copy link

Anyone having the same issue now that UIWebView is not available ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants