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

Long Websocket messages truncated #2021

Open
markanderson-underdog opened this issue May 7, 2024 · 6 comments
Open

Long Websocket messages truncated #2021

markanderson-underdog opened this issue May 7, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@markanderson-underdog
Copy link

Description

I'm using Proxyman to view sniff Websocket traffic where large json objects are passed between the client and server. If the json object is long enough which is being sent, the message is truncated.

Pasting what is displayed into an online character counter, it seems the exact number of characters displayed for me is 4066.

Steps to Reproduce

  1. Have the server send a message with very large json >5000 characters long (sorry, would supply one but my exact example is with company code I don't want to supply)
  2. View json in Proxyman for the WSS message

Current Behavior

After the 4066th character, no more of the message is displayed (and thus, it's improperly formatted json, so it isn't formatted)

Expected Behavior

Message in its entirety is displayed.

Environment

  • App version: Proxyman 5.3.0
  • macOS version: macOS Sonoma 14.3.1
@markanderson-underdog markanderson-underdog added the bug Something isn't working label May 7, 2024
@markanderson-underdog markanderson-underdog changed the title Websocket traffic cutoff Long Websocket messages truncated May 7, 2024
@NghiaTranUIT
Copy link
Member

@markanderson-underdog may I ask if it's also truncated on your app too?

Or it just a display issue on Proxyman?

@markanderson-underdog
Copy link
Author

@NghiaTranUIT Does not appear truncated in my app, just a visual display issue on Proxyman.

@NghiaTranUIT
Copy link
Member

I'm not sure how to reproduce it, since it works on my test. Here is my setup

  1. Use Websocket NPM to make a WSS to wss://ws.postman-echo.com/raw, proxy to Proxyman
  2. Send a 5Mb JSON
  3. Able to see 5Mb JSON without truncating

Screenshot 2024-05-10 at 7 48 10 AM


May I ask:

  1. How big is your JSON in the websocket message?
  2. Do you know what your WS library is from your server?, is it a Websocket package by NodeJS, or Python, ... ? I'd like to investigate it

From what you describe, it doesn't affect your client, so the problem might be from the Proxyman side.

@NghiaTranUIT
Copy link
Member

@markanderson-underdog can you show me the screenshot to demonstrate how it looks?

You can censor your sensitive data.

@markanderson-underdog
Copy link
Author

Hey, sorry for the slow response.

My scenario looks similar to yours, but the issue I encounter is when the server is sending the message (so it's inbound, green arrow). You can see in the bottom that the json response arbitrarily cuts off in the middle of the content, not ending in a }. Similarly, I don't have line #s shown next to each line of the json message, because it doesn't get formatted (which make sense, as it isn't "proper json" since the end is truncated) so it's all just on line 1
Screenshot 2024-05-16 at 2 37 01 PM

@NghiaTranUIT
Copy link
Member

I'm not sure how to reproduce it?

I tried again with a 5Mb JSON file in a single Websocket message from the Server and Client (See Video). It's working fine : /

CleanShot.2024-05-17.at.13.47.51.mp4

Can you open the Hex Tab and see if the date is fully received?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants