cancel
Showing results for 
Search instead for 
Did you mean: 

AreaList Error on Magento 2

AreaList Error on Magento 2

1 exception(s):
Exception #0 (Exception): Notice: Trying to access array offset on value of type null in /Users/exb/Sites/ideamart/vendor/magento/framework/App/AreaList.php on line 78

Exception #0 (Exception): Notice: Trying to access array offset on value of type null in /Users/exb/Sites/ideamart/vendor/magento/framework/App/AreaList.php on line 78
<pre>#1 Magento\Framework\App\AreaList->getCodeByFrontName() called at [vendor/magento/framework/App/Http.php:111]
#2 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#3 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#4 Magento\Framework\App\Bootstrap->run() called at [index.php:39]
10 REPLIES 10

Re: AreaList Error on Magento 2

@abayomiogu4ebb 

 

Please check your php version which you are using, Magento 2.3 recommends to use php 7.2 or 7.3.

 

For mroe you can refer here:

https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html

Manish Mittal
https://www.manishmittal.com/

Re: AreaList Error on Magento 2

Hi @abayomiogu4ebb 

Kindly refer below url:

https://stackoverflow.com/questions/59336951/message-trying-to-access-array-offset-on-value-of-type-...

It can help you to resolve issue.

If issue resolve, click on 'Kudos' & Accept as Solution!

Problem solved? Click Accept as Solution!

Re: AreaList Error on Magento 2

@Bhanu Periwal 

 

Are you suggesting this solution to modify which file? Please share more details on this. As shared solution not related to Magento.

Manish Mittal
https://www.manishmittal.com/

Re: AreaList Error on Magento 2

I am using version 7.3.18

Re: AreaList Error on Magento 2

@abayomiogu4ebb 

 

can you try with PHP 7.2 as of now php 7.3+ magento have multiple issues. In php 7.3 multiple functions got deprecated but magento still using those. Please help to try with PHP 7.2 it should help to fix your problem. Thanks

Manish Mittal
https://www.manishmittal.com/

Re: AreaList Error on Magento 2

I downgraded to PHP 7.2. The issue still persists.

 

1 exception(s):
Exception #0 (Exception): Notice: Trying to access array offset on value of type null in /Users/exb/Sites/ideamart/vendor/magento/framework/App/AreaList.php on line 78

Exception #0 (Exception): Notice: Trying to access array offset on value of type null in /Users/exb/Sites/ideamart/vendor/magento/framework/App/AreaList.php on line 78
<pre>#1 Magento\Framework\App\AreaList->getCodeByFrontName() called at [vendor/magento/framework/App/Http.php:111]
#2 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#3 Magento\Framework\App\Bootstrap->run() called at [index.php:39]
#4 require() called at [/Users/exb/.composer/vendor/laravel/valet/server.php:191]
</pre>

Re: AreaList Error on Magento 2

@abayomiogu4ebb 

 

It seems you are running this on your mac right? and this can be issue with your brew. I believe it was something to do with Brew, and permissions with nginx and dnsmasq.

 

Before installing valet, make sure php71, dnsmasq, nginx, are installed and running ok by using brew services:

brew services list

 

If you see error under any of them, stop all the services by running:

brew services stop --all
sudo brew services stop --all 

 

Start again services and Completely remove all valet files in ~/.valet

composer global remove laravel/valet
rm -rf ~/.valet

Then install valet

composer global require laravel/valet
valet install

 

Why I have recommended this solution in shared erro i found that "called at [/Users/exb/.composer/vendor/laravel/valet/server.php:191"

Manish Mittal
https://www.manishmittal.com/

Re: AreaList Error on Magento 2

magento 2.3.x work only with php 7.3, that mean also php 7.4 not working.

Capture.PNG

 

https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements.html 

Re: AreaList Error on Magento 2

I updated the version of PHP to 7.3 and the problem is solved.