Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main.CRITICAL: Error: Cannot instantiate interface Magefan\Blog\Api\UrlResolverInterface #481

Closed
hgati opened this issue Mar 29, 2023 · 1 comment

Comments

@hgati
Copy link

hgati commented Mar 29, 2023

Describe the bug
I installed the extension with Composer and logged in as admin to check it, but it doesn't work with an error message.

Preconditions:

  • Magento Version: 2.4.6
  • Module Version: 2.10.9
  • PHP Version 8.2.4

To Reproduce
Steps to reproduce the behavior:

  1. Go to /var/www/magento
    cd /var/www/magento

  2. Install magefan blog module

composer require magefan/module-blog
bin/magento maintenance:enable
sudo systemctl reload php8.2-fpm.service
bin/magento cron:remove
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento cache:flush
bin/magento cron:install
sudo systemctl reload php8.2-fpm.service
bin/magento maintenance:disable
  1. Go to Admin

  2. Error - var/log/exception.log

[2023-03-29T01:04:14.364438+00:00] main.CRITICAL: Error: Cannot instantiate interface Magefan\Blog\Api\UrlResolverInterface in /var/www/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121
Stack trace:
#0 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject()
#1 /var/www/magento/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create()
#2 /var/www/magento/vendor/magefan/module-blog/Controller/Router.php(131): Magento\Framework\ObjectManager\ObjectManager->get()
#3 /var/www/magento/generated/code/Magefan/Blog/Controller/Router/Interceptor.php(14): Magefan\Blog\Controller\Router->__construct()
#4 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121): Magefan\Blog\Controller\Router\Interceptor->__construct()
#5 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject()
#6 /var/www/magento/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create()
#7 /var/www/magento/vendor/magento/framework/App/RouterList.php(50): Magento\Framework\ObjectManager\ObjectManager->create()
#8 /var/www/magento/vendor/magento/framework/App/RouterList.php(65): Magento\Framework\App\RouterList->getRouterInstance()
#9 /var/www/magento/vendor/magento/framework/App/FrontController.php(142): Magento\Framework\App\RouterList->current()
#10 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#11 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#12 /var/www/magento/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#13 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch()
#14 /var/www/magento/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(71): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#15 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch()
#16 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#17 /var/www/magento/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#18 /var/www/magento/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#19 /var/www/magento/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#20 /var/www/magento/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#21 {main} {"exception":"[object] (Error(code: 0): Cannot instantiate interface Magefan\\Blog\\Api\\UrlResolverInterface at /var/www/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121)"} []

Expected behavior

Actual behavior

Screenshots

Additional context

@magefan
Copy link
Owner

magefan commented Mar 29, 2023

@hgati thank you for your report.

Unfortunately, we cannot reproduce this issue in our testing environment using the latest blog extension version.
Please note that the blog version you use (2.10.9) has known issues with Magento 2.4.6 and php8. Update the blog module to the latest 2.10.12.3

After the updated remove/clean exception.log and visit the admin panel again to see if you'll still have this issue
https://camo.githubusercontent.com/56b956b54f588c439530dc1d16ff25f585645bdced70da9e12ea07d40bb12b78/68747470733a2f2f692e6962622e636f2f4a4858743837732f323032332d30332d32392d31302d31332d31392e706e67

@magefan magefan closed this as completed Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants