Bobcares

Unable to find row with id in smb_apsMetas table Error | Fixed

by | Jan 12, 2023

Looking for a solution to the “Unable to find row with id in smb_apsMetas table” error? Our WordPress Support team is here to lend a hand with your queries and issues.

“Unable to find row with id in smb_apsMetas table” error | Resolved

Unable to find row with id in smb_apsMetas table ErrorIf you have been having trouble with this error, you have come to the right place.

Interestingly, this error occurs due to a Plesk database inconsistency.

According to our experts, here are the commonly seen issues due to this specific error:

  1. The error message pops up when we click the Change login settings button in WordPress instance settings under Domains:

    Internal error:
    Unable to find row with id in smb_apsMetas table.

  2. This specific error also results in messages similar to the ones below in the enabled SQL query debug log at /var/log/plesk/panel.log:

    [2018-05-19 00:25:22] DEBUG [dbquery] [72] SQL: SELECT `smb_apsInstances`.* FROM `smb_apsInstances` WHERE (((`smb_apsInstances`.`id` = 29)))
    [2018-05-19 00:25:22] DEBUG [dbquery] [72] END: 0.00771 sec
    [2018-05-19 00:25:22] ERR [panel] Unable to find row with id in smb_apsMetas table.:

  3. Finally, head to WordPress under Tools & Settings and run the “Check for Updates” task.

Now that we have established how the error exhibits itself, it is time to move on to resolving the issue:

  1. First, we have to connect to the server via SSH.
  2. Next, we have to back up the psa database with the following command:

    #plesk db dump psa > backup.sql

  3. Then, we have to access MySQL and verify the following entries according to the queries in /var/log/plesk/panel.log:

    SELECT * FROM smb_apsInstances WHERE id=29;
    +—-+—————–+———–+——–+—————————+—————————+
    | id | parentContextId | contextId | metaId | uuid | registryResourceId |
    +—-+—————–+———–+——–+—————————+—————————+
    | 29 | 36 | 41 | 12 | a3133579-…-1ef4c1dfbdb3 | 8e786998-…-03ae740b6c54 |
    +—-+—————–+———–+——–+—————————+—————————+
    1 row in set (0.00 sec)

    SELECT * FROM smb_apsContexts WHERE id=36;
    +—-+————-+———–+————————-+———————-+
    | id | contextType | packageId | requirementContextClass | requirementContextId |
    +—-+————-+———–+————————-+———————-+
    | 36 | 0 | 12 | NULL | NULL |
    +—-+————-+———–+————————-+———————-+
    1 row in set (0.00 sec)

    SELECT * FROM smb_apsMetas WHERE id=12;
    +—-+———–+———–+———————————————-+——-+———–+
    | id | name | serviceId | xpath | class | contextId |
    +—-+———–+———–+———————————————-+——-+———–+
    | 12 | WordPress | wordpress | aps::aps12::http://wordpress.org/::wordpress | | 36 |
    +—-+———–+———–+———————————————-+——-+———–+
    1 row in set (0.00 sec)

  4. In case any of the entries are missing, we have to restore them by manually inserting them.

However, if the above steps do not help resolve the issue, our experts suggest the following:

  1. First, we have to back up the WPTK SQLite database with this command:

    # cp /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3{,.backup}

  2. Next, repair the records with the WordPress Toolkit database

    sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3
    SQLite version 3.7.17 2013-05-20 00:56:22
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    sqlite> .mode column
    sqlite> .headers ON
    sqlite> select * from Instances where apsInstanceId=29;
    id domainId path isIgnored apsInstanceId
    ---------- ---------- ---------- ---------- -------------
    1 4 /httpdocs 0
    sqlite> update Instances set apsInstanceId=NULL where id=1;

Let us know in the comments if you need further help with this error.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

To sum up, our Support Engineers demonstrated how to resolve “Unable to find row with id in smb_apsMetas table” error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.