-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Can't connect to websocket : received bad response code from server 422 #80
Comments
Hello @tomasimartin, Here is What Is 422 Unprocessable Entity? article about the bad response. Please contact with your backend devs :) However, I'm also here to help, discuss your problem :) |
hello @WrathChaos As I said in my previous message, I used another library to make websocket, and with the same url on that library it works. That's why I'm focusing my research here. Has anyone ever encountered this problem? |
Actually there are some similar issues. Some related issues: I know that it could work on Android however, iOS requires so many different things to do :( I believe that you need to research about it. Currently, it works with my example project & other recent projects. Have you ever tried with simple example project? |
@WrathChaos thanks for your quick feedback, we found the problem internally, it was a server side headers check. I hope I didn't disturb you too much. Well, hello from France. you can close this issue |
@tomasimartin I'm glad to hear that :) You're always welcome to come & brainstorm :) Please feel free to ask anything :) |
Hi @WrathChaos , we found out where the problem came from, when connecting there is an http call where we pass in the header
but I don't find in this header the parameters I added during the connection:
it can come from the SocketRocket library, the initial call to the connection is made without taking into account the header. I'm not good enough in objective-c to modify the lib myself. Do you have an idea to pass my header |
Hey @tomasimartin, |
To get around my problem, I passed the header differently, like this
|
@tomasimartin
As you said there is a server side problem (checking headers). Could you please give me more detailed information. Thanks in advance! |
@WrathChaos , Can you please tell me what is reason behind this error. Error Domain=SRWebSocketErrorDomain Code=2132 "received bad response code from server 403" UserInfo={NSLocalizedDescription=received bad response code from server 403, HTTPResponseStatusCode=403} I have checked with backend server, and also verify with Android its also working fine, when i am trying to connect socket from iOS getting error. I have tried all cases like as, But i am not getting result. can you please explain where i am wrong and missing something from my end ? Thanks in advance. |
@tusharMistri |
why was this issue marked as closed? I am getting the same issue. EDIT: Never mind :D Unrelated issue. Cors settings are not shared between HTTP and Stomp/WS in Spring (my backend)
|
Hi. I get an error while trying to connect to websocket, here is the code:
Response:
And if I use another "Starscream" library, it connects very well with the same url, but I need the "STOMP" part that this other library doesn't have
Do you have any ideas why that might be the case?
The text was updated successfully, but these errors were encountered: