Following up on T255585 @jdlrobson has setup a dashboard for tracking client errors at: https://logstash.wikimedia.org/goto/0e48f48aaeb915d759f53eedc4230000
We want to look at the errors, and provide some overview / breakdown of the current situation and errors that occur.
We intend to define the process/ways of addressing different kind of errors. This will follow once the overview of the error landscape is created.
We might want to write phabricator tickets for these errors and put them in the general #wikidata backlog.
Some of the tickets that we create may be for code that we do not own or control (such as gadgets).
We still want to create these tickets so that the community has an opportunity to fix the issues.
**Information to include in the overview** (potentially incomplete list)
* source of the error (at least classified as: Wikibase code, non-Wikibase Mediawiki, gadget; preferably link to the source line causing the error or gadget in question)
* frequency of occurrence (e.g. with the weekly window)
* link to phabricator task tracking the error cluster
**ACs:**
[] Wikidata.org Errors have been reviewed
[] We know the source of the errors
[] We have phabricator ticket for the errors that we want to fix
**Original write up**
>
> Following up on T255585 I've setup a dashboard for tracking client errors at:
> https://logstash.wikimedia.org/goto/0e48f48aaeb915d759f53eedc4230000
> This filters various known gadget problems to allow you to focus on the errors that matter.
>
> Right now wikidata seems to cause more errors than any other project that has error tracking enabled - about 8,988 errors in the last 24 hrs -we should strive to get these down to 5000 a day to be at similar levels to the other projects.
>
> @esanders has created a useful tool for shortening stack traces that may be useful:
> https://edg2s.github.io/short-trace/
>
> From experience, anything with a count of over 200 in 12hrs is probably something worth fixing. Troublesome IP addresses usually indicate a faulty user script that is also worth fixing to cut down log noise.
>
> The biggest priority should be diagnosing and fixing the error `TypeError: context is undefined `
>
> Let me know if I can help with anything relating to triage or the dashboard itself! Have fun!
>
**Results**
The following table should cover over 70% of the errors that were logged in the last 24 hours:
| Error message | Source or steps to reproduce | frequency per 24h | phabricator task |
| ---- | ---- | ---- | ---- |
| `TypeError: context is undefined` and `Uncaught TypeError: Cannot read property 'config' of undefined` | Type something in the small search box, error appears after pressing enter, works while logged out (->not gadget?) | 2300 | T105637 (fix should be deployed with the next train) |
| `Error: invalid entity serialization` | Source: Termbox Interaction with mobile Lexeme; Steps: Go to https://m.wikidata.org/wiki/Lexeme:L136571 | 160 (These are probably just the Firefox errors) | T264893 |
| `TypeError: $.widget is not a function` | probably that user script: User:Ch1902/ancestry.js (see [logstash](https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.10.07/clienterror/?id=AXUDJTYf1pGl6xFMAig4))| 550 | T265015 |
| `NS_ERROR_FILE_CORRUPTED: ` | unclear, all these errors come from only 2 IP6 adresses (see [logstash](https://logstash.wikimedia.org/goto/f2e8ba9890a9a5939422ab4962208bfe)). Probably one of those Gadgets: AuthorityControl, Descriptions, DragNDrop, DuplicateReferences, EasyQuery, Merge, NewSection,Preview, PrimarySources, ProtectionIndicators, RequestDeletion, Search, SiteIdToInterwiki, autoEdit, currentDate, formWizard, imagelinks, labelLister, linkscount, relateditems | 400 | T265022 |
| `Uncaught ReferenceError: wgCanonicalSpecialPageName is not defined` | Seems to be caused by the undefined variable `wgCanonicalSpecialPageName` in https://meta.wikimedia.org/wiki/User:HakanIST/global.js and maybe other copies of the `confirmWatchlistRollback` script | 280 | None |
| `Uncaught TypeError: $(...).css(...).draggable is not a function` | seems to be caused by https://www.wikidata.org/w/index.php?title=User:Magnus_Manske/mixnmatch_gadget.js | 230 | T265035 |
| `ReferenceError: wikibase is not defined` | likely caused by https://www.wikidata.org/w/index.php?title=User:Mat%C4%9Bj_Such%C3%A1nek/moveClaim.js | 125 | T265037 |
| `SyntaxError: expected expression, got '<'` | unclear what is going on. The file_url is given as https://www.wikidata.org/w/index.php?title=MediaWiki:Gadget-DraggableSitelinks&action=raw&ctype=text/javascript --- so maybe someone tries to include an actual HTML page? Or is that Gadget page broken? (see [logstash](https://logstash.wikimedia.org/goto/359d75e3293eb660493c8288df5c5e4c)) | 162 | None |
| `Uncaught TypeError: $(...).dialog is not a function` | Error seems to stem from the following user script: https://www.wikidata.org/w/index.php?title=User:Bargioni/viaf.js ( see [logstash](https://logstash.wikimedia.org/goto/c1c897137ea52221b52887c8fa4f2ee0) ) | 164 | T265053 |
| `TypeError: OO.ui is undefined` | precise source unclear, see [the comment](https://phabricator.wikimedia.org/T264382#6525216) below. Seems to affecting <10 users, all Firefox | 440 | TBC |