• Status Closed
  • Percent Complete
  • Task Type Information
  • Category Backend/Core
  • Assigned To No-one
  • Operating System Linux
  • Severity High
  • Priority Very Low
  • Reported Version 1.0-rc
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Flyspray
Opened by thess - 02.06.2016
Last edited by peterdd - 14.07.2016

FS#2131 - Using github login fails - white page displayed on callback

Original message displayed:

“Completely unexpected exception: Unknown grant “League\OAuth2\Client\Grant\Authorizationcode”

Attempting to fix problem by renaming file (case-sensitive) in vendor directory, gets me to the github login but the redirected callback yields a white page with nothing displayed. No unusual messages appear in the server log.

Closed by  peterdd
14.07.2016 00:39
Reason for closing:  Not a bug
Additional comments about closing:  

added a check for cURL library at setup page for oauth2 using

Project Manager

Which PHP version? Which flyspray install method do you used?

thess commented on 03.06.2016 21:23

Ubuntu 14.04, PHP 5.5.9, Flyspray installed from github

Debian 7, PHP 5.4.45, Flyspray installed from flyspray-1.0-rc1_php54.tgz

thess commented on 04.06.2016 14:11

Update - Only the Ubuntu 14.04, PHP 5.5 version fails. I must have tested the Debian 7/PHP 5.4 setup incorrectly.

Project Manager

Could you compare which versions of thephpleague/oauth2-client
composer installed on php5.4 and php5.5 machines?

On your debian an older version of oauth2-client should be installed, because current releases of require >= php5.5.

Where to look:

  1. composer.lock
  2. files in vendor/*
thess commented on 08.06.2016 16:12

Well, the 2 versions are very different. Since one was pre-built in your distribution and the other installed from source, the composer.lock file does not exist on the debian system. Here's the composer.lock file from the Ubuntu system and the composer.json (oauth2-client) files from each. Let me know if there is something else you want to see.

The Ubuntu version is only a test/staging system and is not used for production. Github auth is not needed here.

Project Manager

I wonder why ubuntu-5.5-composer.json contains entries for the version 0.3 oauth2-client version. When composer is executed on the php5.5 machine, it should choose a stable oauth2-client 1.* release version for php5.5 . Did you run the right php executable (check with php -v or see available php versions on command line with php[tab][tab] autocompletion).

So there is definitly the wrong oauth2-client version installed on php5.5.

What happens if you delete the vendor/ directory and composer.lock and rerun the composer install stuff? Does composer.lock still contains the 0.3 entries?

Btw: The 0.3 oauth2-client version is known to be buggy (wrong case of file as you mentioned too), but is the last version of oauth2-client that composer chooses on php5.3 .

I even asked them to fix it for php < php5.5 , but they refused. :-(
I forked it as But discontinued the fork due no urgent need and think the real oauth2-client project should handle the backporting too. (ideally)

thess commented on 09.06.2016 00:40

OK - I figured it out. I was playing around with composer to see what it was actually doing and found out that it couldn't satisfy the curl dependency in the latest oauth2-client. Instead, it fell back to version 0.3 as stable (from its point of view anyway).

Installing missing php5-curl package on Ubuntu fixed it.

Problem solved - thanks for your help and guidance.


Available keyboard shortcuts


Task Details

Task Editing