Page MenuHomePhabricator

OperationFailedException in ApiEdit.CheckForErrors (relogin issue)
Closed, ResolvedPublic

Description

description:

workaround:

Exception:OperationFailedException
Message:`Operation 'login' ended with result 'NeedToken'.
Xml: '<?xml version="1.0"?><api><warnings><login xml:space="preserve">Fetching a token via action=login is deprecated. Use action=query&amp;meta=tokens&amp;type=login instead.</login></warnings><login result="NeedToken" token="9f1dd25452d3051b2520a6de3e521dd656c3c124+\" cookieprefix="enwiki" sessionid="n2gv2j1ost14065222uev23m7drg6ump" /></api>'`
Call stack:<pre> σε WikiFunctions.API.ApiEdit.CheckForErrors(String xml, String action) στο c:\Users\Marios\Desktop\AWB\WikiFunctions\API\ApiEdit.cs:γραμμή 1522
σε WikiFunctions.API.ApiEdit.Login(String username, String password, String domain) στο c:\Users\Marios\Desktop\AWB\WikiFunctions\API\ApiEdit.cs:γραμμή 629
σε WikiFunctions.Profiles.AWBProfilesForm.PerformLogin(String username, String password) στο c:\Users\Marios\Desktop\AWB\WikiFunctions\Profiles\AWBProfilesForm.cs:γραμμή 256</pre>

OS: Microsoft Windows NT 6.2.9200.0
version: AutoWikiBrowser (5.8.5.2), WikiFunctions (5.8.5.2), revision 11895 (2016-02-16 11:08:31)
net: 2.0.50727.8009
duplicate:
site: https://en.wikipedia.org

AWBPlugins
- CFD-Plugin
- Delinker
- Fronds
- IFD-Plugin
- Kingbotk Plugin
- TheTemplator

AWBBasePlugins
- No Limits Plugin
- TypoScan Plugin

ListMakerPlugins
- Bing Search Plugin
- CategoryNoLimitsForAdminAndBotsPlugin
- CategoryRecursiveNoLimitsForAdminAndBotsPlugin
- CategoryRecursiveNoLimitUserDefinedLevelListProvider
- ImageFileLinksNoLimitsListProvider
- AllPageInAllNSNLForAdminAndBotsPlugin
- WhatTranscludesPageNoLimitsForAdminAndBotsPlugin
- WhatTranscludesPageAllNSNoLimitsForAdminAndBotsPagePlugin
- UserContribsNoLimitsForAdminAndBotsPlugin
- UserContribsUserDefinedNumberForAdminAndBotsPlugin
- TypoScan ListMaker Plugin
- TypoScan ListMaker Plugin 500

Event Timeline

Magioladitis raised the priority of this task from to Needs Triage.
Magioladitis updated the task description. (Show Details)
Magioladitis added a project: AutoWikiBrowser.
Magioladitis subscribed.

How to duplicate: Login in AWB. Logout in Wikipedia. Login in Wikipedia. Try to relogin in AWB.

Not quite the same as T126577 since that was fixed in 5.8.5.1

In rev 11896 I have implemented login token via the new MediaWiki way using action=query&meta=tokens&type=login Works for normal login.

For other wikis not yet using that, it should fall back to old way of action=login twice.

However, that still doesn't solve this one. For the AWB relogin a call to action=query&meta=tokens&type=login returns a token, but the call to action=login passing said token still returns result="NeedToken". I don't really understand that. I assume that means the API doesn't like the token I sent, but I've just been given it by the API, so what else can I do? I assume there is some sort of old session/new session issue, but I can't see where. Maybe @Reedy can advise further.

Rjwilmsi renamed this task from OperationFailedException in ApiEdit.CheckForErrors to OperationFailedException in ApiEdit.CheckForErrors (relogin issue).Feb 20 2016, 9:09 AM
Magioladitis claimed this task.

Commit [r11985]

What's with the updater not working?

In T127138#2217714, @Ankit-Maity wrote:

What's with the updater not working?

Define not working?

@Reedy The .exe runs but doesn't actually update AWB.

In T127138#2226803, @Ankit-Maity wrote:

@Reedy The .exe runs but doesn't actually update AWB.

See T133095