Magento-2-server-installation icon indicating copy to clipboard operation
Magento-2-server-installation copied to clipboard

Compile Error

Open musabatas opened this issue 3 years ago • 9 comments

There is an error when running compile.

"Class "Magento\AdminAdobeIms\Service\ImsConfig" does not exist."

musabatas avatar Aug 16 '22 23:08 musabatas

adobe services removed now, you can remove it too, it should work then

        "magento/module-adobe-ims": "*",
        "magento/module-adobe-ims-api": "*",
        "magento/module-admin-adobe-ims": "*",

magenx avatar Aug 17 '22 08:08 magenx

When I install 2.4.5 it returns 503 Backend fetch failed, but with 2.4.3-p2 and php 7.4 return 200 OK. How to debug and solve it?

musabatas avatar Aug 20 '22 12:08 musabatas

check varnish log, and magento/php log also restart varnish

magenx avatar Aug 20 '22 13:08 magenx

Tried restarting varnish, nginx and even server completely.

Now found the following PHP fatal error:

PHP Fatal error: Uncaught TypeError: str_replace(): Argument #3 ($subject) must be of type array|string, bool given in vendor/magento/framework/Filesystem/DirectoryList.php:137 Stack trace: #0 vendor/magento/framework/Filesystem/DirectoryList.php(137): str_replace() #1 vendor/magento/framework/Filesystem/DirectoryList.php(117): Magento\Framework\Filesystem\DirectoryList->normalizePath() #2 vendor/magento/framework/App/Filesystem/DirectoryList.php(193): Magento\Framework\Filesystem\DirectoryList->__construct() #3 vendor/magento/framework/App/Bootstrap.php(172): Magento\Framework\App\Filesystem\DirectoryList->__construct() #4 vendor/magento/framework/App/Bootstrap.php(139): Magento\Framework\App\Bootstrap::createFilesystemDirectoryList() #5 app/bootstrap.php(45): Magento\Framework\App\Bootstrap::populateAutoloader() #6 pub/health_check.php(18): require('...') #7 {main}

musabatas avatar Aug 20 '22 13:08 musabatas

I got the same error.

Class "Magento\AdminAdobeIms\Service\ImsConfig" does not exist Class Magento\TwoFactorAuth\Observer\ControllerActionPredispatch\Interceptor generation error: The requ ested class did not generate properly, because the 'generated' directory permission is read-only. If --

  • after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permissio n is set to write --- the requested class did not generate properly, then you must add the generated cl ass object to the signature of the related construct method, only.

    "magento/module-adobe-ims": "*",
    "magento/module-adobe-ims-api": "*",
    "magento/module-admin-adobe-ims": "*",
    

is included in composer.json

gfxguru avatar Aug 24 '22 21:08 gfxguru

It is an issue introduced in Magento 2.4.5 : You can refer to : Hard dependency on magento/module-admin-adobe-ims in magento/module-two-factor-auth #35962

Amadeco avatar Aug 25 '22 06:08 Amadeco

Remove all Ims quotes from this file: TwoFactorAuth/Observer/ControllerActionPredispatch.php

should compile.

corpsysgit avatar Aug 25 '22 22:08 corpsysgit

Tried restarting varnish, nginx and even server completely.

Now found the following PHP fatal error:

PHP Fatal error: Uncaught TypeError: str_replace(): Argument #3 ($subject) must be of type array|string, bool given in vendor/magento/framework/Filesystem/DirectoryList.php:137 Stack trace: #0 vendor/magento/framework/Filesystem/DirectoryList.php(137): str_replace() #1 vendor/magento/framework/Filesystem/DirectoryList.php(117): Magento\Framework\Filesystem\DirectoryList->normalizePath() #2 vendor/magento/framework/App/Filesystem/DirectoryList.php(193): Magento\Framework\Filesystem\DirectoryList->__construct() #3 vendor/magento/framework/App/Bootstrap.php(172): Magento\Framework\App\Filesystem\DirectoryList->__construct() #4 vendor/magento/framework/App/Bootstrap.php(139): Magento\Framework\App\Bootstrap::createFilesystemDirectoryList() #5 app/bootstrap.php(45): Magento\Framework\App\Bootstrap::populateAutoloader() #6 pub/health_check.php(18): require('...') #7 {main}

Have you solved this problem?

artmouse avatar Sep 02 '22 11:09 artmouse

PHP Fatal error: Uncaught TypeError: str_replace(): Argument #3 ($subject) must be of type array|string, bool given in vendor/magento/framework/Filesystem/DirectoryList.php:137

Have you solved this problem?

Unfortunately, I haven't look for the solution yet.

For now, I am using m2 version 2.4.3-p2 with php 7.4 because of most of extensions not really work with php8.1

musabatas avatar Sep 02 '22 14:09 musabatas

magento always change some modules and its dependency requirements. so you need to adjust your composer config file for every new version

magenx avatar Oct 08 '22 09:10 magenx