Rayrun
← Back to Discord Forum

1.38 version not showing POST request body in trace view network tab for some api calls

For most of the api calls I see POST request body and response body in trace view network tab. But for some reason it’s empty for some other calls.

I know for sure that the request succeeded as I see the response content in the UI, but somehow I don’t see it captured in playwright trace view. I am using Ubuntu Jammy docker image.

I didn’t encounter this issue with 1.37 . It’s an important issue for me full network logs are very helpful when debugging and this issue is preventing me from upgrading to 1.38. Anyone else encounter this issue ? Any workarounds or suggestions ?

This thread is trying to answer question "Why is the POST request body not showing in the trace view network tab for some API calls in version 1.38?"

5 replies

Hi, could it be that those API requests just don't have a request body, and only headers? For example GET or DELETE requests are typically 'header-only', I think.

The POST API request for our use case definitely have a request body which has a query parameter for querying our db. So when the POST response body is empty or has error in it it’s useful to know the query we sent - that was part of request body . It seems like this issue is Ubuntu jammy specific and didn’t happen on my Mac , but I will double check this later today.

I uploaded screenshots showing that for some POST API calls the request body is getting captured , but not for others. Initially, i thought it's Ubuntu specific but it seems to happen on my local MAC as well. Also, it seems to happen randomly in 1.37 version as well as 1.38.

I confirmed from Chrome dev tool network tab that there is indeed a Request payload/body for these POST API calls. So it seems to be a Playwright issue not capturing Request payload for certain POST API calls.

For now i am thinking of creating a reproducible case so i can create a bug for this in playwright github. Any advice on how to resolve it/workaround would be great.

Screenshot_2023-09-23_at_11.00.44_AM.png
Screenshot_2023-09-23_at_11.05.47_AM.png
Screenshot_2023-09-23_at_11.06.03_AM.png

OK, I should have read better. Since you didn't experience this with v1.37, it almost has to be something with Playwright itself (v.138). Posting a GitHub issue sounds like a good idea. Even before you are able to create a reproducible case.

Thanks @refactoreric , will post in GitHub issue

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.