Magento 2.4.4 Bug undefined index: frontend - with FIX! - DTF Digital
Magento 2.4.4 Bug - undefined index: frontend - with FIX

We recently discovered a bug that appeared seemingly at random on one of our Magento 2.4.4 websites. A search online revealed this to be an almost unheard of bug, but the impact of this bug is that it takes the website down entirely.

What’s the issue?

We came into the office one morning to discover that an entire website was returning a 500 server error. An examination of the server log files revealed three errors:

Frontend/Pool:

Notice: Undefined index: frontend in /public_html/vendor/magento/
framework/App/Cache/Frontend/Pool.php on line 90

SQL Error:

[2022-07-22T08:24:29.404089+00:00] main.ERROR: SQLSTATE[70100]: <<Unknown error>>: 1927 Connection was killed, query was: SELECT `queue_message`.`topic_name`, `queue_message`.`body`, `queue_message_status`.`id` AS `relation_id`, `queue_message_status`.`queue_id`, `queue_message_status`.`message_id`, `queue_message_status`.`status`, `queue_message_status`.`updated_at`, `queue_message_status`.`number_of_trials` AS `retries`, `queue`.`name` AS `queue_name` FROM `queue_message`
 INNER JOIN `queue_message_status` ON queue_message.id = queue_message_status.message_id
 INNER JOIN `queue` ON queue.id = queue_message_status.queue_id WHERE (queue_message_status.status IN (2, 5)) AND (queue.name = ‘export’) ORDER BY `queue_message_status`.`updated_at` ASC, `queue_message_status`.`id` ASC
 LIMIT 1

And then within the system.log file a reference to the following was noted:

GraphQL (2:3)
1: mutation {
2:   createCustomer(
     ^
3:     input: {

undefined index: frontend bug – What’s the solution?

The GraphQL reference in our system.log file was the strongest indicator of the source of the problem. From this we checked for files that had recently been changed on the server and noticed that the app/etc/env.php had been updated. We compared this file with the previous nights backup and discovered the following addition to the file which tied in with the error log:

,
    ‘cache’ => [
        ‘graphql’ => [
            ‘id_salt’ => ‘asdkjasdjkasdjlkasd2adsdsadas’
        ]
    ]

Removing this from our file, and then running the following resolved the issue bin/magento setup:upgrade && bin/magento setup:di:compile && bin/magento setup:static-content:deploy -f en_GB en_US && bin/magento cache:flush

DTF Digital