Page MenuHomePhabricator

Unable to fetch Parsoid HTML
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue:

What happens?:
"Unable to fetch Parsoid HTML"

What should have happened instead?:
VisualEditor launches.

Event Timeline

Nardog triaged this task as Unbreak Now! priority.Jan 30 2024, 8:00 AM

Can replicate this on Chinese Wikipedia when using the reply tool.

I have the same issue when trying to use the reply tool on any talk page

At this point in time, the fault disappeared. Needs further observation.

Nardog lowered the priority of this task from Unbreak Now! to Needs Triage.Jan 30 2024, 8:24 AM

Also had this issue in the morning, not sure whether in VE or not but it was tied with the enWikipedia reply tool.

So both VisualEditor and DiscussionTools were affected, which in the "old days" would mean that RESTBase or the Parsoid/JS server were having problems, but in the "new days" both of those use direct Parsoid access, so it must have been some issue with the main action API servers? But no other core services reported issues, and I don't think we ever found any logs, indicating that the problem was pretty high up in the stack and not actually getting into core or Parsoid (or core?) code.

A bit of a mystery, and without logs or the ability to reproduce there isn't much more to go on. As @Cwek says, "needs further observation".

I don't think anyone is going to investigate this under these circumstances, so let's close it. We should reopen if it reoccurs.

Don't know if I'm allowed to reopen; revert if not. I am using the latest Firefox on Windows 11. Tried it logged in on Vector10 and logged out (in a private tab) on Vector22. Error replicated. Cannot edit anything with Visual Editor.

Another report in T358548. I'm vaguely wondering if it might have a relation to T357689 (revision ID set to 0).

Unable to reproduce at the moment. Which doesn't mean this isn't an issue, it just means it is challenging to diagnose.

May be related to T353859: Parsoid errors not fully propagated to VisualEditor errors in that this doesn't appear to be a problem with the REST API handlers themselves, but those handlers may not be propagating more detailed messages in a helpful way, making it difficult to discern the deeper cause of the issue.

Change rEVED1006969baddf had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] REST: Log parsoid errors

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

Change 1006972 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/extensions/VisualEditor@master] Preserve more error details coming from parsoid.

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

Made a couple of improvements to loggign and error reporting. That will hopefully give us more to work with. Once the patches are deployed, we should see these errors pop up in the HtmlOutputRendererHelper error.

Change rEVED1006969baddf merged by jenkins-bot:

[mediawiki/core@master] REST: Log parsoid errors

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

Logging code is on all servers now, but I'm not seeing anything in the HtmlOutputRendererHelper channel so far.

Change #1006972 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Preserve more error details coming from parsoid.

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

This might have happened again in T362210 (which also went away on its own), although the error message this time was "Unable to stash Parsoid HTML".

Logging code is on all servers now, but I'm not seeing anything in the HtmlOutputRendererHelper channel so far.

Are we sure entries in this channel would be logged in production? I thought new channels have to be added here first: https://gerrit.wikimedia.org/g/operations/mediawiki-config/+/4536766ecc16f0950fccc417bf749b7d485d0708/wmf-config/InitialiseSettings.php#2076

Change #1018738 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[operations/mediawiki-config@master] LogStash: log HtmlOutputRendererHelper channel

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

Are we sure entries in this channel would be logged in production? I thought new channels have to be added here first: https://gerrit.wikimedia.org/g/operations/mediawiki-config/+/4536766ecc16f0950fccc417bf749b7d485d0708/wmf-config/InitialiseSettings.php#2076

Doh, good catch! I knew I must be missing something obvious! Made a config patch: https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/1018738

Don't know if that helps for investigation, but while the "stash parsoid html" error occurred today, I also got an OAuth E004 missing request token error when trying to login to Phabricator. It worked again the same time as the parsoid error disappeared.

Change #1018738 merged by jenkins-bot:

[operations/mediawiki-config@master] LogStash: log HtmlOutputRendererHelper channel

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

Mentioned in SAL (#wikimedia-operations) [2024-04-10T20:01:48Z] <cjming@deploy1002> Started scap: Backport for [[gerrit:1018738|LogStash: log HtmlOutputRendererHelper channel (T356157)]]

Mentioned in SAL (#wikimedia-operations) [2024-04-10T20:04:23Z] <cjming@deploy1002> cjming and daniel: Backport for [[gerrit:1018738|LogStash: log HtmlOutputRendererHelper channel (T356157)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-04-10T20:15:39Z] <cjming@deploy1002> Finished scap: Backport for [[gerrit:1018738|LogStash: log HtmlOutputRendererHelper channel (T356157)]] (duration: 13m 51s)

Ok, seeing errors now, and filing tickets: https://logstash.wikimedia.org/goto/8cf77667ebb17ba5a1ea8190d48f27f1

Everything I see in the log so far is handled correctly by VE though, and shouldn't result in a generic mystery error being shown to the user.

The same "Unable to stash Parsoid HTML" error is reported to occur on Chinese Wikipedia as well.

There is a corresponding spike in error logs:

image.png (1×3 px, 168 KB)

Hopefully we will be able to investigate the problem properly now.