Page MenuHomePhabricator

Flow\Exception\InvalidTopicUuidException: An error has occurred.
Open, Needs TriagePublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   Flow\Exception\InvalidTopicUuidException: An error has occurred.
error.stack_trace
from /srv/mediawiki/php-1.42.0-wmf.20/extensions/Flow/includes/WorkflowLoaderFactory.php(165)
#0 /srv/mediawiki/php-1.42.0-wmf.20/extensions/Flow/includes/WorkflowLoaderFactory.php(146): Flow\WorkflowLoaderFactory::uuidFromTitlePair(integer, string)
#1 /srv/mediawiki/php-1.42.0-wmf.20/extensions/Flow/includes/Hooks.php(1355): Flow\WorkflowLoaderFactory::uuidFromTitle(MediaWiki\Title\Title)
#2 /srv/mediawiki/php-1.42.0-wmf.20/includes/HookContainer/HookContainer.php(159): Flow\Hooks->onTitleSquidURLs(MediaWiki\Title\Title, array)
#3 /srv/mediawiki/php-1.42.0-wmf.20/includes/HookContainer/HookRunner.php(4001): MediaWiki\HookContainer\HookContainer->run(string, array)
#4 /srv/mediawiki/php-1.42.0-wmf.20/includes/cache/HtmlCacheUpdater.php(251): MediaWiki\HookContainer\HookRunner->onTitleSquidURLs(MediaWiki\Title\Title, array)
#5 /srv/mediawiki/php-1.42.0-wmf.20/includes/actions/ActionEntryPoint.php(726): HtmlCacheUpdater->getUrls(MediaWiki\Title\Title)
#6 /srv/mediawiki/php-1.42.0-wmf.20/includes/actions/ActionEntryPoint.php(510): MediaWiki\Actions\ActionEntryPoint->performAction(Article, MediaWiki\Title\Title)
#7 /srv/mediawiki/php-1.42.0-wmf.20/includes/actions/ActionEntryPoint.php(145): MediaWiki\Actions\ActionEntryPoint->performRequest()
#8 /srv/mediawiki/php-1.42.0-wmf.20/includes/MediaWikiEntryPoint.php(199): MediaWiki\Actions\ActionEntryPoint->execute()
#9 /srv/mediawiki/php-1.42.0-wmf.20/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#10 /srv/mediawiki/w/index.php(3): require(string)
#11 {main}
Impact
  • the rate of the error has increased recently - 557 hits in 7 days, see logstash link
  • UI displays an error page (400 error)
Notes

Details

Request URL
https://www.mediawiki.org/wiki/Topic:V5dtlpkl2okmw7bc/

Event Timeline

The slash at the end is problematic. Removing it opens thread.

So we need:

  • Validation of link after requesting and more friendly message if invalid
  • Way to track links to threads, especially invalid ones.

@Etonkovidova - can you look into this please? Is this something Growth needs to prioritize?

@Etonkovidova - can you look into this please? Is this something Growth needs to prioritize?

@KStoller-WMF (in short) Yes, it'd be great if we can look at the issue.
I checked the current rate of the error - it's still about 521 per week, which is still quite high. When this issue was filed, I added it as a discussion item to my list of QA Flow Deprecation tasks/issue and I talked to @Ryasmeen.
If a link in the logstash error report is used, an error page is displayed (e.g. https://species.wikimedia.org/wiki/Topic:Databases):

Screen Shot 2024-04-24 at 3.50.41 PM.png (1×2 px, 219 KB)

However, logstash seems to report somewhat erroneous urls (I checked randomly several of reported errors). For example,

logstash referenceurl as reported in logstashcorrect url
reqId:f0cf990d-c063-4d28-ad8f-4e29cb4bf1ee/wiki/Topic:X8rqc0kuh13u14nz).
Screen Shot 2024-04-24 at 4.01.27 PM.png (372×1 px, 41 KB)
https://www.mediawiki.org/wiki/Topic:X8rqc0kuh13u14nz refers to a correctly displayed Flow page
reqId:458a4d70-4d67-4631-80e3-0486adf75e26https://eu.wikipedia.org/wiki/Topic:Wtwt3uyhbfv7nrh8/ (notice the extra forward slash at the end of the url)https://eu.wikipedia.org/wiki/Topic:Wtwt3uyhbfv7nrh8 refers to a correctly displayed Flow page
reqId:b8d6f229-ced2-4148-a656-9c4ec92bdb5azhwiki /wiki/Topic:X4hg6ibkhs7lxt1r/https://zh.wikipedia.org/wiki/Topic:X4hg6ibkhs7lxt1r refers to a correctly displayed Flow page

Not all errors have incorrect urls, and I'm not sure what UX is actually present. I wasn't able to reproduce the issue - using a permalink on a Flow board for a topic produces an expected result: a Flow topic is displayed.

Thanks, Elena.
Given that we hope to move forward with Flow deprecation in the coming fiscal year, we should likely limit the time we invest in this, but I'll move this task to Growth's backlog.

Now I created another entries on logs :P https://www.mediawiki.org/w/index.php?title=Topic:Xxavmfc41t2yb5zg&topic_showPostId=y3kaa7nq0w2z04tt#flow-post-y3kaa7nq0w2z04tt

Given that we hope to move forward with Flow deprecation in the coming fiscal year

No, don't do this :(

@Wargo - Please add your thoughts / feedback here: https://www.mediawiki.org/wiki/Talk:Structured_Discussions/Deprecation
We haven't started the Flow deprecation work, but we have started some initial community discussions: https://www.mediawiki.org/wiki/Structured_Discussions/Deprecation/Report

Ok, looking into this a tiny bit, these errors seem to occur in two circumstances:

So maybe showing a proper error page without letting an exception bubble all the way up would work?

Though I have to look a bit more into how to do that.

  • Maybe we can just redirect to the version without the slash, or show an error page with "Did you mean <correct URL>?"

I think a 404 page, with a "did you mean" in the case that their input looks like a real Topic ID, is great, yes.

Michael moved this task from Backlog to Hacking projects on the Wikimedia-Hackathon-2024 board.

Actually looking into this as my main hackathon focus/project

Change #1027093 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/Flow@master] Stop logging invalid topic extension and improve error page

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

Change #1027093 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Stop logging invalid topic extension and improve error page

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