Neos 3.3 "Invalid argument supplied for foreach()"


(Sören Oehding) #1

Hey guys, I’m fairly new to Neos and just work on my first Project. Everything worked just fine until I updated Neos today. I followed all the steps from https://www.neos.io/download-and-extend/upgrade-instructions-3-2-3-3.html but now I 'm facing the following error:

Warning: Invalid argument supplied for foreach() in /app/Packages/Framework/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php line 333

Type: Neos\Flow\Error\Exception
Code: 1
File: Packages/Framework/Neos.Flow/Classes/Error/ErrorHandler.php
Line: 81

Open Data/Logs/Exceptions/20180105133631de1f5c.txt for a full stack trace.

Exception Code	1355480641
Exception Type	Neos\Flow\Core\Booting\Exception\SubProcessException
Log Reference	20180105133631c71167
Thrown in File	Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php
Line	624

Here are the corresponding exception logs:

Exception #1 in line 333 of /app/Packages/Framework/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php: 
Warning: Invalid argument supplied for foreach() in 
/app/Packages/Framework/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php line 333

12 Neos\Flow\Error\ErrorHandler::handleError(2, "Invalid argument supplied for foreach()", 
"/app/Packages/Framework/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php", 333, array|3|)
11 Neos\Flow\Aop\Builder\ProxyClassBuilder::buildAspectContainer("Neos\Neos\Ui\Aspects\BackendRedirectionServiceAspect")
10 Neos\Flow\Aop\Builder\ProxyClassBuilder::buildAspectContainers(array|18|)
9 Neos\Flow\Aop\Builder\ProxyClassBuilder::build()
8 Neos\Flow\Command\CoreCommandController::compileCommand(FALSE)
7 call_user_func_array(array|2|, array|1|)
6 Neos\Flow\Cli\CommandController::callCommandMethod()
5 Neos\Flow\Cli\CommandController::processRequest(Neos\Flow\Cli\Request, Neos\Flow\Cli\Response)
4 Neos\Flow\Mvc\Dispatcher::initiateDispatchLoop(Neos\Flow\Cli\Request, Neos\Flow\Cli\Response)
3 Neos\Flow\Mvc\Dispatcher::dispatch(Neos\Flow\Cli\Request, Neos\Flow\Cli\Response)
2 Neos\Flow\Cli\CommandRequestHandler::handleRequest()
1 Neos\Flow\Core\Bootstrap::run()


[array] => 

Exception #1355480641 in line 312 of /app/Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php: Warning: Invalid argument supplied for foreach() in /app/Packages/Framework/Neos.Flow/Classes/Aop/Builder/ProxyClassBuilder.php line 333

  Type: Neos\Flow\Error\Exception
  Code: 1
  File: Packages/Framework/Neos.Flow/Classes/Error/ErrorHandler.php
  Line: 81

Open Data/Logs/Exceptions/20180105133631de1f5c.txt for a full stack trace.

12 Neos\Flow\Core\Booting\Scripts::executeCommand("neos.flow:core:compile", array|17|)
11 Neos\Flow\Core\Booting\Scripts::initializeProxyClasses(Neos\Flow\Core\Bootstrap)
10 call_user_func(array|2|, Neos\Flow\Core\Bootstrap)
9 Neos\Flow\Core\Booting\Step::__invoke(Neos\Flow\Core\Bootstrap)
8 Neos\Flow\Core\Booting\Sequence::invokeStep(Neos\Flow\Core\Booting\Step, Neos\Flow\Core\Bootstrap)
7 Neos\Flow\Core\Booting\Sequence::invokeStep(Neos\Flow\Core\Booting\Step, Neos\Flow\Core\Bootstrap)
6 Neos\Flow\Core\Booting\Sequence::invokeStep(Neos\Flow\Core\Booting\Step, Neos\Flow\Core\Bootstrap)
5 Neos\Flow\Core\Booting\Sequence::invokeStep(Neos\Flow\Core\Booting\Step, Neos\Flow\Core\Bootstrap)
4 Neos\Flow\Core\Booting\Sequence::invoke(Neos\Flow\Core\Bootstrap)
3 Neos\Flow\Http\RequestHandler::boot()
2 Neos\Flow\Http\RequestHandler::handleRequest()
1 Neos\Flow\Core\Bootstrap::run()


    [array] => 

Hope someone can help me or push me in the right direction :slight_smile:


(Christian Müller) #2

Haven’t seen that one before.

First of all to see what you actually have installed now:

composer show -i

output woudl be interesting to see every isntaleld package and version. Maybe there is a mixup.


(Lars Nieuwenhuizen) #3

Did you correctly run the flow:core:migrate command for your packages?

I had some (different) minor issues with this too in the upgrade.

Remember to check if the command doesn’t tell you whether you should run it with the --force flag


(Sören Oehding) #4

Thanks for your replies! Unfortunately i had to skip this update for now and rolled back to 3.2. I will report back here as soon as I start the next update.


(Sören Oehding) #5

Hi, just for the records:
I tried to update again yesterday and it is done now. I removed all dev dependencies via

composer update --no-dev

to get rid of the initial problem. After that I was facing the same Issue @lars described here. So I simply rebuild my dev environment and the problem was gone :slight_smile:

Thx again guys