WebSoket in Charles - websocket

I try to investigate WebSockets using Charles.
But on WebSocket tab I see only that message:
But I didn't set up any limits for WebSockets.
With what it can be connected? Maybe I should check another settings?
Thank you in advance

I found a decision, that solved my problem. But I still see the same message on WebSockets tab. Here is my way:
Click right button on WebSocket
Choose "Save WebSocket messages..."
And it exports all the messages to separate .txt files. The other useful thing, that in the name of the file you can find the mark, which helps to understand by whom the message was sent: by the client or by the server.

Related

network tab in chrome doesnt update for every request sent

so for instance, this is difficult to explain but i will try to my best ability.
if you refresh a page on for instance a discord channel, an ajax request is sent to:
https://discord.com/api/v8/channels/channelidhere/messages?limit=50
which gets the last 50 messages sent in the channel. now, interestingly enough, if youre in a channel with lots of new messages being sent the netwrok tab does not update as if there were no requests associated with the channel messages being updated. ive seen this happen with other sites in similar ways and im just curious as to what i may be missing, is there some reason a request would be sent that the network tab doesnt catch? ps: even if i go to the all tab which supposedly captures all requests still no bueno.
It's common that chat website use websockets instead of http to communicate.
maybe this will help you How do you inspect websocket traffic with Chrome Developer Tools?

How to send a message when the user is leaving the page using SignalR?

I'm working on a chat room program using ASP.NET, I have made a 'user has joined the chatroom' message, but how would I send a message when the user leaves the page? I tried looking through the network logs, but I can't see any extra messages getting sent through the WebSocket.
This will be tough and inaccurate because there is really no guarantee that you will get notified that the user has disconnected. But there is an onDisconnect event that you can listen for, but in all honesty, I would use a disconnect button and use that to do what you need to do, it would be more consistent, as the disconnect is not reliable (at least the last time I used SignalR, which was like version 1.x)
Nevermind, I've found out about window.onbeforeunload using JavaScript. Though it's not 100% consistent, it's more consistent than I expected.

user receiving same message twice from Skype bot

I was trying to send skype-bot message to skype-user using REST API in nodeJs, but user receives bot-message two times of that single message. I am sending the message with HTTP POST request only single time using a single activityId. Is there any way to control duplicate messages? what can be the reason behind this?
I have gone through this Receiving the same message twice
Can anyone please like to help finding the issue?
[No sdk or other library is used ]
I have found the issue. I was subscribing redis to read message and deliver to user. I found that it was happening twice[one in my app uploaded to server and another in my local machine]. Now resolves. Thanks !

ServiceError with basic Direct Line interaction

I've got a basic bot that I am trying to interact with via Direct Line. Following this example, these are what my requests look like:
Start Conversation
Send Activity
The error it responds with is difficult to investigate with such minimal information. The bot itself is working perfectly on other channels.
Has anyone seen this before?
Apologies for answering my own question. It turns out, the Send Activity request was sent as application/text instead of application/json.
I wish the error was more clear on why it was rejecting it but that fixed my issue.

Debugging Google cloud messaging push messages

I am trying to send push messages to an android application.
The POST https://android.googleapis.com/gcm/send
seems to succeed and I get something (with some numbers changed) like:
{"multicast_id":9999063399994069899,
"success":1,
"failure":0,
"canonical_ids":0,
"results":[{"message_id":"0:1416520599679103%8d7d198de508343a"}]}
but I don't seem to get the notification on the device...
Is there anything that can be done with the message_id it track it forward ?
Can I somehow tell me if Google actually tired to deliver it to the device and what was the result of the attempt?
I know it's an old question and you might have solved it yourself by now, but for completeness I would like to post a solution here.
By now you can find the option GCM Diagnostics in your Google Play Developer Console when you have your app selected. It's placed on the left hand side.
You just post a registration token or a message id and will shortly see a summary of push notifications connected to this token/id, plus additional debug information.
Cheers!
well, at least until someone would provide a better answer about debugging based on message ids.
It turns out the problem in my case was that the phone gap plugin in I was using was expecting a "message" field in the push notification message payload.
A bug on my server side made this message not to exist so it was not displayed in the phones notification area...
my thanks to #Eran for partially pushing my towards the right line of thought.

Resources