Last modified: 2013-12-17 02:44:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60380, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58380 - "Bad API response: NULL" when using OAuth
"Bad API response: NULL" when using OAuth
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CirrusSearch (Other open bugs)
unspecified
All All
: Highest major (vote)
: ---
Assigned To: Nik Everett
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-12 09:36 UTC by Dan Garry
Modified: 2013-12-17 02:44 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dan Garry 2013-12-12 09:36:58 UTC
When using OAuth Hello World, I get "Bad API response: NULL" when I try to make an edit. Other tools, such as Widar, also appear to be broken by this.
Comment 1 Ariel T. Glenn 2013-12-12 14:22:39 UTC
What wiki are you trying to edit?  Also, can you please provide a sample page you are trying to edit?
Comment 2 Brad Jorsch 2013-12-12 14:27:56 UTC
[12-Dec-2013 14:23:23] Fatal error: Call to a member function isSpecial() on a non-object at /usr/local/apache/common-local/php-1.23wmf7/extensions/OAuth/api/MWOAuthAPI.setup.php on line 55
Server: mw1017
Method: POST
URL: http://test.wikipedia.org/w/api.php
Backtrace:
#0 /usr/local/apache/common-local/php-1.23wmf7/extensions/OAuth/api/MWOAuthAPI.setup.php(55): MWOAuthAPISetup::getOAuthAccessToken()
#1 /usr/local/apache/common-local/php-1.23wmf7/extensions/OAuth/api/MWOAuthAPI.setup.php(89): MWOAuthAPISetup::getOAuthAccessToken()
#2 [internal function]: MWOAuthAPISetup::onUserLoadFromSession(Object(User), NULL)
#3 /usr/local/apache/common-local/php-1.23wmf7/includes/Hooks.php(199): call_user_func_array('MWOAuthAPISetup...', Array)
#4 /usr/local/apache/common-local/php-1.23wmf7/includes/GlobalFunctions.php(4031): Hooks::run('UserLoadFromSes...', Array)
#5 /usr/local/apache/common-local/php-1.23wmf7/includes/User.php(935): wfRunHooks('UserLoadFromSes...', Array)
#6 /usr/local/apache/common-local/php-1.23wmf7/includes/User.php(297): User->loadFromSession()
#7 /usr/local/apache/common-local/php-1.23wmf7/includes/User.php(1743): User->load()
#8 /usr/local/apache/common-local/php-1.23wmf7/includes/User.php(2854): User->getId()
#9 /usr/local/apache/common-local/php-1.23wmf7/extensions/CirrusSearch/CirrusSearch.php(232): User->isLoggedIn()
#10 [internal function]: {closure}()
#11 /usr/local/apache/common-local/php-1.23wmf7/includes/Setup.php(591): call_user_func(Object(Closure))
#12 /usr/local/apache/common-local/php-1.23wmf7/includes/WebStart.php(153): require_once('/usr/local/apac...')
#13 /usr/local/apache/common-local/php-1.23wmf7/api.php(44): require('/usr/local/apac...')
#14 /usr/local/apache/common-local/w/api.php(3): require('/usr/local/apac...')
#15 {main}
Comment 3 Dan Garry 2013-12-12 14:35:11 UTC
(In reply to comment #0)
> When using OAuth Hello World, I get "Bad API response: NULL" when I try to
> make
> an edit. Other tools, such as Widar, also appear to be broken by this.

Just to clarify on this, here's the workflow.

1) Go to https://tools.wmflabs.org/oauth-hello-world/
2) Authorise application: click "Authorize this application" and authorise it
3) Make an edit: click "Post to your talk page"

The error is thrown on step 3. It tries to edit test.wikipedia.org and fails.
Comment 4 Gerrit Notification Bot 2013-12-12 15:04:28 UTC
Change 100996 had a related patch set uploaded by Anomie:
Add ApiBeforeMain hook

https://gerrit.wikimedia.org/r/100996
Comment 5 Nik Everett 2013-12-12 15:12:12 UTC
Patch half of fix.  Other half coming.
Comment 6 Gerrit Notification Bot 2013-12-12 15:22:04 UTC
Change 100999 had a related patch set uploaded by Manybubbles:
More BetaFeatures check to hooks called later

https://gerrit.wikimedia.org/r/100999
Comment 7 Nik Everett 2013-12-12 15:47:31 UTC
Note that as presented in this stack trace and as being fixed this bug only effects wikis with Cirrus.  That is a pretty sizable list, at this point, though.
Comment 8 Gerrit Notification Bot 2013-12-12 17:18:51 UTC
Change 100996 merged by jenkins-bot:
Add ApiBeforeMain hook

https://gerrit.wikimedia.org/r/100996
Comment 9 Gerrit Notification Bot 2013-12-12 17:24:06 UTC
Change 100999 merged by jenkins-bot:
Move BetaFeatures check to hooks called later

https://gerrit.wikimedia.org/r/100999
Comment 10 Gerrit Notification Bot 2013-12-12 17:36:03 UTC
Change 101022 had a related patch set uploaded by Chad:
Add ApiBeforeMain hook

https://gerrit.wikimedia.org/r/101022
Comment 11 Gerrit Notification Bot 2013-12-12 17:45:00 UTC
Change 101025 had a related patch set uploaded by Chad:
Add ApiBeforeMain hook

https://gerrit.wikimedia.org/r/101025
Comment 12 Gerrit Notification Bot 2013-12-12 17:52:28 UTC
Change 101031 had a related patch set uploaded by Chad:
Add ApiBeforeMain hook

https://gerrit.wikimedia.org/r/101031
Comment 13 Gerrit Notification Bot 2013-12-12 18:07:43 UTC
Change 101031 merged by jenkins-bot:
Add ApiBeforeMain hook

https://gerrit.wikimedia.org/r/101031
Comment 14 Gerrit Notification Bot 2013-12-12 18:09:21 UTC
Change 101025 merged by jenkins-bot:
Add ApiBeforeMain hook

https://gerrit.wikimedia.org/r/101025
Comment 15 Nik Everett 2013-12-12 18:55:18 UTC
I've verified this working in beta.  Waiting on deployment.
Comment 16 Nik Everett 2013-12-12 20:07:43 UTC
(In reply to comment #3)
> 1) Go to https://tools.wmflabs.org/oauth-hello-world/
> 2) Authorise application: click "Authorize this application" and authorise it
> 3) Make an edit: click "Post to your talk page"
> 
> The error is thrown on step 3. It tries to edit test.wikipedia.org and fails.

Verified working now.
Comment 17 Gerrit Notification Bot 2013-12-12 20:29:13 UTC
Change 101022 abandoned by Chad:
Add ApiBeforeMain hook

Reason:
wmf5 no longer needed.

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links