Page MenuHomePhorge

Exception "Failed to load file data for changeset" shown for Differential revisions containing changes to images and user being logged out
Open, HighPublic

Description

In Q66, @mainframe98 wrote:

I viewed D25342 while logged out and got shown several unhandled exceptions, apparently one for each file:

Failed to load file data for changeset ("PHID-FILE-rowj4ni6572gwjxastl7").

Depth	Library	File	Where
8	phorge	applications/differential/parser/DifferentialChangesetParser.php : 1750	DifferentialChangesetParser::loadFileObjectsForChangeset()
7	phorge	applications/differential/parser/DifferentialChangesetParser.php : 849	DifferentialChangesetParser::newDocumentEngine()
6	phorge	applications/differential/parser/DifferentialChangesetParser.php : 76	DifferentialChangesetParser::render()
5	phorge	applications/differential/parser/DifferentialChangesetParser.php : 1902	DifferentialChangesetParser::renderChangeset()
4	phorge	applications/differential/controller/DifferentialChangesetViewController.php : 266	DifferentialChangesetParser::newChangesetResponse()
3	phorge	aphront/configuration/AphrontApplicationConfiguration.php : 284	DifferentialChangesetViewController::handleRequest()
2	phorge	aphront/configuration/AphrontApplicationConfiguration.php : 204	AphrontApplicationConfiguration::processRequest()
1		/var/www/phorge/webroot/index.php : 35	AphrontApplicationConfiguration::runHTTPRequest()

(Only the PHID-FILE value changes, the stack trace is the same for all of them)

Notably, these are not shown when viewing D25342 while logged in, suggesting a permission issue and not so much a bug. It might be both, as I expect permission issues to not show "unhandled exception"

The issue has disappeared on D25342 because it no longer shows the image in the diff, just the text "This is a binary file.". It is still visible by viewing the diff through B662 (https://we.phorge.it/D25342?id=1111).

Event Timeline

aklapper renamed this task from Unhandled exception shown for open differential revisions containing changes to images to Exception "Failed to load file data for changeset" shown for Differential revisions containing changes to images and user being logged out.Aug 15 2023, 17:57

I confirm for e.g. https://we.phorge.it/D25079 or https://we.phorge.it/D25079?id=355 or https://we.phorge.it/D25079?id=360 that this only happens when not being logged in. Or on https://we.phorge.it/D25342?id=1111 stacking four errors on top of each other.

valerio.bozzolan raised the priority of this task from Normal to High.Feb 1 2024, 12:03
valerio.bozzolan mentioned this in Z1: Phorge.

A workaround is to make all files as "Public". I fixed for example the diff D25079: Trigger: Add Sound "Coin" by setting the audio file F1271256 as public.

Probably, something should "Attach" these files by default to that Diff, during the upload phase.

can confirm, https://we.phorge.it/D25342?id=1111 does show an error for me in an incognito window.