Solution for replaceQueryParam() for key “scope” is NULL


#1

In continuation of the topic: Can't log in to secure.phabricator.com

I have the following trace:

[Today] [php7:notice] [pid 4945] [client] [2019-02-18 19:06:32] EXCEPTION: (InvalidArgumentException) Value provided to "replaceQueryParam()" for key "scope" is NULL. Use "removeQueryParam()" to remove a query parameter. at [<phutil>/src/parser/PhutilURI.php:336] [Today] [php7:notice] [pid 4945] [client] arcanist(head=master, ref.master=07a208d8fc47), phabricator(head=master, ref.master=adab70240390), phutil(head=master, ref.master=25023f245430) [Today] [php7:notice] [pid 4945] [client] #0 <#2> PhutilURI::replaceQueryParam(string, NULL) called at [<phutil>/src/auth/PhutilOAuthAuthAdapter.php:25] [Today] [php7:notice] [pid 4945] [client] #1 <#2> PhutilOAuthAuthAdapter::getAuthenticateURI() called at [<phabricator>/src/applications/auth/provider/PhabricatorOAuth2AuthProvider.php:39] [Today] [php7:notice] [pid 4945] [client] #2 <#2> PhabricatorOAuth2AuthProvider::renderLoginForm(AphrontRequest, string) called at [<phabricator>/src/applications/auth/provider/PhabricatorAuthProvider.php:154] [Today] [php7:notice] [pid 4945] [client] #3 <#2> PhabricatorAuthProvider::buildLoginForm(PhabricatorAuthStartController) called at [<phabricator>/src/applications/auth/controller/PhabricatorAuthStartController.php:135] [Today] [php7:notice] [pid 4945] [client] #4 <#2> PhabricatorAuthStartController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/AphrontController.php:71] [Today] [php7:notice] [pid 4945] [client] #5 <#2> AphrontController::delegateToController(PhabricatorAuthStartController) called at [<phabricator>/src/applications/base/controller/PhabricatorController.php:197] [Today] [php7:notice] [pid 4945] [client] #6 <#2> PhabricatorController::willBeginExecution() called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:273] [Today] [php7:notice] [pid 4945] [client] #7 phlog(InvalidArgumentException) called at [<phabricator>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41] [Today] [php7:notice] [pid 4945] [client] #8 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, InvalidArgumentException) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:744] [Today] [php7:notice] [pid 4945] [client] #9 AphrontApplicationConfiguration::handleThrowable(InvalidArgumentException) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:298] [Today] [php7:notice] [pid 4945] [client] #10 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:209] [Today] [php7:notice] [pid 4945] [client] #11 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:35]

What is the solution for the mentioned above?
Thanks in advance!


#2

PhutilURI::replaceQueryParam(string, NULL) called at [/src/auth/PhutilOAuthAuthAdapter.php:25]
phutil(head=master, ref.master=25023f245430)

Line 25 of PhutilOAuthAuthAdapter.php does not contain a call to replaceQueryParam() at commit 25023f245430. Usually, this means you forgot to restart your webserver after updating:

https://secure.phabricator.com/book/phabricator/article/restarting/


#3

Thanks Evan! The reset did not help to see the changes. I double checked conformity of the revision I have, by some reason I’ve had no changes applied to PhutilOAuthAuthAdapter.php from commit 25023f245430.
The problem solved, I replaced this file with taken from github.


closed #4