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

A qlog file formated with json-seq #82

Open
nixwl opened this issue Jan 25, 2024 · 4 comments
Open

A qlog file formated with json-seq #82

nixwl opened this issue Jan 25, 2024 · 4 comments

Comments

@nixwl
Copy link

nixwl commented Jan 25, 2024

  • I have got a qlog file(it‘s JSON-SEQ format),So I want to convert JSON-SEQ to JSON. Because website's qlog example supported JSON.
  • How can I slove this problem, any tools or function ?
@rmarx
Copy link
Member

rmarx commented Jan 25, 2024

Hey @nixwl,

qvis should just support the JSON-SEQ format as well, so there should be no need to convert to JSON (as such, there are also no existing tools for this (though it should be easy enough to write one, it's quite simple)).

Can you share an example file and the implementation you're using maybe? If you're actually getting errors loading the file into qvis, which errors?

@nixwl
Copy link
Author

nixwl commented Jan 26, 2024

hi, I can import JSON-SEQ format qlog file to website,but I found that:
image

This qlog file record client download file form a QUIC file server(the QUIC server uses TQUIC

This is the client qlog info:
image

and client qlog file is here: qlog_c.txt

I don't know if my qlog file has any problems, but the connection may be established, and file download function had well worked

@nixwl
Copy link
Author

nixwl commented Jan 26, 2024

I take that issue to TQUIC developer few days before. And they make a scipt to covert JSON-SEQ to JSON, So I try it recently.

This is the result:(converted qlog file is here: qlog_c.qlog.json)

image

@rmarx
Copy link
Member

rmarx commented Jan 26, 2024

So it turns out that the JSON-SEQ file you use isn't actually proper JSON-SEQ as per the qlog spec :)
It just uses a \n newline character to separate the records, but that's not enough: they also need to be separated by the special RS (record separator, 0x1E) character (see also https://www.ietf.org/archive/id/draft-ietf-quic-qlog-main-schema-07.html#format-json-seq).

Since they don't do that, qvis can't properly parse the file and shows an error in the JavaScript console (I agree it's confusing that it does show a green popup in the webpage UI, pretending that it did load correctly ;)).

So, the solution here is to ask the TQUIC maintainers to either output proper JSON-SEQ as per the spec, or for you to use their script to convert to JSON, which indeed does seem to work as expected.

(I will keep this issue open to remind myself to one day properly show a red popup with an error message if this error occurs again, rather than people having to open the JavaScript console in the developer tools).

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

2 participants