tosher/Mediawiker

Cannot connect to wikis using UCP (Unified Community Platform)

Opened this issue · 23 comments

Hello, sorry to bother you again. FANDOM is doing this new Unified Community Platform thingy that runs running MediaWiki 1.33, and after March 11th, 2020, they are forcing all new wikis to use it. Mediawiker can't seem to connect to a wiki that is using it.

I observed more, it seems that when I leave username and password empty and connect as anonymous, it works just fine,

but when I try to login to any account account, my output is:

Connecting to "https://wreckit-woodhouse.fandom.com" ..  done.
Login in with authorization type login..   >>>  failed: Failed

Maybe this is something I should contact fandom about..

I'll try to check it..

As i see, it needs some research and maybe coding :)

But with cookie authorization it works for me:

		"wreckit-woodhouse.fandom.com":
		{
			"host": "wreckit-woodhouse.fandom.com",
   		        "authorization_type": "cookies",
			"cookies_browser": "firefox",
			"is_ssl_cert_verify": true,
			"https": true,
			"pagepath": "/wiki/",
			"path": "/"
		}

cookies_browser maybe firefox or chrome - just login on the wiki's page in browser, after that you can open/edit pages with ST

No needs to define login/pass in the settings, plugin will try to read and use browser's cookie for wiki site.

When I try cookies using the settings you used, I get:

Connecting to "https://wreckit-woodhouse.fandom.com" ..  done.
Login in with authorization type cookies..  done, without authorization.

When I have logged in fandom using Firefox.

Logged in wreckit-woodhouse.fandom.com or wikia? Domain must be the same.

It is fandom, not wikia.
Perhaps Firefox is blocking MediaWiker from collecting cookies? MediaWiker can't seem to find them.

When I have logged in wikia using Firefox. :)

So, you have logged in on wreckit-woodhouse.fandom.com, ок.

Firefox can't to block Mediawiker, it just a file read...

Please, set the debug option to true in settings, retry to open any page with cookies type and post the result in panel here (with remove real values from cookies values).

The cookie values are the numbers right?

Settings:

"wreckit-woodhouse.fandom.com":
{
	"authorization_type": "cookies",
	"cookies_browser": "firefox",
	"host": "wreckit-woodhouse.fandom.com",
	"https": true,
	"is_ssl_cert_verify": true,
	"pagepath": "/wiki/",
	"path": "/"
}

Output:

'''Setup new connection to "wreckit-woodhouse.fandom.com".'''
Connecting to "https://wreckit-woodhouse.fandom.com" ..  done.
Login in with authorization type cookies..  done, without authorization.
  >>> '''DEBUG''' Get connection from connection manager.
  >>> '''DEBUG''' Connection: <requests.sessions.Session object at [cookie value]>
Anonymous connection detected, forcing new connection.. 
Connecting to "https://wreckit-woodhouse.fandom.com" ..  done.
Login in with authorization type cookies..  done, without authorization.
  >>> '''DEBUG''' Get connection from connection manager.
  >>> '''DEBUG''' Connection: <requests.sessions.Session object at [cookie value]>
Page [[Test]] was opened successfully from "wreckit-woodhouse.fandom.com".
  >>> '''DEBUG''' Get connection from connection manager.
  >>> '''DEBUG''' Cached connection: True
Anonymous connection detected, forcing new connection.. 
Connecting to "https://wreckit-woodhouse.fandom.com" ..  done.
Login in with authorization type cookies..  done, without authorization.
  >>> '''DEBUG''' Get connection from connection manager.
  >>> '''DEBUG''' Connection: <requests.sessions.Session object at [cookie value]>

It's on Windows or not?

Yes, this is Windows.

I've tried mediawiker_firefox_cookie_files, but I get the same results...

"wreckit-woodhouse.fandom.com":
{
	"authorization_type": "cookies",
	"cookies_browser": "firefox",
	"host": "wreckit-woodhouse.fandom.com",
	"https": true,
	"is_ssl_cert_verify": true,
	"pagepath": "/wiki/",
	"path": "/",
	"mediawiker_firefox_cookie_files": ["C:\\Users\\[USERNAME]\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\[PROFILE FOLDER]\\cookies.sqlite"]
}

Just firefox_cookie_files in the root of the config, not inside site settings.

Oops. That fixed it. Thank you again.

Please, try the new version:
https://github.com/tosher/Mediawiker/releases/tag/v3.6.3

Login/pass authorization didn't changed.. i don't now which type of auth used at fandom.com.. in this version clientlogin method was added and it works fine at mediawiki site, but not at fandom :(.

Maybe, firefox_cookie_files option not needed with this version.

Tested Mediawiker v3.6.3, Firefox v79.0. Changes successfully saved without firefox_cookie_files specified:

"wreckit-woodhouse.fandom.com":
{
  "authorization_type": "cookies",
  "cookies_browser": "firefox",
  "host": "wreckit-woodhouse.fandom.com",
  "https": true,
  "is_ssl_cert_verify": true,
  "pagepath": "/wiki/",
  "path": "/"
}

Thanks for the info!

UCP officially took over every wiki I edit on :(

Apparently, a lot of people are having trouble with this api

For UCP, non-cookie version requires credentials generated via Special:BotPasswords (i.e. if your wiki has this special page, then you need to use this for API logins, edits, etc).
Cookie version still works fine.

Oh, that makes sense. I've never heard of Special:BotPasswords before. Thanks!

For UCP, non-cookie version requires credentials generated via Special:BotPasswords (i.e. if your wiki has this special page, then you need to use this for API logins, edits, etc).

For API:clientlogin too?

@tosher On UCP, clientlogin does not work. There's a relevant ticket for pywikibot (https://phabricator.wikimedia.org/T249403) where this is mentioned:

Hmm, it seems UCP does not support login through API currently: https://wreckit-woodhouse.fandom.com/api.php?action=query&meta=authmanagerinfo&amirequestsfor=login.
canauthenticatenow response is empty, indicates login action is currently not possible.


Observations for UCP:

  • On Gamepedia, /Special:UserLogin goes to /signin (HTTP 302), which goes to https://fandomauth.gamepedia.com/signin (HTTP 301).
  • On Fandom, /wiki/Special:UserLogin goes to /signin (HTTP 302), which goes to https://www.fandom.com/signin (HTTP 301).

Thank you! Very-very useful info.