4

I have 2 modules that uses Plugins for Magento\Framework\App\State::afterSetAreaCode

Whenever both of the modules are enabled Magento throws:

1 exception(s):
Exception #0 (Exception): Notice: Undefined index: 
Magento\Framework\App\State in /vendor/magento/framework/Interception/PluginList/PluginList.php on line 250

I've followed the code and came to conclusion that the fault seems to be a Magento\NewRelicReporting\Plugin\StatePlugin::afterSetAreaCode. This modules and method is calling retrieving some configuration values. Somehow, retrieving the values load additional configuration files and resets Magento\Framework\Interception\PluginList\PluginList::_pluginInstances list which then returns error when next plugin in List in Magento\Framework\Interception\Interceptor tries to call getPlugin method.

This seems to happen only when cache is clear, once it's populated the site seems to work, but obviously it's not going to work correctly.

Has anyone ever encountered such issues?

Marrbacca
  • 137
  • 1
  • 10

0 Answers0