Page MenuHomePhabricator

Mitigate broken login due to Nonce already used
Closed, ResolvedPublic


Due to T272319: Frequent "Nonce already used" errors in scripts and tools, login is broken sometimes (happened 50 times over 700 logins). Automatic retry may be performed to avoid showing error to the user.

(4 additional frame(s) were not displayed)
  File "flask/", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "flask/", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "quarry/web/", line 34, in login
    redirect_url, request_token = handshaker.initiate()
  File "mwoauth/", line 89, in initiate
  File "mwoauth/", line 98, in initiate
OAuthException: Expected x-www-form-urlencoded response from MediaWiki, but got something else: b'Error: An error occurred in the OAuth protocol: Nonce already used: 873230511213254369'

See also patch on another tool: R2362:23ccbcf6f670: Work around MediaWiki “Nonce already used” errors

Event Timeline

Change 665472 had a related patch set uploaded (by Framawiki; owner: Framawiki):
[analytics/quarry/web@master] Mitigate broken login due to Nonce already used

Mentioned in SAL (#wikimedia-cloud) [2021-02-20T13:18:16Z] <wm-bot> framawiki: Deployed f51f9a9 on -web-01 T275277 (not yet merged)

Change 665472 abandoned by Framawiki:

[analytics/quarry/web@master] Mitigate broken login due to Nonce already used


T272319, upstream issue, was closed