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

SendJSONForDict error #57

Closed
iOSDias opened this issue Jul 21, 2019 · 18 comments
Closed

SendJSONForDict error #57

iOSDias opened this issue Jul 21, 2019 · 18 comments
Assignees

Comments

@iOSDias
Copy link

iOSDias commented Jul 21, 2019

        let dict: [String: Any] = [
            "text": text,
            "chatId": chatId,
            "isReply": false
        ]
        socketClient.sendJSONForDict(dict: dict as AnyObject, toDestination: sendMessagePath)

Use this method to send message in chat, server do not receive any message, but didReceiveMessageWithJSONBody method called when someone send message from android client

@WrathChaos
Copy link
Owner

Basically, you cannot send any message via StompClientLib but you can receive the message from the server. Am I right?
Can you share with me an example project which I can work on it?

@iOSDias
Copy link
Author

iOSDias commented Jul 22, 2019

@WrathChaos I create test repo with test project that has identical steps and not working
https://github.com/iOSDias/SocketTest.git

@iOSDias
Copy link
Author

iOSDias commented Jul 22, 2019

@WrathChaos I am really waiting for your help, because I do not understand what happens, earlier the same code working fine with sending endpoints

@WrathChaos
Copy link
Owner

@iOSDias working on it. Can you try it with 1.2.7 version of StompClientLib?

@iOSDias
Copy link
Author

iOSDias commented Jul 23, 2019

@iOSDias sorry, could you explain what you mean about "working on it"? You check on my test project? Ok, I try with 1.2.7

@WrathChaos
Copy link
Owner

@iOSDias Hello again :) I've tested your test project. You were using the 1.3.0 version. I updated it to the latest(currently 1.3.4) and it works fine. Can you try it with 1.3.4?

@WrathChaos
Copy link
Owner

WrathChaos commented Jul 23, 2019

Screenshot 2019-07-23 at 11 00 19

It works fine on me. By the way, I love your SocketManager class. Nice work :)

@iOSDias
Copy link
Author

iOSDias commented Jul 23, 2019

@WrathChaos Hello, I am using the 1.3.0 version, because on the main project I use it, but on the main I also update it to 1.3.4 and it does not work, Yes, according to screenshot it send message, because of printing data, but I mean it does not work because I do not get this sended message from server in didReceiveMessageWithJSONBody as the result that it is processed by my getMesssageList subscription

@WrathChaos
Copy link
Owner

Oh, I got it. Okay, let me test it deeply then.

@iOSDias
Copy link
Author

iOSDias commented Jul 23, 2019

@WrathChaos Ok, let me know about results

@WrathChaos
Copy link
Owner

@iOSDias I found the error at least the source of the problem. I need you to send me the unhandled exception message from the server. After I send the message from my sendMessage method. It should return a message about what is wrong. Can you send it to me?

@iOSDias
Copy link
Author

iOSDias commented Jul 23, 2019

@WrathChaos during testing with the server, the backendor told me that from the client to the server nothing comes up, because he does not see this in the logs

@WrathChaos
Copy link
Owner

@iOSDias I tested the "sendJSONForDict" method on my test server and it works totally fine also, "stompClientJSONBody" delegate method received the message with totally fine. I guess your backend server has a problem with it.

@iOSDias
Copy link
Author

iOSDias commented Jul 23, 2019

@WrathChaos what could be the problem and how can i prove to the backendor that the problem is in the server, since the android client using another library interacts with the server normally?

@WrathChaos
Copy link
Owner

You need to debug what is coming or going on the backend side. I tested it with 3 different servers which are working on multiple platforms. I could receive the message from all servers. Also, tested the deep inside code, which is working perfectly at 1.3.4.

@iOSDias
Copy link
Author

iOSDias commented Jul 23, 2019

@WrathChaos Okey, thanks

@iOSDias
Copy link
Author

iOSDias commented Jul 23, 2019

@WrathChaos Could you send me some information(url, etc) about your test server to check it on my side and show backendor the screenshots?

@WrathChaos
Copy link
Owner

@iOSDias Unfortunately I could not share it because of company privacy & policy. However, you can find any simple Stomp Server example on the internet easily.

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

No branches or pull requests

2 participants