Page MenuHomePhabricator

Captcha fails to load on it.wikipedia.org
Closed, InvalidPublic

Description

On Firefox 52, the captcha on the registration page or the editing page doesn't manage to load the image. Instead, a white box is shown:

Console shows:

XML Parsing Error: not well-formed
Location:
Line Number 1, Column 75:

Error seen on it.wikipedia.org but not en.wikipedia.org.

Event Timeline

Nemo_bis created this task.Apr 2 2017, 1:05 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 2 2017, 1:05 PM
Nemo_bis triaged this task as Unbreak Now! priority.Apr 2 2017, 1:05 PM
Restricted Application added subscribers: Jay8g, TerraCodes. · View Herald TranscriptApr 2 2017, 1:05 PM

Works for me.

Works for me, error console is clean

Volans added a subscriber: Volans.Apr 2 2017, 1:16 PM

It works here too on Firefox 52.0.2 (64-bit) on MacOS and Linux

Reedy added a subscriber: Reedy.Apr 2 2017, 1:53 PM

WFM Chrome 59.0.3053.3 and FF 53.0b8 (64-bit)

Volans removed a subscriber: Volans.Apr 2 2017, 1:56 PM

I've also tested in safe mode and private window, same result.

The exact version is:

$ rpm -qa | grep firefox
firefox-52.0-7.fc25.x86_64

@Nemo_bis Can you dig where this error comes from? Thrown by a script? Internal error from firefox when trying to parse an XMLHttpRequest? Does the developer console display any source?

Hmm. This might be the same problem as T162035?

Nemo_bis lowered the priority of this task from Unbreak Now! to High.Apr 6 2017, 7:10 AM
Nemo_bis added a comment.EditedApr 6 2017, 7:35 AM

Sorry, I forgot to adjust the priority based on the comments. I confirm this happens in firefox-52.0-7.fc25.x86_64 on another computer as well, with a different profile, so it's not specific to me (but might be specific to Fedora 25?! or to a minor version not released on your distributions). I did not see the error in Firefox 52.0.2 on Ubuntu.

Can you dig where this error comes from? Thrown by a script? Internal error from firefox when trying to parse an XMLHttpRequest? Does the developer console display any source?

No source shown.

Hmm. This might be the same problem as T162035?

That was my first thought too, but then I don't understand why the wiki logo would disappear too, despite working in the other pages. And the captcha images themselves are inline data URIs. (Note that https://it.wikipedia.org/wiki/MediaWiki:Common.css contains logo customisations. I cc'd some local admins because they might know about something which could make the XHTML invalid.)

https://bugzilla.mozilla.org/show_bug.cgi?id=1036987#c1 reminded me to check what content-type the content is being served with, but everything looks correct there.

Bug still present in firefox.x86_64 52.0.2-2.fc25 (there was an upgrade today).

Going to https://it.wikipedia.org/w/index.php?title=Speciale:CreaUtenza in a private window of firefox-53.0-2.fc25.x86_64 the captcha loads immediately for me.
Can you still reproduce the problem?

Yes, the error still happens identifical on Firefox 52.0.2.

What does the "network" tab of the Developer Tools list?
Here it lists https://it.wikipedia.org/w/index.php?title=Speciale:Captcha/image&wpCaptchaId=1234567890 being accessed. HTTP 200. Cause: img. Type: png.

What does the "network" tab of the Developer Tools list?
Here it lists https://it.wikipedia.org/w/index.php?title=Speciale:Captcha/image&wpCaptchaId=1234567890 being accessed. HTTP 200. Cause: img. Type: png.

It does error for me (Requested bogus captcha image), probably because it's tied to your session ID (which makes sense). But it would be good to know if the captcha's image URL appears in the network tab for Nemo_bis, it's return status and mime type. If everything looks good, see if opening the image URL directly in the browser displays it correctly.

Many things, but when hitting refresh there's only a request to api.php

action=fancycaptchareload
format=xml

with response like

<?xml version="1.0"?><api><fancycaptchareload index="377460411" /></api>

and headers like

Accept-Ranges: bytes
Age: 0
Cache-Control: private, must-revalidate, max-age=0
Content-Encoding: gzip
Content-Length: 90
Content-Type: text/xml; charset=utf-8
Date: Sun, 30 Apr 2017 12:28:16 GMT
Server: mw2209.codfw.wmnet
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Vary: Accept-Encoding
Via: 1.1 varnish-v4, 1.1 varnish-v4, 1.1 varnish-v4
X-Cache: cp2023 pass, cp3041 pass, cp3032 pass
X-Content-Type-Options: nosniff
X-Firefox-Spdy: h2
X-Frame-Options: DENY
backend-timing: D=19730 t=1493555296386760
x-analytics: ns=-1;special=Badtitle;WMF-Last-Access=30-Apr-2017;WMF-Last-Access-Global=30-Apr-2017;https=1
x-cache-status: pass

The https://it.wikipedia.org/w/index.php?title=Speciale:Captcha/image request is never made.

In the console there's also

This page is using the deprecated ResourceLoader module "es5-shim".

Use of the "es5-shim" module is deprecated since MediaWiki 1.29.0

TTO added a subscriber: TTO.Apr 30 2017, 12:52 PM

I can't help but notice that the Wikipedia logo in the top-left is missing in the initial screenshot. Is this just a coincidence?

The captcha image is present in the HTML of the page, not generated with JavaScript, so this rules out (in theory) any JavaScript issues.

Those are the reasons for the browser to not request the image, that I can think of:

  1. A browser extension (which we could also rule out since you said the same happens on a new profile)
  2. AdBlockPlus or similar which is hiding the image (shouldn't be the case as per above)
  3. Some JavaScript removing/hiding the image. You can try disabling JavaScript and see what happens.
  4. Some CSS (from MediaWiki itself?) hiding the image element
  5. Mangled HTML (from where?)

For points 4 and 5 it would be good to inspect the image element (hitting F12) and see, if the HTML of the image looks correct (it as a src and the URL seems correct), and if there's any CSS rule applied hiding it (display:none)

Nemo_bis added a comment.EditedMay 1 2017, 10:27 AM

I can't help but notice that the Wikipedia logo in the top-left is missing in the initial screenshot. Is this just a coincidence?

No, it's not a coincidence. The logo is overridden in common.css.

Some JavaScript removing/hiding the image. You can try disabling JavaScript and see what happens.

The button to reload the image disappears and the console no longer has errors, but nothing changes.

Some CSS (from MediaWiki itself?) hiding the image element

The captcha has img:-moz-suppressed but that's because the image is not loaded in the first place (there is no request)

Mangled HTML (from where?)

This is in theory what the console errors point to, AFAICT. The console has several CSS warnings for

Error in parsing value for ‘background-image’. Declaration dropped.

pointing to the line for .fancycaptcha-wrapper in load.php.

(If I were a sysop I would try and remove such customisations to see if they are the culprit, which is why I added some sysops when I reported this bug.)

From MDN: :-moz-suppressed

The :-moz-suppressed CSS pseudo-class matches elements representing images that were not loaded because loading images from that site has been blocked.

Are you really sure you don't have any option in Firefox blocking images? I can reproduce that if I go to Page Info -> Permissions -> Deny loading of images. Interestingly, it still loads images on articles because they're served from a different domain (commons), thus blocking only images that are from it.wikipedia.org.

Are you really sure you don't have any option in Firefox blocking images?

And why would that happen only when a captcha is loaded? Images load fine in all other cases.

And why would that happen only when a captcha is loaded? Images load fine in all other cases.

All other images are from upload.wikimedia.org domain. The only images that seem to come from it.wikipedia.org domain are the logo, captcha images, and the logos of Wikimedia and Powered By MediaWiki in the footer.

Mangled HTML (from where?)

This is in theory what the console errors point to, AFAICT. The console has several CSS warnings for

Error in parsing value for ‘background-image’. Declaration dropped.

pointing to the line for .fancycaptcha-wrapper in load.php.


(If I were a sysop I would try and remove such customisations to see if they are the culprit, which is why I added some sysops when I reported this bug.)

This is normal and unlikely to be a cause of this issue. The warnings are caused by the technique we use to serve SVG icons to supporting browsers and PNG icons to everyone else (e.g. IE 8). The browser is dropping declarations using vendor prefixes for other browsers, as it should.

Nemo_bis closed this task as Invalid.May 2 2017, 8:29 AM

All other images are from upload.wikimedia.org domain. The only images that seem to come from it.wikipedia.org domain are the logo, captcha images, and the logos of Wikimedia and Powered By MediaWiki in the footer.

Right. /o\ Thanks for the patience and the investigative intuition and sorry for being blind.