
Appearing after modifying _vendor\magento\module-customer\Controller\Account\LoginPost.php_ to make it show more details by adding this code:
$message = $e->getMessage();
$this->messageManager->addError($message);
before
$this->messageManager->addErrorMessage(
__('An unspecified error occurred. Please contact us for assistance.')
);
I tried clearing the browser cache and cookies, but it did not helped.
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
Hi @Eddcapone. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance - upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
I noticed that the array $hasVersionMap in the file vendor\magento\framework\Encryption\Encryptor.php is missing an entry which causes the bug.
So I changed it from
/**
* @var array map of hash versions
*/
private $hashVersionMap = [
self::HASH_VERSION_MD5 => 'md5',
self::HASH_VERSION_SHA256 => 'sha256'
];
to
/**
* @var array map of hash versions
*/
private $hashVersionMap = [
self::HASH_VERSION_MD5 => 'md5',
self::HASH_VERSION_SHA256 => 'sha256',
self::HASH_VERSION_ARGON2ID13 => 'argon2id13'
];
But now I get This is not implemented, as it is not possible to implement Argon2i with acceptable performance in pure-PHP
I noticed that the problem disapears after changing back to PHP 7.3.21 so it must have something to do with missing support for PHP 7.4
Undefined offset: 2 in .../vendor/magento/framework/Encryption/Encryptor.php on line 591
May related with https://github.com/magento/magento2/issues/23511 but in different case php 7.4
@hostep can you give some suggestion
@mrtuvn: no idea, we are holding off with upgrading to Magento 2.4.0 / PHP 7.4 until Magento becomes a bit more stable. We'll probably start using it when 2.4.1 or 2.4.2 is out, it's too unstable now to start using it in my opinion.
If I run into this within some months, I can take a look, but it sounds like Eddcapone is already debugging it a bit, so maybe he'll find the root cause.
I gave up and just changed to PHP 7.3.21 again. I am also waiting until the core team adds full PHP 7.4 support. Maybe my version (7.4.9) is not supported yet.
@Eddcapone could you provide output of the following command?
php -r "var_dump(PHP_VERSION, extension_loaded('sodium'), defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13'));"
I have following output and seems like everything works fine:
string(6) "7.3.21"
bool(true)
bool(true)
string(5) "7.4.9"
bool(true)
bool(true)
I get:
string(5) "7.4.9"
bool(false)
bool(false)
I just changed back to PHP 7.4.9 in cpanel (rackspeed server) but now php -m | grep sodium gives no output anymore. Looks like rackspeed removed the module... As I tested it was in my modules. I will contact the rackspeed admins and report back if I tested it with sodium enabled.
The admins just installed sodium, now I get:
string(5) "7.4.9"
bool(true)
bool(true)
But the login still fails with
Notice: Undefined offset: 2 in /home/x/y/vendor/magento/framework/Encryption/Encryptor.php on line 591
An unspecified error occurred. Please contact us for assistance.

So I switched back to PHP 7.3 again.
@sidolov seems like this issue should have priority p1, could you check it?
@ihor-sviziev it looks like an environment configuration issue to me
@sidolov maybe, but definitely we need to understand why it happened and what to do in such cases. As for me it’s not clear how it could happen and why it doesn’t appear on 7.3
@Eddcapone i believe composer install isn’t failing on that environment?
@ihor-sviziev you know, a few months ago I had exactly the same issue after migration to PHP 7.4. It's a shame that I don't remember what exactly helped me but it was definitely an env config issue related to sodium extension.
@ihor-sviziev , I get Nothing to install or update if I execute composer install in this project.
@sidolov I can share my config with your if you like, where is it located? How can I give you the necessary informations?
The error in line 591 makes perfect sense to me. Magento tries to access an undefined offset, because $hashVersionMap has only two entries and it tries to access the third one. But why does it not trigger the same error with PHP 7.3 then?
Are you using developer magento mode ?
On Mon, 14 Sep 2020 at 14:17 Eddcapone notifications@github.com wrote:
>
>
@ihor-sviziev https://github.com/ihor-sviziev , I get Nothing to
install or update if I execute composer install in this project.@sidolov https://github.com/sidolov I can share my config with your if
you like, where is it located? How can I give you the necessary
informations?The error in line 591 makes perfect sense to me. Magento tries to access
an undefined offset, because $hashVersionMap has only two entries and it
tries to access the third one. But why does it not trigger the same error
with PHP 7.3 then?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/29865#issuecomment-691987776,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOJOUO4HIXUYJO22QG2Y53SFX3VNANCNFSM4QS5EUEA
.
Yes I am in developer mode
Current application mode: developer. (Note: Environment variables may override this value.)
@Eddcapone I believe if you'll switch to production mode - it will work for you, also this mode is recommended for production env. Hope this workaround will work for you. Will try to check this issue myself when will have a time
@ihor-sviziev Thats no option because it is a developer environment and I would need to deploy static files every time.
But I stay at PHP 7.3 until it is fixed.
@Eddcapone one more workaround - you could add following param to your env.php, and it will generate static files automatically, similar to developer mode :)
return array(
...
'static_content_on_demand_in_production' => 1,
...
);
More info here: https://devdocs.magento.com/cloud/env/variables-global.html#scd_on_demand
@ihor-sviziev I just tested it in production mode, and it works.
But I have to switch back, otherwise js/css is getting compressed and minified... But Im sure it gets solved in the future.
@ihor-sviziev I changed back to developer and the error is gone here too now :)
@Eddcapone if we don't really have exact steps to reproduce - can we close this issue?
Yes, the solution/workaround is to switch to production and then to developer (or to stay on production)
This makes no sense, there should be no difference in hashing algorithm behavior between developer and production mode.
I believe if you'll switch to production mode - it will work for you
@ihor-sviziev: out of curiosity: on what is this statement based?
@hostep in developer mode all notices are treated as exception, while in production doesn’t. Interesting thing that we still don’t have clear instruction how to reproduce this issue on clean magento installation, maybe some extension caused this issue.
If you have any - let us know
Ok thanks for the info Ihor!
@Eddcapone: based on your previous comment, if i have to guess, the sysadmins installed the sodium php extension but probably forgot to restart php-fpm (or your webserver), hence why php-cli reported it was installed but when using php in the webserver context it still didn't see it.
A better way to verify if it was installed, is to create a dummy php file with <?php phpinfo(); as contents and requesting it via the webserver. Then see if sodium is being reported as installed (and make sure libsodium is at least version 1.0.13).
Should show you something like this:

Thats what I did from the start, as you can see in my original question I wrote:
libsodium is installed with version 1.0.18
I checked that by executing php -i | grep libsodium
Yes, but that's using php-cli, not php invoked by the webserver, which can give you different results 🙂
@hostep Oh, I see. Thx! 👍
Most helpful comment
@mrtuvn: no idea, we are holding off with upgrading to Magento 2.4.0 / PHP 7.4 until Magento becomes a bit more stable. We'll probably start using it when 2.4.1 or 2.4.2 is out, it's too unstable now to start using it in my opinion.
If I run into this within some months, I can take a look, but it sounds like Eddcapone is already debugging it a bit, so maybe he'll find the root cause.