Question

I have the same issue after migrating from 1.14.0.1 to 2.3.1 to 2.3.2

server2@server2-MS-7636:/var/www/html/Project1$ php bin/magento customer:hash:upgrade
    PHP Fatal error:  Uncaught TypeError: explode() expects parameter 2 to be string  , null given in /var/www/html/Project1/vendor/magento/framework/Encryption/Encryptor.php:322
    Stack trace:
    #0 /var/www/html/Project1/vendor/magento/framework/Encryption/Encryptor.php(322): explode(':', NULL, 3)
    #1 /var/www/html/Project1/vendor/magento/framework/Encryption/Encryptor.php(301): Magento\Framework\Encryption\Encryptor->explodePasswordHash(NULL)
    #2 /var/www/html/Project1/vendor/magento/module-customer/Console/Command/UpgradeHashAlgorithmCommand.php(69): Magento\Framework\Encryption\Encryptor->validateHashVersion(NULL)
    #3 /var/www/html/Project1/vendor/symfony/console/Command/Command.php(255):Magento\Customer\Console\Command\UpgradeHashAlgorithmCommand->execute(Object(Symfo      ny\Component\Console\Input\ArgvInput),Object(Symfony\Component\Console\Output\ConsoleOutput))
    #4 /var/www/html/Project1/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\C in/var/www/html/Project1/vendor/magento/framework/Encryption/Encryptor.php                                                                              on line 322
    Fatal error: Uncaught TypeError: explode() expects parameter 2 to be string,null given in /var/www/html/Project1/vendor/magento/framework/Encryption/Encryptor.php:322
    Stack trace:
    #0 /var/www/html/Project1/vendor/magento/framework/Encryption/Encryptor.php(322): explode(':', NULL, 3)
    #1 /var/www/html/Project1/vendor/magento/framework/Encryption/Encryptor.php(301): Magento\Framework\Encryption\Encryptor->explodePasswordHash(NULL)
    #2 /var/www/html/Project1/vendor/magento/module-customer/Console/Command/Upgr                                                                             adeHashAlgorithmCommand.php(69): Magento\Framework\Encryption\Encryptor->validateHashVersion(NULL)
    #3 /var/www/html/Project1/vendor/symfony/console/Command/Command.php(255): Ma                                                                             gento\Customer\Console\Command\UpgradeHashAlgorithmCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #4 /var/www/html/Project1/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\C in /var/www/html/Project1/vendor/magento/framework/Encryption/Encryptor.php    on line 322
Was it helpful?

Solution

Try this i have same issue and now it's working for me.

TRUNCATE TABLE `customer_entity_varchar`;

OTHER TIPS

Please apply below code: it's work for me

Go to In Magento root Directory then /vendor/magento/module-customer/Model/Authentication.php

Original Code : Line 170

$hash = $customerSecure->getPasswordHash();
        if (!$this->encryptor->validateHash($password, $hash)) {

Corrected Code : Line 170

$hash = $customerSecure->getPasswordHash();
      if (!$hash || !$this->encryptor->validateHash($password, $hash)) {

Replace New Code with old one, then Refresh cache.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top