Page MenuHomePhabricator

Thumbnails for PDF files on jv.wikisource.org show a HTTP 401 Unauthorized error
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:
The thumbnails are not created. (The files could be downloaded, though)

Error message, for example in https://upload.wikimedia.org/wikisource/jv/thumb/f/f7/Laksitardjo.pdf/page1-180px-Laksitardjo.pdf.jpg

Unauthorized

This server could not verify that you are authorized to access the document you requested.

What should have happened instead?:
Thumbnails should be shown. See also https://jv.wikisource.org/wiki/Index:Laksitardjo.pdf and https://jv.wikisource.org/w/index.php?title=Kaca:Laksitardjo.pdf/1&action=edit&redlink=1, for example, you'll notice the images are missing.

Compare to:

Files from Commons have no such problem

The source file from en.wp have no such problem

Coincidentally, I submit a similar bug on another newly created wiki years ago: https://phabricator.wikimedia.org/T46872

Event Timeline

@Bennylin: Does this also happen on other Wikisources? Which ones have you tried?

Aklapper renamed this task from Unauthorized for jv.ws's thumbnails to Thumbnails for PDF files on jv.wikisource.org show a HTTP 401 Unauthorized error.Aug 27 2021, 2:36 PM
Aklapper triaged this task as Unbreak Now! priority.
Aklapper added a project: Thumbor.

Headers:

HTTP/2 401 Unauthorized
date: Fri, 27 Aug 2021 15:09:48 GMT
content-type: text/html; charset=UTF-8
content-length: 131
www-authenticate: Swift realm="AUTH_mw"
server: ATS/8.0.8
age: 0
x-cache: cp1076 miss, cp1082 pass
x-cache-status: pass
server-timing: cache;desc="pass", host;desc="cp1082"
strict-transport-security: max-age=106384710; includeSubDomains; preload
report-to: { "group": "wm_nel", "max_age": 86400, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" }] }
nel: { "report_to": "wm_nel", "max_age": 86400, "failure_fraction": 0.05, "success_fraction": 0.0}
permissions-policy: interest-cohort=()
x-client-ip: [...]
access-control-allow-origin: *
access-control-expose-headers: Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache
timing-allow-origin: *
X-Firefox-Spdy: h2

Originals load fine, only thumbnails are affected.

@Bennylin: Does this also happen on other Wikisources? Which ones have you tried?

Nope, only this one. This wiki was just launched on 4th August.

Does this also happen on other Wikisources? Which ones have you tried?

Nope, only this one.

@Bennylin: Please do not use All-and-every-Wikisource in such cases; see its description. Thanks.

@NahidIslam.Qa: Hi and welcome to Wikimedia Phabricator. It seems your comment is unrelated. Please see https://www.mediawiki.org/wiki/Phabricator/Help instead.

The fact that this is a new wiki suggests to me the maintenance scripts to give Thumbor access to the containers haven't been run yet. I'm not sure who's in charge of that these days (filebackend/setZoneAccess.php, which should be called by addWiki.php though)

@Aklapper: Got it
@fgiunchedi: Maybe because not many new wiki chose to enable upload, so this step was not added to the SOP for creating new wiki. If possible, please add it to the relevant process that's responsible for creating a new wiki in the future. Thanks!

The fact that this is a new wiki suggests to me the maintenance scripts to give Thumbor access to the containers haven't been run yet. I'm not sure who's in charge of that these days (filebackend/setZoneAccess.php, which should be called by addWiki.php though)

It will be Martin & Amir (added) who handled the creation, there was a couple of creations were addWiki broke so if this was one then it might have been missed. Let's see if they remember.

Mentioned in SAL (#wikimedia-operations) [2021-08-30T12:12:20Z] <Amir1> ladsgroup@mwmaint2002:~$ mwscript extensions/WikimediaMaintenance/filebackend/setZoneAccess.php --wiki=jvwikisource --backend=local-multiwrite (T289860)

Ladsgroup claimed this task.

Somehow that was missed or didn't run properly during creation of the wiki. It happens.