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

PHP Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Filesystem\DriverInterface in /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50 #297

Closed
2 tasks
nickpiro opened this issue Apr 4, 2022 · 4 comments

Comments

@nickpiro
Copy link

nickpiro commented Apr 4, 2022

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

Description

Steps to Reproduce

  1. Upgrade from 2.3.6 to 2.3.7
  2. 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

@sethobey
Copy link
Contributor

sethobey commented Apr 4, 2022

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.

@nickpiro
Copy link
Author

nickpiro commented Apr 4, 2022

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

@sethobey
Copy link
Contributor

sethobey commented Apr 4, 2022

@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?

@sethobey
Copy link
Contributor

@nickpiro I'm closing this issue for now. Please feel free to re-open this issue or reach out to TaxJar support if you continue to experience the described error.

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