Solved : Blank Pages Issue After Compilation Command in Magento 2

Feel free to share the solution with Magento Community via social media.

I would be happy to help.

The variety of tasks depends on the ‘php bin/magento setup:di:compile ‘command in Magento 2 store.
Uncaught Error: Call to a member function setActive() on boolean
Thank you for subscribing.
Something went wrong.
If you have any doubts regarding this solution, just mention them in the Comments section below.

Solution to Blank Pages Issue After Compilation Command in Magento 2:

By default, Magento generates code to create non-existent factory classes if the class is injected in a constructor and stores all of Magento’s code in the ‘generated’ folder.
Ever faced blank pages issue after compilation command in Magento 2?  or ever got the fatal error that states:
This issue arrives because the globle.php file gets generated after the compilation command.
Refresh your page.
I’ve observed many of us tend to delete the ‘generated’ folder to solve this issue.
Therefore, instead of removing the complete generated folder; remove the globle.php file located at generatedmetadata 
Hence, for this particular issue, it’s not always advisable to delete the whole generated folder. Instead of this, it is recommended to use the below solution:
Never miss Magento tips, tricks, tutorials, and news.

Get Weekly Updates

And you are done! The page will work the same as before.

Thank You.
Especially while working with dependency injection configuration, repositories code generation, and application code generation, need often arrives to use the compilation command.

/**/

/*.mfp-bg{background:#000000d4}
/*]]>*/

/*.mfp-bg.mfp-ready{opacity:.6}
/*]]>*/

(based on 10 Reviews)