Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot activate 2fa #14782

Closed
fallingrock opened this issue Dec 13, 2018 · 6 comments
Closed

Cannot activate 2fa #14782

fallingrock opened this issue Dec 13, 2018 · 6 comments
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Milestone

Comments

@fallingrock
Copy link

Describe the bug

Trying to activate two factor authentication, but encountering this error:

[Thu Dec 13 21:12:23.455404 2018] [php7:error] [pid 18885] [client x.x.x.x:30233] PHP Fatal error: Uncaught Error: Call to undefined method PragmaRX\Google2FA\Google2FA::getQRCodeInline() in /usr/local/www/web/dir/html/admin/libraries/classes/Plugins/TwoFactor/Application.php:96\nStack trace:\n#0 /usr/local/www/web/dir//html/admin/libraries/classes/TwoFactor.php(219): PhpMyAdmin\Plugins\TwoFactor\Application->setup()\n#1 /usr/local/www/web/dir//html/admin/prefs_twofactor.php(34): PhpMyAdmin\TwoFactor->setup()\n#2 {main}\n thrown in /usr/local/www/web/dir//html/admin/libraries/classes/Plugins/TwoFactor/Application.php on line 96

Running on amazon linux with php 7.1 from amazon repo.

Package php71-gd-7.1.23-1.34.amzn1.x86_64 installed.

To Reproduce

Steps to reproduce the behavior:

  1. Install brand new phpmyadmin 4.8.4
  2. Click settings -> Two-Factor Authentication
  3. Select 'Authentication Application (2FA)'
  4. Click "Configure two factor authentication"
  5. Error message: Error in processing request
    Error code: 500
    Error text: Internal Server Error (rejected)
    It seems that the connection to server has been lost. Please check your network connectivity and server status.

Error message shown above is in error log.

Expected behavior

Two factor authentication setup.

Server configuration

  • Operating system: Amazon Linux 4.14.77-70.82.amzn1.x86_64
  • Web server: Apache/2.4.34 (Amazon)
  • Database version: 5.7.24 - MySQL Community Server (GPL)
  • PHP version: 7.1.23
  • phpMyAdmin version: 4.8.4

Client configuration

  • Browser: Firefox 64
  • Operating system: Win 7
@ibennetch
Copy link
Member

I can confirm this with the official distribution of 4.8.4.

From RELEASE_4_8_4, I get the error if I use composer install but not if I use composer upgrade.

The broken distribution uses pragmarx/google2fa v4.0.0, it works with v3.0.3.

I believe this is introduced during the release process in https://github.com/phpmyadmin/phpmyadmin/blob/master/scripts/create-release.sh#L239-L241 where there is no version constraint on these packages.

@ibennetch ibennetch added this to the 4.8.4.1 milestone Dec 14, 2018
ibennetch added a commit to ibennetch/phpmyadmin that referenced this issue Dec 15, 2018
…he release.

This parses the required dependency versions from composer.json and installs them manually as required packages.

Fixes phpmyadmin#14782

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
@williamdes williamdes added the Bug A problem or regression with an existing feature label Dec 15, 2018
@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Dec 18, 2018
ibennetch added a commit to ibennetch/phpmyadmin that referenced this issue Dec 20, 2018
…he release.

This parses the required dependency versions from composer.json and installs them manually as required packages.

Fixes phpmyadmin#14782

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
ibennetch added a commit to ibennetch/phpmyadmin that referenced this issue Dec 20, 2018
…he release.

This parses the required dependency versions from composer.json and installs them manually as required packages.

Fixes phpmyadmin#14782

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
ibennetch added a commit to ibennetch/phpmyadmin that referenced this issue Dec 20, 2018
…he release.

This parses the required dependency versions from composer.json and installs them manually as required packages.

Fixes phpmyadmin#14782

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
@ibennetch
Copy link
Member

The proper fix for this is to make a change to our build script, which has been done in master. The result will be that the next release will fix this issue. It's a little confusing because the problem occurs in the 4.8.x branch (QA_4_8), but is really caused by the build script in master.

Anyway, it will be fixed with the next release, you can test it using the daily development snapshots at phpmyadmin.net (starting about 20 hours after I post this, because today's build has already run).

ibennetch added a commit that referenced this issue Jan 14, 2019
…en configuring two factor authentication (2fa)

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
@ibennetch ibennetch modified the milestones: 4.8.4.1, 4.8.5 Jan 26, 2019
@fallingrock
Copy link
Author

FWIW: There may still be a build issue... I tried installing the English only zip and could not enable 2FA.

When I installed the all-languages zip, I was able to enable 2FA.

@ibennetch
Copy link
Member

@fallingrock perhaps you're seeing the same effects as #15017. Which phpMyAdmin version did you download that didn't work, 4.8.5?

@gutitrombotto
Copy link

Hi!
I have resolve the problem in my case.
I was using:

  • Phpmyadmin 4.9.0.1
  • pragmarx/google2fa:5.0.0
  • pragmarx/google2fa-qrcode

When i tried to enable TwoFactor Authentication, i have the following error:

Fatal error: Uncaught Error: Call to undefined method PragmaRX\Google2FA\Google2FA::getQRCodeInline() in /home/vagrant/Code/lastphpmyadmin/libraries/classes/Plugins/TwoFactor/Application.php on line 99

To solve this problem, I uninstall the package pragmarx/google2fa-qrcode and worked fine!

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
None yet
Development

No branches or pull requests

4 participants