• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved Multi-Factor Authentication (MFA) - New Accounts tab - JS error showing blank page

Alban Staehli

Regular Pleskian
Username:

TITLE

Multi-Factor Authentication (MFA) - New Accounts tab - JS error showing blank page

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

AlmaLinux 8.10 (Cerulean Leopard), Plesk Obsidian 18.0.65 Web Host Edition, MFA Extension 1.1.0-1735

PROBLEM DESCRIPTION

While attempting to try out the new Accounts tab for the Multi-Factor Authentication (MFA), each time I click on it to access the tab content, the browser catches a JS error and the page remains blank.
See attachment. I tried to refresh browser cache, did not help.

STEPS TO REPRODUCE

Open the Multi-Factor Authentication (MFA), click on the Accounts tab.

ACTUAL RESULT

Shows a blank page and throws a JS error in the browser Dev console.
See error below:


Code:
react-dom.production.min.js:188 TypeError: e.filter is not a function
    at UserList.tsx:44:18
    at Object.useMemo (react-dom.production.min.js:177:189)
    at react.production.min.js:26:48
    at Ot (UserList.tsx:43:25)
    at ml (react-dom.production.min.js:160:137)
    at ki (react-dom.production.min.js:289:337)
    at xc (react-dom.production.min.js:279:389)
    at vc (react-dom.production.min.js:279:320)
    at gc (react-dom.production.min.js:279:180)
    at ac (react-dom.production.min.js:270:88)

Code:
react-dom.production.min.js:127 Uncaught TypeError: e.filter is not a function
    at UserList.tsx:44:18
    at Object.useMemo (react-dom.production.min.js:177:189)
    at react.production.min.js:26:48
    at Ot (UserList.tsx:43:25)
    at ml (react-dom.production.min.js:160:137)
    at ki (react-dom.production.min.js:289:337)
    at xc (react-dom.production.min.js:279:389)
    at vc (react-dom.production.min.js:279:320)
    at gc (react-dom.production.min.js:279:180)
    at ac (react-dom.production.min.js:270:88)

EXPECTED RESULT

Shows the list of Accounts (I guess, since it's a new feature)

ANY ADDITIONAL INFORMATION

I observed that the "Accounts" tab only shows up after 2-3 seconds after accessing the MFA extension.

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Help with sorting out
 
Thank you for the report, @Alban Staehli. I tested and inspected the "Accounts" tab in the MFA extension 1.1.0-1735 on Chrome, Edge, and Firefox with Alma Linux 8.10/9.4 / Ubuntu 22.04 and Plesk 18.0.65. Unfortunately, I was unable to reproduce the behavior or the error in the console log. Could you please try accessing the tab using another browser or clear the cache of the current one?
 
Just tried @Sebahat.hadzhi with Edge, same error.

Code:
react-dom.production.min.js:188  TypeError: e.filter is not a function
    at main.js?&18.0.65:1:39030
    at Object.useMemo (react-dom.production.min.js:177:189)
    at t.useMemo (react.production.min.js:26:48)
    at Ot (main.js?&18.0.65:1:39022)
    at ml (react-dom.production.min.js:160:137)
    at ki (react-dom.production.min.js:289:337)
    at xc (react-dom.production.min.js:279:389)
    at vc (react-dom.production.min.js:279:320)
    at gc (react-dom.production.min.js:279:180)
    at ac (react-dom.production.min.js:270:88)


Code:
react-dom.production.min.js:127  Uncaught TypeError: e.filter is not a function
    at main.js?&18.0.65:1:39030
    at Object.useMemo (react-dom.production.min.js:177:189)
    at t.useMemo (react.production.min.js:26:48)
    at Ot (main.js?&18.0.65:1:39022)
    at ml (react-dom.production.min.js:160:137)
    at ki (react-dom.production.min.js:289:337)
    at xc (react-dom.production.min.js:279:389)
    at vc (react-dom.production.min.js:279:320)
    at gc (react-dom.production.min.js:279:180)
    at ac (react-dom.production.min.js:270:88)
 
Just to add: Google Authenticator 1.5.6-3176 extension is still installed, which is disabled since MFA was delivered earlier this year.
 
Thank you for your update. Unfortunately, I was unable to reproduce the issue even with Google Authenticator present on the server. If you have the option, I would recommend to open a ticket with Plesk support for an investigation of the issue on your server.
 
I can confirm we are seeing the same issue on the same config as Alban. Having gone to test the new accounts page it is blank.
 
@Will-NYESDigital, if you have the option to open a support ticket, please do. Given that, at this point, we are unable to reproduce the issue, it is quite difficult to point out what exactly the case is on your end.
 
We can also confirm the bug. The issue seems to be related to the number of accounts.

One of our servers, with 157 accounts, works like a charm.

Another one, with 464 accounts, triggers the mentioned error.

I think @Alban Staehli has a similar number of accounts, as we also experience a 2-3 second delay after accessing the MFA extension before the "Accounts" tab appears on the affected server. You can check the number of accounts in the psa database:

SQL:
SELECT COUNT(*) FROM `psa`.`smb_users`
 
Thanks for the details, now we have some ground to start the investigation from. I will discuss the case with our team and will update you with more details shortly.
 
@Hangover2, the odd thing is that the extension was tested with double the number of users you are reporting before release and no performance issues were observed. Anyhow, I escalated the case for further review by our team and hopefully they will be able to find the culprit.
 
@Sebahat.hadzhi

We did investigate the problem further.

The problematic request is:

1731040248588.png

Normally it gives back all user. But on the problematic server it redirects back to the dashboard. This causes the delay of several seconds.
In our case the error message on the dashboard is:
Error: Can not find domain by id -1

Here is the panel error log:

Code:
pm_Exception: Can not find domain by id -1
file: /opt/psa/admin/plib/pm/Domain.php
line: 33
code: 0
trace: #0 /opt/psa/admin/plib/pm/Domain.php(47): pm_Domain->__construct(integer '-1')
#1 /opt/psa/admin/plib/modules/mfa/vendor/plesk/typedplesksdk/src/DomainFactory.php(18): pm_Domain::getByDomainId(integer '-1')
#2 /opt/psa/admin/plib/modules/mfa/library/Helper/UserHelper.php(182): Plesk\SDK\TypedPleskSdk\DomainFactory->getByDomainId(integer '-1')
#3 /opt/psa/admin/plib/modules/mfa/library/Helper/UserHelper.php(101): PleskExt\Mfa\Helper\UserHelper::getMailUserLoginInfo(array)
#4 /opt/psa/admin/plib/modules/mfa/controllers/UsersController.php(45): PleskExt\Mfa\Helper\UserHelper::getAllUserLogins(boolean true)
#5 /opt/psa/admin/plib/vendor/plesk/zf1/library/Zend/Controller/Action.php(516): UsersController->indexAction()
#6 /opt/psa/admin/plib/vendor/plesk/zf1/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(string 'indexAction')
#7 /opt/psa/admin/plib/vendor/plesk/zf1/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(object of type Zend_Controller_Request_Http, object of type Zend_Controller_Response_Http)
#8 /opt/psa/admin/plib/pm/Application.php(91): Zend_Controller_Front->dispatch()
#9 /opt/psa/admin/htdocs/modules/mfa/index.php(4): pm_Application->run()

The PHP file is encrypted, so now it is your turn. Happy debugging :).
 
Hello, everyone. Could someone please run the plesk repair db -v -n command and provide the output either in a private conversation or in this thread? Thanks in advance for your cooperation.
 
We dug deeper and were able to find the root cause of the issue.

Even though the Plesk repair tool for the server does not show any problems with the Plesk database, there is one problematic user on the server who caused the issue.

First of all, this user has a value of -1 for `subscriptionDomainId` in `psa`.`smb_users` .

1731220853457.png

Upon further inspection, we found that this user has a webmaster role with access to a subscription that no longer exists.

1731220991033.png

After deleting that user, everything works like a charm again.
 
I am glad to hear you were able to find the culprit of the issue. Thank you for providing the details, I am sure that will be of a great help to our team. I passed the information so they can continue investigating why would this cause the abnormal behavior in the MFA extension and possibly correct it.
 
Hello, everyone. Thank you all for reporting the issue. The same was, however, not identified as product bug. According to our team it is related to a local misconfiguration. Kindly check if there is no user issue present on the server similar to the one reported by @Hangover2.
 
@Sebahat.hadzhi Local misconfiguration?

Actually, this is a bug that can be reproduced quite easily:

1. Add a subscription to a customer.
2. Create a new user account under the customer that only has access to the newly created subscription.
3. Delete the newly created subscription.
4. Open the accounts tab of the "Multi-Factor Authentication (MFA)" extension.

I wouldn’t say that this is a local misconfiguration; it’s a software bug in Plesk. You can’t expect clients to know that the "lost" user must be deleted first in order to access the plugin again without errors.
 
Hello, thank you for the report and steps to reproduce :)
Bug reported under EXTPLESK-6144

W/A for now is to remove any users that do not have a subscription anymore.
To find them:
Code:
SELECT smb_users.contactName AS 'Leftover User', clients.pname AS 'Owner' FROM smb_users JOIN clients ON smb_users.ownerId = clients.id WHERE smb_users.subscriptionDomainId = -1;
(Owner in the output is the customer that created this user)

At this point, I cannot provide any estimate for the resolution. Thank you for your patience and understanding in the meantime.
 
Hello, thank you for the report and steps to reproduce :)
Bug reported under EXTPLESK-6144

W/A for now is to remove any users that do not have a subscription anymore.
To find them:
Code:
SELECT smb_users.contactName AS 'Leftover User', clients.pname AS 'Owner' FROM smb_users JOIN clients ON smb_users.ownerId = clients.id WHERE smb_users.subscriptionDomainId = -1;
(Owner in the output is the customer that created this user)

At this point, I cannot provide any estimate for the resolution. Thank you for your patience and understanding in the meantime.
This works, thx!
 
Back
Top