Closed Bug 1618863 Opened 4 years ago Closed 7 months ago

Page.navigate doesn't fail for status code other than 200 (eg. 204 - no content)

Categories

(Remote Protocol :: CDP, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: whimboo, Unassigned)

References

Details

(Whiteboard: [puppeteer-beta2-mvp])

As we are currently aware of Page.navigate returns too early (bug 1603776) because it doesn't wait for the response package (bug 1599257). So it is not aware of possible failed requests like a 204 status code.

That means that the returned result doesn't contain an error like in Chrome:

puppeteer:protocol ◀ RECV {"id":18,"result":{"frameId":"3D1D462A15E159199DC0E8B98B4F093C","loaderId":"053D582A5655467C188F62493C4E9390","errorText":"net::ERR_ABORTED"},"sessionId":"8DDF85656E125DCB1290760405A1D463"} +1ms
Blocks: 1549475

Also this is related to all the puppeteer tests which make use of a pattern like:

page.goto(...).catch(e => error = e);

Except navigation timeouts we seem to not return any kind of error right now.

Priority: P3 → P2
Whiteboard: [puppeteer-beta-reserve]
Whiteboard: [puppeteer-beta-reserve] → [puppeteer-beta2-mvp]
Component: CDP: Page → CDP
Severity: normal → S3

We are not going to fix this API for CDP. One should use WebDriver BiDi instead.

Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.