Page MenuHomePhabricator

MathSearch can no longer download individual files from gitiles (403)
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • The error "Failed to fetch or decode one or both files from gitiles. " is shown. In the background, the request to gitiles results in a 403 error: "Please contact the Wikimedia SRE team to discuss a less disruptive approach at noc@wikimedia.org. (c2c3a05)."

What should have happened instead?:

The visual diff of the change should be shown. This worked before, see for example

Event Timeline

Physikerwelt renamed this task from ?format=TEXT does no longer give raw files from gitiles to ?format=TEXT does no longer give base64 encoded files from gitiles.Aug 19 2026, 9:39 AM
Physikerwelt edited projects, added: MathSearch; removed: Gerrit.
Physikerwelt updated the task description. (Show Details)
Physikerwelt renamed this task from ?format=TEXT does no longer give base64 encoded files from gitiles to MathSearch can no longer download individual files from gitiles (403).Aug 19 2026, 10:03 AM
Physikerwelt updated the task description. (Show Details)
hashar claimed this task.
hashar edited projects, added: Collaboration-Services, Gerrit; removed: SRE.
hashar subscribed.

https://portal.mardi4nfdi.de/wiki/Special:MathDebug?action=visualDiff&base=refs/changes/15/1311415/1/&ref=refs/changes/11/1311411/3 does not respond currently . Can you describe what the underlying code is attempting to retrieve (eg the URL)?

My assumption is for each changes passed as argument ( Gerrit 1311411 & Gerrit 1311415 ), it fetches tests/phpunit/integration/WikiTexVC/data/reference.json using Gitiles and the base64 encoded https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Math/+/28d82fd66af5b50dc568ce134ce01f619a3887e8/tests/phpunit/integration/WikiTexVC/data/reference.json?format=TEXT .

If you get served a 403, there must be an error message associated with it, most probably because you did not set up a proper user-agent (see https://foundation.wikimedia.org/wiki/Policy:Wikimedia_Foundation_User-Agent_Policy ) and if you lack one please retry with a user-agent.

If requests are still denied, please paste the exact URL being fetched, the user-agent used, the times at which the requests occurred. Meanwhile I am marking this resolved assuming the requests are rejected due to the user-agent.

Aklapper changed the task status from Resolved to Invalid.Aug 19 2026, 10:21 AM

Marking as invalid as this is likely expected behavior.

The parameters vary. For example, my last attempt was

url: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Math/+/refs/changes/15/1311415/1//tests/phpunit/integration/WikiTexVC/data/reference.json?format=TEXT

with request headers

X-Request-Id: 521522b308c7671152677baa
User-Agent: MediaWiki/1.47.0-alpha

I will try using other values for the user agent, but since it worked previously, I would be surprised if that's the problem.
respStatus: 403 please contact the wikimedia SRE team to discuss a less disruptive approach at noc@wikimedia.org. (c2c3a05)

respHeaders
date: Wed, 19 Aug 2026 14:36:07 GMT
server: Varnish
x-cache: cp3066 int
x-client-ip (an IPv6 address, I am not sure if I should disclose that)

Change #1327132 had a related patch set uploaded (by Physikerwelt; author: Physikerwelt):

[mediawiki/extensions/MathSearch@master] Fix: MathDebug VisualDiff feature

https://gerrit.wikimedia.org/r/1327132

It worked with the user agent. I reopened the ticket from a MathSearch perspective, as this appears to be a bug in the MathSearch extension code.

Change #1327142 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@master] http: Add contact URL to default HttpRequestFactory::getUserAgent

https://gerrit.wikimedia.org/r/1327142

hashar removed hashar as the assignee of this task.Sep 8 2026, 7:10 PM

I am unassigning myself since the issue is in MathSearch / MediaWiki ;)

Change #1327142 merged by jenkins-bot:

[mediawiki/core@master] http: Add contact URL to default HttpRequestFactory::getUserAgent

https://gerrit.wikimedia.org/r/1327142

Krinkle claimed this task.

Change #1346809 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@REL1_46] http: Add contact URL to default HttpRequestFactory::getUserAgent

https://gerrit.wikimedia.org/r/1346809