Opened 4 years ago

Closed 3 years ago

#16885 closed bug (fixed)

Gerrit ticket doesn't load when logged in

Reported by: humdinger Owned by: pulkomandy
Priority: normal Milestone: R1/beta3
Component: Kits/Web Kit Version: R1/Development
Keywords: Cc: modeenf
Blocked By: Blocking:
Platform: All

Description

This is with WebKit, "haiku" branch of Mar 7th 2021 (24f821f. (Though I just checked, the current nightly WebPositive behaves the same.)

The Open Tickets page loads alright. Clicking a ticket, loads OK when logged out, but does not when logged in. Then it stops with "Loading..." in the ticket area.

If it helps, this is in the script console:

Non-working (logged in):

https://review.haiku-os.org/elements/gr-app.js:1473:406: Page: _handleChangeRoute
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 377ms /changes/*~*/comments
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 304 GET 477ms /changes/*~*/detail?O=516714
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 204 GET 479ms /changes/*~*/edit/
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 486ms /changes/*~*/robotcomments
https://review.haiku-os.org/elements/gr-app.js:1474:94: TypeError: I/O error
https://review.haiku-os.org/elements/gr-app.js:1351:83: Unhandled Promise Rejection: TypeError: I/O error
https://review.haiku-os.org/elements/gr-app.js:1474:94: TypeError: I/O error
https://review.haiku-os.org/elements/gr-app.js:1351:83: Unhandled Promise Rejection: TypeError: I/O error
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 881ms /changes/*~*/drafts
https://review.haiku-os.org/elements/gr-app.js:1473:360: TypeError: I/O error
https://review.haiku-os.org/elements/gr-app.js:1473:360: TypeError: I/O error

Working (not logged in):

https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 403 GET 377ms /accounts/self/detail
https://review.haiku-os.org/elements/gr-app.js:1473:406: Page: _handleChangeRoute
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 403 GET 597ms /accounts/self/detail
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 420ms /changes/*~*/comments
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 472ms /changes/*~*/robotcomments
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 468ms /changes/*~*/detail?O=516714
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 403 GET 533ms /accounts/self/detail
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 517ms /projects/*/config
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 403 GET 516ms /accounts/self/detail
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 538ms /changes/*~*/revisions/*/actions
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 534ms /changes/*~*/revisions/*/files
https://review.haiku-os.org/elements/gr-app.js:1473:406: FileListDisplayed: 3798
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 689ms /changes/*~*/revisions/current/mergeable
https://review.haiku-os.org/elements/gr-app.js:1473:406: ChangeDisplayed: 3850
https://review.haiku-os.org/elements/gr-app.js:1473:406: FileListRenderTime: 177
https://review.haiku-os.org/elements/gr-app.js:1473:406: FileListRenderTimePerFile: 12
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 646ms /projects/*/branches?*
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 386ms /changes/change:*
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 697ms /changes/conflicts:*
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 403 GET 695ms /accounts/self/detail
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 691ms /changes/*~*/revisions/*/related
https://review.haiku-os.org/elements/gr-app.js:1347:180: HTTP 200 GET 1251ms /changes/*~*/submitted_together?o=NON_VISIBLE_CHANGES
https://review.haiku-os.org/elements/gr-app.js:1473:406: ChangeDataLoaded: 3864
https://review.haiku-os.org/elements/gr-app.js:1473:406: ChangeFullyLoaded: 5109

Change History (5)

comment:1 by modeenf, 4 years ago

Cc: modeenf added

comment:2 by pulkomandy, 3 years ago

Milestone: UnscheduledR1/beta3
Resolution: fixed
Status: newclosed

This will be fixed in HaikuWebKit 1.8.1. Latest updates of upstream WebKit fixed the remaining issues.

comment:3 by pulkomandy, 3 years ago

Resolution: fixed
Status: closedreopened

In fact it only works if logged out. I have some more investigation to do :(

comment:4 by pulkomandy, 3 years ago

It looks like there is a problem in handling the 204 responses from Gerrit.

The "I/O error" part of the message is strerror(B_IO_ERROR), and the strerror call is in webkit in BurlProtocolHandler in RequestCompleted. We get there because the request is considered unsuccesful, and that in turns happen because the protocol loop in Haiku's BHttpRequest returned B_IO_ERROR.

According to HTTP specs it should not be possible to get into that situation: the server is not allowed to send a Content-Length for a 204 reply (since there will be no content in that case). It seems it did anyway. I will try a patch to ignore the Content-Length in the case of the 204 status code.

comment:5 by pulkomandy, 3 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in hrev55215.

Note: See TracTickets for help on using tickets.