Page MenuHomePhabricator

Wikidata Bridge error
Closed, ResolvedPublic8 Estimated Story Points

Description

The error happened on: https://ca.wikipedia.org/wiki/La_col%C2%B7lecci%C3%B3_invisible
Item title: Q1219675
Property: P571
Error message: INITIALIZATION_ERROR
Debug information:

[
    {
        "type": "INITIALIZATION_ERROR",
        "info": {
            "errors": [
                {
                    "code": "badtoken",
                    "info": "⧼badtoken⧽",
                    "docref": "See https://www.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
                }
            ],
            "name": "Error",
            "message": "badtoken",
            "stack": "_r@https://ca.wikipedia.org/w/load.php?lang=ca&modules=wikibase.client.data-bridge.app.modern&skin=vector&version=12p6r:31:62826\nmwApiRejectionToError@https://ca.wikipedia.org/w/load.php?lang=ca&modules=wikibase.client.data-bridge.app.modern&skin=vector&version=12p6r:31:63650\nmightThrow@https://ca.wikipedia.org/w/load.php?lang=ca&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=1j3ib:49:154\nhttps://ca.wikipedia.org/w/load.php?lang=ca&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=1j3ib:49:818"
        }
    }
]

Acceptance Criteria

  • If the error lies in mediawiki or in bridge, the bug is fixed. Otherwise, explain the origin of the error on the ticket and ping Lydia.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
darthmon_wmde updated the task description. (Show Details)
darthmon_wmde updated the task description. (Show Details)

@Lydia_Pintscher

As far as I can tell, this error was returned from the API action wbgetentities upon initialising.
Data Bridge recognises errors from that API action if they are related to the Entity missing, anything else is thrown as the API returns it. This is the case here, judging by the stack.

One thing I can't explain is why the error message says "bad token". We are not sending any tokens for this action. It simply requests the info and the claims about the Entity.
An edit token is send when saving changes, with API action wbeditentity, but that action couldn't have happened since the Data Bridge error message is INITIALIZATION_ERROR.
I double checked the code and INITIALIZATION_ERROR is not thrown anywhere else but upon starting Bridge when Entity info and claims are required.

For further investigation into this mystery we're going to need more info, for example a timestamp can be useful to check the error on Kibana or Logstash (not sure where the board is).

Thank you!

For the timing: I would guess close to when this ticket was filed.

@Lydia_Pintscher

I can't find any such error on Logstash and I cannot reproduce it neither locally nor on ca wiki.
Can we get more info on how exactly the error happened? What were the actions taken? Seems like there might be more to it than just clicking the edit pen and seeing this error.
My best guess is that the person wanted to log in before they edit, and they opened the login page, and then smth happened (badtoken) - e.g. took too long to login and the session expired.

@Tonina_Zhelyazkova_WMDE: Thanks for digging into it! I think if we can't solve this now that's totally ok. Is there something we can change in the reporting maybe to get more useful context from an editor next time this happens?

@Thebrunettetranslator Can you provide a bit more context of what you did when this happened?

T276146: Wikidata Bridge error was just created and now also contains the time at which that request happened down to the millisecond (though with some internal delay of a couple of milliseconds). Maybe that can be used to find the request in hadoop?

Change 667838 had a related patch set uploaded (by Tonina Zhelyazkova; owner: Tonina Zhelyazkova):
[mediawiki/extensions/Wikibase@master] bridge: Ask the user to describe their actions as part of the error report

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

@Tonina_Zhelyazkova_WMDE: Thanks for digging into it! I think if we can't solve this now that's totally ok. Is there something we can change in the reporting maybe to get more useful context from an editor next time this happens?

Great idea! Suggested new message (in the linked gerrit patch) is "If the error persists, please [$1 report this issue] describing your actions and include the following information: .."

T276146: Wikidata Bridge error was just created and now also contains the time at which that request happened down to the millisecond (though with some internal delay of a couple of milliseconds). Maybe that can be used to find the request in hadoop?

Amir says it should be in Logstash (see data bridge channel) but I can't find it there. I'm guessing errors from catalan wiki are not logged on Logstash. I don't see that wiki on the list.
Are you sure it would be on hadoop? Already tried accessing Hue (the FE of hadoop) but also did not find anything there.

Moving this to review for the changed message and then will put it in Stalled until we get more info on the error.
If anyone has any other ideas please let me know.

Change 667838 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: Ask the user to describe their actions as part of the error report

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

Addshore edited projects, added wdwb-tech (legacy-backlog); removed wdwb-tech.
Addshore moved this task from Incoming to Active on the wdwb-tech (legacy-backlog) board.