[BUG] `response.status_text` is empty on Chromium
See original GitHub issueContext:
- Playwright Version: 1.24.0
- Operating System: Linux
- Python version: 3.10.5
- Browser: Chromium
Code Snippet
from playwright.sync_api import sync_playwright, Page, Browser, BrowserContext, Response
def main():
"""Main"""
with sync_playwright() as spw:
brw: Browser = spw.chromium.launch()
# print('Browser was launched!')
cxt_main: BrowserContext = brw.new_context(ignore_https_errors=True)
# print('Context was created!')
page: Page = cxt_main.new_page()
# print('Opened a new page!')
resp: Response = page.goto('https://stackoverflow.com/404')
print(resp.status_text) # empty str
cxt_main.close()
# print('Context was closed!')
brw.close()
# print('Browser was closed!')
main()
Describe the bug
On Chromium response.status_text
is always empty.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Why is the statusText of my XHR empty? - Stack Overflow
According to the documentation for XMLHttpRequest. statusText , it should only be empty while the request is being processed. However, I am seeing...
Read more >562599 - XMLHttpRequest statusText does not contain the ...
1. Do an XMLHttpRequest POST request to an URI returning error code 400, statutText of "test" 2. Print the statusText received when the...
Read more >Response.statusText - Web APIs | MDN
The statusText read-only property of the Response interface ... A String containing the HTTP status message associated with the response.
Read more >XMLHttpRequest fails for responses with HTTP status 407
The XMLHttpRequest object is empty: xhr.responseText is "" xhr.status is 0 xhr.statusText is "" In a test sweep over responses with 57 different...
Read more >Empty AJAX response when URL works fine in browser
However, anytime I try to GET something I just get an empty response back. Body is null and statusText is empty.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you go to
https://stackoverflow.com/404
in stock FF, CR, and WK, and then run:fetch("https://stackoverflow.com/404").then(r => console.log(r.statusText))
you’ll see Firefox is the only one to havestatusText
set to “Not Found” in this case (site doesn’t set it explicitly), so I believe Playwright’s behavior here is appropriate./cc @pavelfeldman
Closing as per above, please feel free to open a new issue if this does not cover your use case.