PHP Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Filesystem\DriverInterface in /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50
Closed this issue · 4 comments
Error after upgrading to 2.3.7. Causes category pages to break and products unable to be added to cart.
Error also stops any commands in CLI from running.
TaxJar 1.9.2
- Have you reviewed our integration guide?
- Did you search through existing issues?
Description
Steps to Reproduce
- Upgrade from 2.3.6 to 2.3.7
- Run setup:upgrade
Expected Result
Complete setup:upgrade
Actual Result
PHP Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Filesystem\DriverInterface in /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50
Stack trace:
#0 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewo...')
#1 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(167): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Framewo...')
#2 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(273): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Framewo...', NULL, 'fileDriver', 'Taxjar\SalesTax...')
#3 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(236): in /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50
Versions
Magento 2.3.7
Magento Open Source (CE)
PHP 7.3
Hello @nickpiro,
This issue was reported here: #247
and should be resolved here: #241
Are you able to verify that the etc/di.xml
file in your taxjar/module-taxjar
installation contains a preference Magento\Framework\Filesystem\Driver\File
for argument fileDriver
? If so, please let me know if running the command bin/magento setup:di:compile
resolves this issue for you.
That file does seem to be modified, correct. This is what I get when I compile:
Compilation was started.
Repositories code generation... 1/8 [===>------------------------] 12% < 1 sec 77.0 MiBPHP Fatal error: Uncaught Error: Class 'Taxjar\SalesTax\Block\Adminhtml\PopupField' not found in /app/code/Taxjar/Salestax/Block/Adminhtml/Enabled.php:27
Stack trace:
#0 /setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(135): require_once()
#1 /setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClasses(Array, '..')
#2 /setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(88): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract(Object(RecursiveIteratorIterator))
#3 /setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList('/chroot/home/ma...')
#4 in /app/code/Taxjar/Salestax/Block/Adminhtml/Enabled.php on line 27
@nickpiro - If the TaxJar files are in place as it appears based on the stack trace you've included, this error may indicate a file permissions issue. Are you able to verify the server or VM filesystem group and permissions? Sometimes those things can get mucked up when copying files via FTP or mounting/copying filesystems to Docker containers.
Also, if you are able to attempt it, do you observe the same installation or compilation errors when installing our extension via composer?