Page MenuHomePhabricator

BadMethodCallException from line 847 of SessionManager.php: Sessions are disabled for this entry point
Closed, InvalidPublic

Description

Setup

  • MediaWiki 1.30.0-rc.0 (6354fbf) 00:36, 22 November 2017
  • PHP 5.6.30-0+deb8u1 (apache2handler)
  • MariaDB 10.0.33-MariaDB-1~jessie
  • MobileFrontend 2.0.0 (5ecc673) 21:59, 19 September 2017
  • Minerva – (7ee8663) 21:16, 19 September 2017

Issue
After upgrading to MW 1.30.0-rc.0 and installing MinervaNeue with

## MinvervaNeue
wfLoadSkin( 'MinervaNeue' );

## MobileFrontend
wfLoadExtension( 'MobileFrontend' );
$wgMFDefaultSkinClass = 'SkinMinerva';
$wgMobileFrontendLogo = "$wgScriptPath/SMWSandBoxLogo.png";
$wgMFAutodetectMobileView = true;
$wgMFAllowNonJavaScriptEditing = true;

I get the following error:

2017-11-29 20:12:46 phalaris 0210020150926-02100_: [bd572b1d74cb0a4362b014e5] /w/load.php?debug=false&lang=en&modules=ext.scite.tooltip%7Cext.summary.cards%7Cext.summary.cards.tooltip%7Cjquery.accessKeyLabel%2CbyteLength%2Cclient%2Ccookie%2Cthrottle-debounce%7Cmediawiki.RegExp%2CTitle%2Capi%2Ccldr%2Cexperiments%2CjqueryMsg%2Clanguage%2Cnotify%2Crouter%2Cstorage%2Ctemplate%2Cuser%2Cutil%2Cviewport%7Cmediawiki.api.parse%2Cuser%7Cmediawiki.language.data%2Cinit%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.startup%7Cmediawiki.template.hogan%7Cmediawiki.ui.anchor%7Cmobile.ajax.styles%7Cmobile.betaoptin%2Cissues%2Creferences%2Csearch%2Csite%2Cstartup%2Ctoggle%2Cwatchstar%7Cmobile.editor.api%7Cmobile.issues.images%7Cmobile.loggingSchemas.edit%2CmobileWebMainMenuClickTracking%2CmobileWebSearch%7Cmobile.overlay.images%7Cmobile.pagelist.scripts%2Cstyles%7Cmobile.pagesummary.styles%7Cmobile.references.gateway%2Cimages%7Cmobile.search.api%2Cimages%2Cutil%7Cmobile.startup.images%7Conoi.blobstore%2ClocalForage%2Cmd5%2Cqtip%2Cutil%7Conoi.qtip.extended%7Coojs%2Coojs-router%7Cskins.minerva.editor%2CmainMenu%2Cnotifications%2Cscripts%2Ctalk%2Ctoggling%2Cwatchstar%7Cskins.minerva.icons.images.scripts%2Cvariants%7Cskins.minerva.mainMenu.icons%2Cstyles%7Cskins.minerva.notifications.badge%7Cskins.minerva.scripts.top%7Cuser.defaults&skin=minerva&version=1i5rhsp   BadMethodCallException from line 847 of /../w/includes/session/SessionManager.php: Sessions are disabled for this entry point
#0 /../w/includes/session/SessionManager.php(195): MediaWiki\Session\SessionManager->getSessionFromInfo(MediaWiki\Session\SessionInfo, WebRequest)
#1 /../w/includes/WebRequest.php(735): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
#2 /../w/includes/user/User.php(1231): WebRequest->getSession()
#3 /../w/includes/user/User.php(408): User->loadFromSession()
#4 /../w/includes/user/User.php(5266): User->load()
#5 /../w/includes/user/User.php(2884): User->loadOptions()
#6 /../w/includes/context/RequestContext.php(364): User->getOption(string)
#7 /../w/includes/StubObject.php(205): RequestContext->getLanguage()
#8 /../w/includes/StubObject.php(167): StubUserLang->_newObject()
#9 /../w/includes/StubObject.php(110): StubObject->_unstub(string, integer)
#10 /../w/includes/StubObject.php(137): StubObject->_call(string, array)
#11 /../w/extensions/Arrays/Arrays.php(108): StubObject->__call(string, array)
#12 /../w/extensions/Arrays/Arrays.php(108): StubUserLang->getMessageFromDB(string)
#13 [internal function]: ExtArrays::init(Parser)
#14 /../w/includes/Hooks.php(177): call_user_func_array(string, array)
#15 /../w/includes/Hooks.php(205): Hooks::callHook(string, string, array, NULL)
#16 /../w/includes/parser/Parser.php(337): Hooks::run(string, array)
#17 [internal function]: Parser->firstCallInit()
#18 /../w/includes/StubObject.php(111): call_user_func_array(array, array)
#19 /../w/includes/StubObject.php(137): StubObject->_call(string, array)
#20 /../w/includes/cache/MessageCache.php(1127): StubObject->__call(string, array)
#21 /../w/includes/cache/MessageCache.php(1127): StubObject->firstCallInit()
#22 /../w/includes/cache/MessageCache.php(1158): MessageCache->getParser()
#23 /../w/includes/Message.php(1239): MessageCache->parse(string, Title, boolean, boolean, LanguageEn)
#24 /../w/includes/Message.php(869): Message->parseText(string)
#25 /../w/includes/Message.php(922): Message->toString(string)
#26 /../w/extensions/MobileFrontend/includes/modules/MFResourceLoaderParsedMessageModule.php(48): Message->parse()
#27 /../w/extensions/MobileFrontend/includes/modules/MFResourceLoaderParsedMessageModule.php(79): MFResourceLoaderParsedMessageModule->addParsedMessages(ResourceLoaderContext)
#28 /../w/includes/resourceloader/ResourceLoaderModule.php(719): MFResourceLoaderParsedMessageModule->getScript(ResourceLoaderContext)
#29 /../w/includes/resourceloader/ResourceLoaderModule.php(687): ResourceLoaderModule->buildContent(ResourceLoaderContext)
#30 /../w/includes/resourceloader/ResourceLoader.php(1069): ResourceLoaderModule->getModuleContent(ResourceLoaderContext)
#31 /../w/includes/resourceloader/ResourceLoader.php(783): ResourceLoader->makeModuleResponse(ResourceLoaderContext, array, array)
#32 /../w/load.php(53): ResourceLoader->respond(ResourceLoaderContext)
#33 {main}

Perhaps this is an issue for the Arrays extension since this one pops up in the stack trace however I am not sure. Moreover I am adding in MediaWiki since session management seems to be involved too. The tags may however be adjusted according actual requirements.

Event Timeline

Kghbln created this task.Nov 29 2017, 8:29 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 29 2017, 8:29 PM
Jdlrobson added a subscriber: Jdlrobson.
  1. Is MobileFrontend being loaded before Minerva?
  2. If it is, this is likely to be an issue with one of the modules being loaded.

MFResourceLoaderParsedMessageModule will parse any messages in the form:

'message-key' => 'parse',

There's likely a problem with a specific module that's trying to access session information (forbidden inside RL) so I'd suggest adjusting the url until we have a minimum test case and can identify the problematic module:
e.g. given the url
/w/load.php?debug=false&lang=en&modules=ext.scite.tooltip%7Cext.summary.cards%7Cext.summary.cards.tooltip%7Cjquery.accessKeyLabel%2CbyteLength%2Cclient%2Ccookie%2Cthrottle-debounce%7Cmediawiki.RegExp%2CTitle%2Capi%2Ccldr%2Cexperiments%2CjqueryMsg%2Clanguage%2Cnotify%2Crouter%2Cstorage%2Ctemplate%2Cuser%2Cutil%2Cviewport%7Cmediawiki.api.parse%2Cuser%7Cmediawiki.language.data%2Cinit%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.startup%7Cmediawiki.template.hogan%7Cmediawiki.ui.anchor%7Cmobile.ajax.styles%7Cmobile.betaoptin%2Cissues%2Creferences%2Csearch%2Csite%2Cstartup%2Ctoggle%2Cwatchstar%7Cmobile.editor.api%7Cmobile.issues.images%7Cmobile.loggingSchemas.edit%2CmobileWebMainMenuClickTracking%2CmobileWebSearch%7Cmobile.overlay.images%7Cmobile.pagelist.scripts%2Cstyles%7Cmobile.pagesummary.styles%7Cmobile.references.gateway%2Cimages%7Cmobile.search.api%2Cimages%2Cutil%7Cmobile.startup.images%7Conoi.blobstore%2ClocalForage%2Cmd5%2Cqtip%2Cutil%7Conoi.qtip.extended%7Coojs%2Coojs-router%7Cskins.minerva.editor%2CmainMenu%2Cnotifications%2Cscripts%2Ctalk%2Ctoggling%2Cwatchstar%7Cskins.minerva.icons.images.scripts%2Cvariants%7Cskins.minerva.mainMenu.icons%2Cstyles%7Cskins.minerva.notifications.badge%7Cskins.minerva.scripts.top%7Cuser.defaults&skin=minerva&version=1i5rhsp

Reduce it to something like this:
/w/load.php?debug=false&lang=en&modules=ext.scite.tooltip which throws the same error.

Kghbln added a comment.EditedNov 29 2017, 8:45 PM
  1. Is MobileFrontend being loaded before Minerva?

No, "LocalSettings.php" holds the configuration in the order stated above.

https://sandbox.semantic-mediawiki.org/w/load.php?debug=false&lang=en&modules=ext.scite.tooltip

Here I am getting:

mw.loader.implement("ext.scite.tooltip@08pvo20",function($,jQuery,require,module){(function($,mw,onoi){'use strict';$(function($){var configuration=mw.config.get('ext.scite.config');var blobstore=new onoi.blobstore('scite'+':'+mw.config.get('wgCookiePrefix')+':'+mw.config.get('wgUserLanguage'));var util=new onoi.util();var doApiRequestFor=function(reference,QTip){var api=new mw.Api();api.get({action:'ask',format:'json',query:'[[Citation key::'+reference+']]|?Citation text|limit=1'}).done(function(content){var citationText='';$.each(content.query.results,function(subjectName,subject){if($.inArray('printouts',subject)){$.each(subject.printouts,function(property,values){citationText=$.type(values)==="array"?values.toString():values[0];});};});if(citationText===''){var msgKey=content.hasOwnProperty('query-continue-offset')?'sci-tooltip-citation-lookup-failure-multiple':'sci-tooltip-citation-lookup-failure';QTip.set('content.text',mw.msg(msgKey,reference));return null;};api.parse(
citationText).done(function(html){html=$(html).filter("p").html();blobstore.set(reference,html,configuration.tooltipRequestCacheTTL)
QTip.set('content.text',html);});}).fail(function(xhr,status,error){QTip.set('content.text',status+': '+error);});};var tooltip=function(){var reference=$(this).data('reference');$(this).find('a').qtip({content:{title:reference,text:function(event,QTip){blobstore.get(reference,function(value){if(configuration.tooltipRequestCacheTTL==0||value===null){doApiRequestFor(reference,QTip);}else{QTip.set('content.title','<span>'+reference+'</span><div class="scite-tooltip-cache-indicator scite-tooltip-cache-browser"></div>');QTip.set('content.text',value);}});return util.getLoadingImg('scite-tooltip','dots');}},position:{viewport:$(window),my:'bottom left',at:'top middle'},hide:{fixed:!0,delay:300},style:{classes:$(this).attr('class')+' qtip-default qtip-light qtip-shadow',def:!1}});};$.map(configuration.showTooltipForCitationReference,function(selector,i){switch(selector){case 2:selector='.scite-citeref-key';break;case 1:default:selector='.scite-citeref-number';}$(selector).each(tooltip);
});});}(jQuery,mediaWiki,onoi));},{},{"sci-tooltip-citation-lookup-failure":"Failed to retrieve an appropriate citation from the back-end for \"$1\".","sci-tooltip-citation-lookup-failure-multiple":"Failed to retrieve a citation text for \"$1\" which has multiple matches."});

and with `https://sandbox.semantic-mediawiki.org/w/load.php?debug=true&lang=en&modules=ext.scite.tooltip I am getting

mw.loader.implement( "ext.scite.tooltip@08pvo20", [
    "/w/extensions/SemanticCite/res/scite.tooltip.js?94a1f"
], {}, {"sci-tooltip-citation-lookup-failure":"Failed to retrieve an appropriate citation from the back-end for \"$1\".","sci-tooltip-citation-lookup-failure-multiple":"Failed to retrieve a citation text for \"$1\" which has multiple matches."} );

However in both cases an exception like the one in the original issue report is being recorded. I am not sure if the "Failed to retrieve ..." means that Semantic Cite is causing the issue.

I was not too clear about my suggested debugging. Sorry about that!
What I meant to say is could you manipulate your original URL by modifying the modules query string parameter, by removing a module one at a time, until you find the smallest possible URL that causes the problem.
Luckily, now I know where your website is hosted I can debug that now. I see it is:
https://sandbox.semantic-mediawiki.org/w/load.php?debug=false&lang=en&modules=skins.minerva.editor&skin=minerva

No, "LocalSettings.php" holds the configuration in the order stated above.

Can you change the order? Order is important as MobileFrontend is a dependency of Minerva.. so I think that should address this. If not, I'm not too sure what's going on here...

Ahh, it's also possible you are using incompatible MobileFrontend/Minerva versions.
The latest version of Minerva uses MinervaResourceLoaderParsedMessageModule
I would recommend upgrading the version of Minerva you use.

Thanks a lot for your suggestions.

I was using REL1_30 master of MinervaNeue and switched to master of MinervaNeue. Moreover I now include MinervaNeue after MobileFrontend. However this does not help. I do not think that MinvervaNeue should be loaded after Mobile Frontend since MinervaNeue many be used independently too.

I will revert back and go though the modules tomorrow.

I have troubles to determine the modules. Is it just ext.scite.tooltip, ext.summary.cards, ext.summary.cards.tooltip? If yes they all work on their own without issues. Here are however another 10 lines of something I cannot identify following this. Are these modules too?

Kghbln added a comment.EditedDec 3 2017, 12:23 PM

<s>I have not worked my way through all modules,</s> however these are definitively causing issues:

Edit: I now went trough all of them. These three mentioned above cause the errors.

The issue is most definitely in MFResourceLoaderParsedMessageModule although I'm not sure why.
It's hard for me to help debug this as MFResourceLoaderParsedMessageModule doesn't exist any more :/

I'd recommend using more recent version of MinervaNeue and MobileFrontend and see if the issue still persists.
Minerva depends on MobileFrontend. It currently does not work independently.

Kghbln added a comment.Dec 4 2017, 7:28 PM

I'd recommend using more recent version of MinervaNeue and MobileFrontend and see if the issue still persists.

I am using REL1_30 for both MobileFrontend and MinervaNeue on MW 1.30-rc.0 so everybody upgrading to MW 1.30 will run into this issue. So I should switch to master?

Minerva depends on MobileFrontend. It currently does not work independently.

In this case the skin's docu should be fluffed. I guess it says somewhere that it can be run independently. However this is a minor thing.

Kghbln added a comment.Dec 4 2017, 7:36 PM

In this case the skin's docu should be fluffed. I guess it says somewhere that it can be run independently. However this is a minor thing.

No, the docu is ok. Do not know how I came to believe this. Never mind please.

Kghbln added a comment.EditedDec 4 2017, 7:43 PM

So I should switch to master?

Switching to master for MobileFrontend and MinervaNeue gives:

Fatal error: Uncaught exception 'Exception' with message 'MobileFrontend is not compatible with the current MediaWiki core (version 1.30.0-rc.0), it requires: >= 1.31.0.' in /../w/includes/registration/ExtensionRegistry.php:261

Stack trace:

#0 /../w/includes/registration/ExtensionRegistry.php(148): ExtensionRegistry->readFromQueue(Array)
#1 /../w/includes/Setup.php(40): ExtensionRegistry->loadFromQueue()
#2 /../w/includes/WebStart.php(114): require_once('/var/www/htdocs...')
#3 /../w/load.php(32): require('/var/www/htdocs...')
#4 {main} thrown in /../w/includes/registration/ExtensionRegistry.php on line 261

Going back to REL1_30 for MobileFrontend still gives the error originally reported, e.g.

[6a7d67ccf644dcc90cfe3b4f] /w/load.php?debug=false&lang=en&modules=skins.minerva.editor&skin=minerva   BadMethodCallException from line 847 of /../w/includes/session/SessionManager.php: Sessions are disabled for this entry point
Backtrace:
#0 /../w/includes/session/SessionManager.php(195): MediaWiki\Session\SessionManager->getSessionFromInfo(MediaWiki\Session\SessionInfo, WebRequest)
#1 /../w/includes/WebRequest.php(735): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
#2 /../w/includes/user/User.php(1231): WebRequest->getSession()
#3 /../w/includes/user/User.php(408): User->loadFromSession()
#4 /../w/includes/user/User.php(5266): User->load()
#5 /../w/includes/user/User.php(2884): User->loadOptions()
#6 /../w/includes/context/RequestContext.php(364): User->getOption(string)
#7 /../w/includes/StubObject.php(205): RequestContext->getLanguage()
#8 /../w/includes/StubObject.php(167): StubUserLang->_newObject()
#9 /../w/includes/StubObject.php(110): StubObject->_unstub(string, integer)
#10 /../w/includes/StubObject.php(137): StubObject->_call(string, array)
#11 /../w/extensions/Arrays/Arrays.php(108): StubObject->__call(string, array)
#12 /../w/extensions/Arrays/Arrays.php(108): StubUserLang->getMessageFromDB(string)
#13 [internal function]: ExtArrays::init(Parser)
#14 /../w/includes/Hooks.php(177): call_user_func_array(string, array)
#15 /../w/includes/Hooks.php(205): Hooks::callHook(string, string, array, NULL)
#16 /../w/includes/parser/Parser.php(337): Hooks::run(string, array)
#17 [internal function]: Parser->firstCallInit()
#18 /../w/includes/StubObject.php(111): call_user_func_array(array, array)
#19 /../w/includes/StubObject.php(137): StubObject->_call(string, array)
#20 /../w/includes/cache/MessageCache.php(1127): StubObject->__call(string, array)
#21 /../w/includes/cache/MessageCache.php(1127): StubObject->firstCallInit()
#22 /../w/includes/cache/MessageCache.php(1158): MessageCache->getParser()
#23 /../w/includes/Message.php(1239): MessageCache->parse(string, Title, boolean, boolean, LanguageEn)
#24 /../w/includes/Message.php(869): Message->parseText(string)
#25 /../w/includes/Message.php(922): Message->toString(string)
#26 /../w/skins/MinervaNeue/includes/MinervaResourceLoaderParsedMessageModule.php(48): Message->parse()
#27 /../w/skins/MinervaNeue/includes/MinervaResourceLoaderParsedMessageModule.php(79): MinervaResourceLoaderParsedMessageModule->addParsedMessages(ResourceLoaderContext)
#28 /../w/includes/resourceloader/ResourceLoaderModule.php(719): MinervaResourceLoaderParsedMessageModule->getScript(ResourceLoaderContext)
#29 /../w/includes/resourceloader/ResourceLoaderModule.php(687): ResourceLoaderModule->buildContent(ResourceLoaderContext)
#30 /../w/includes/resourceloader/ResourceLoader.php(1069): ResourceLoaderModule->getModuleContent(ResourceLoaderContext)
#31 /../w/includes/resourceloader/ResourceLoader.php(783): ResourceLoader->makeModuleResponse(ResourceLoaderContext, array, array)
#32 /../w/load.php(53): ResourceLoader->respond(ResourceLoaderContext)
#33 {main}

MinervaNeue is on master.

MinervaResourceLoaderParsedMessageModule is being used now so that's something.

I'm just not sure why this would happen and I've not seen this bug before. My guess is there is an incompatibility between an extension that's been installed and Minerva. What is happening is Minerva is trying to translate a message, and something is refusing to let that translation happen.

I see Translate extension and Babel is installed. It might be a good idea to try temporarily disabling each of these and see whether the error remains. Once you've identified if there is a compatibility problem, maybe we can help some more.

Kghbln added a comment.EditedDec 4 2017, 8:38 PM

MinervaResourceLoaderParsedMessageModule is being used now so that's something.

This appears however to be unrelated to the issue. To verify this I now also switched back to REL1_30 for both MobileFrontend and MinervaNeue and after commenting out the two transgressing extensions REL1_30 works too.

It might be a good idea to try temporarily disabling each of these

This was pointing me to something I have not tried before but helped identifying the two extensions giving pain. Thanks a lot!!! They are:

  1. Arrays
  2. NumerAlpha

After commenting out both of them the issue does no longer occur. So I believe these two have to be fixed somehow for MW 1.30+. Both are poorly maintained but are pretty essential - a combination far from being ideal. :(

So I guess I need to open one issue each for the two extensions mentioned. Do you happen to know how exactly I should describe the issue? How do these extensions prevent message translation?

I don't think there is a phabricator for Arrays and NumerAlpha but since both using parsing functions I figure they missed some kind of update :/ @Aklapper any ideas of where to redirect this problem?

It looks like message translation is not the problem here, but parsing inside RL. Without understanding the extensions will, it might be that they purposely prevent it.

Looks like https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1867 might be related..?

Kghbln closed this task as Invalid.Dec 4 2017, 9:36 PM

I don't think there is a phabricator for Arrays and NumerAlpha but since both using parsing functions I figure they missed some kind of update :/ @Aklapper any ideas of where to redirect this problem?

Reporting this is not the issue since we have MediaWiki-extensions-unknown-general or what's it called.

It looks like message translation is not the problem here, but parsing inside RL. Without understanding the extensions will, it might be that they purposely prevent it.

Well, this at least helps not to think into the wrong direction.

Looks like https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1867 might be related..?

Possibly maybe. So changes of 219a45025fed271e2ffa3aba0ade3c3f29eec7ec may offer a hint on what and how to fix.

Anyways, closing this one as "Invalid" and thanks a bunch on assisting to track this down.

Let us know if you work it out. I'm guessing this will show up in search results so it will be good for others who hit this issue to know how to resolve it! I hope https://github.com/SemanticMediaWiki/SemanticMediaWiki/commit/219a45025fed271e2ffa3aba0ade3c3f29eec7ec helps!