Using composer created project. When tried to access the browser I got following error:
Fatal error: Cannot instantiate interface Magento\Framework\App\Config\Scope\ReaderPoolInterface
in /var/www/2mage/mage-21/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73
Here are system level details:
Mac OSX 10.10.5.
> php -v
PHP 5.6.22 (cli)
> bin/magento
Magento CLI version 2.1.0
Created project as:
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.1.0
After that cerated vhost and pointed browser and got this error:
Please see the screenshot attached.
There is also a strange thing that I noticed the CLI option are also less.
Available commands:
help Displays help for a command
list Lists commands
admin
admin:user:create Creates an administrator
i18n
i18n:collect-phrases Discovers phrases in the codebase
i18n:pack Saves language package
info
info:adminuri Displays the Magento Admin URI
info:backups:list Prints list of available backup files
info:currency:list Displays the list of available currencies
info:dependencies:show-framework Shows number of dependencies on Magento framework
info:dependencies:show-modules Shows number of dependencies between modules
info:dependencies:show-modules-circular Shows number of circular dependencies between modules
info:language:list Displays the list of available language locales
info:timezone:list Displays the list of available timezones
maintenance
maintenance:allow-ips Sets maintenance mode exempt IPs
maintenance:disable Disables maintenance mode
maintenance:enable Enables maintenance mode
maintenance:status Displays maintenance mode status
module
module:disable Disables specified modules
module:enable Enables specified modules
module:status Displays status of modules
module:uninstall Uninstalls modules installed by composer
sampledata
sampledata:deploy Deploy sample data modules
sampledata:remove Remove all sample data packages from composer.json
setup
setup:backup Takes backup of Magento Application code base, media and database
setup:config:set Creates or modifies the deployment configuration
setup:cron:run Runs cron job scheduled for setup application
setup:db-data:upgrade Installs and upgrades data in the DB
setup:db-schema:upgrade Installs and upgrades the DB schema
setup:db:status Checks if DB schema or data requires upgrade
setup:di:compile Generates DI configuration and all missing classes that can be auto-generated
setup:install Installs the Magento application
setup:performance:generate-fixtures Generates fixtures
setup:rollback Rolls back Magento Application codebase, media and database
setup:store-config:set Installs the store configuration
setup:uninstall Uninstalls the Magento application
setup:upgrade Upgrades the Magento application, DB data, and schema
When I checked the CLI options on my teammates machine(ubuntu 14.04) it has more options and
setup also worked again.
_I tried with downloading zip also from_ https://www.magentocommerce.com/download
_But I had same results_
Any help whats wrong going on here ?
@matrixbegins
Thank you for reporting!
Please follow this links to similar issues with solutions:
http://magento.stackexchange.com/questions/125415/magento-2-installation-fatal-error-cannot-instantiate-interface
https://github.com/magento/magento2/issues/831
@andimov I am afraid I saw it and deleting the whole code and doing again lead to the same results.
Setting to developer mode deploy:mode:set
is not an option, as I don't have that command. That's why I have also posted the output of bin/magento
I think I have found my mistake. I was trying to run setup via www.vhost.com
however when I tried with www.vhost.com/setup
it worked. So my problem is solved. But probably bug remains.
If magento is not installed it should take user to /setup
automatically
@matrixbegins
What web server do you use?
@andimov I am using NGINX v1.10.1
@matrixbegins
Do you use Magento nginx.conf.sample?
Here is my vhost.conf
upstream fastcgi_backend {
server unix:/var/run/php-fpm.sock;
}
server {
listen 80;
server_name 24mage.local.com;
set $MAGE_ROOT /var/www/2mage/mage-21/project-community-edition;
set $MAGE_MODE developer;
root $MAGE_ROOT/pub;
index index.php;
autoindex off;
charset off;
add_header 'X-Content-Type-Options' 'nosniff';
add_header 'X-XSS-Protection' '1; mode=block';
location /setup {
root $MAGE_ROOT;
location ~ ^/setup/index.php {
fastcgi_pass fastcgi_backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ ^/setup/(?!pub/). {
deny all;
}
location ~ ^/setup/pub/ {
add_header X-Frame-Options "SAMEORIGIN";
}
}
location /update {
root $MAGE_ROOT;
location ~ ^/update/index.php {
fastcgi_split_path_info ^(/update/index.php)(/.+)$;
fastcgi_pass fastcgi_backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
# deny everything but index.php
location ~ ^/update/(?!pub/). {
deny all;
}
location ~ ^/update/pub/ {
add_header X-Frame-Options "SAMEORIGIN";
}
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location /pub {
location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
deny all;
}
alias $MAGE_ROOT/pub;
add_header X-Frame-Options "SAMEORIGIN";
}
location /static/ {
if ($MAGE_MODE = "production") {
expires max;
}
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
add_header Cache-Control "public";
add_header X-Frame-Options "SAMEORIGIN";
expires +1y;
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
}
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
add_header Cache-Control "no-store";
add_header X-Frame-Options "SAMEORIGIN";
expires off;
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
}
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
add_header X-Frame-Options "SAMEORIGIN";
}
location /media/ {
try_files $uri $uri/ /get.php?$args;
location ~ ^/media/theme_customization/.*\.xml {
deny all;
}
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
add_header Cache-Control "public";
add_header X-Frame-Options "SAMEORIGIN";
expires +1y;
try_files $uri $uri/ /get.php?$args;
}
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
add_header Cache-Control "no-store";
add_header X-Frame-Options "SAMEORIGIN";
expires off;
try_files $uri $uri/ /get.php?$args;
}
add_header X-Frame-Options "SAMEORIGIN";
}
location /media/customer/ {
deny all;
}
location /media/downloadable/ {
deny all;
}
location /media/import/ {
deny all;
}
location ~ cron\.php {
deny all;
}
location ~ (index|get|static|report|404|503)\.php$ {
try_files $uri =404;
fastcgi_pass fastcgi_backend;
fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
fastcgi_param PHP_VALUE "memory_limit=512M \n max_execution_time=600";
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;
fastcgi_param MAGE_MODE $MAGE_MODE;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Experienced Same problem with default root.
But if i try
and also i need to comment the line cgi.fix_pathinfo=0,
in my php-fpm php.ini file.
I had the same issue when I tried to install magento through https protocol. When i switched to http and document root from /magneto2/pub/ to /magento2/ - setup started works!
Env: Apache 2.4 + mod php 5.6
Magento 2.1 installed via composer
Here with the same issue on VM Homestead 5.0.
Php 7.0.8
Nginx 1.11.1
I only sucessfully installed magento with php bin/magento setup:install
What is the reason for?
Fatal error: Cannot instantiate interface Magento\Framework\App\Config\Scope\ReaderPoolInterface
in /home/vagrant/www/magento-ce/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73
What is the reason for?
Fatal error: Cannot instantiate interface MagentoFrameworkAppConfigScopeReaderPoolInterface
in /home/vagrant/www/magento-ce/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73
+1
You have invalid di configuration for MagentoFrameworkAppConfigScopePool
You have invalid di configuration for MagentoFrameworkAppConfigScopePool
I don't understand, "di configuration" Could you explain more clearly?
Hi, guys!
Thank you for your feedbacks.
We have the internal ticket MAGETWO-46636
with the same issue.
I changed root $MAGE_ROOT/pub
to root $MAGE_ROOT
in nginx configuration file and setup works fine now.
once it is installed I changed it back.
I'm still facing this problem.
+1 Magento 2.1.6
I had a problem in my DI. so it was my fault.
in my case I had the same problem, I was using the /~username for the account as a dev site. After pointing a dummy domain to the account and used that instead it worked.
i have same problem. can any one explain why i do not have commad like "deploy:mode:set" at my setup?
same problem here
i am having the same issue with checkjout page. Kindly visit the url to know what exactly my issue is
https://github.com/magento/magento2/issues/9710
if you are getting error related to payment token interface try this.
<preference for="Magento\Vault\Api\Data\PaymentTokenInterfaceFactory" type="Magento\Vault\Model\AccountPaymentTokenFactory"/>
in line between 10-17.@kaurg2516 Don't modify the files in your vendor directory.
@matrixbegins, thank you for your report.
The issue is already fixed in 2.2.0
Most helpful comment
@kaurg2516 Don't modify the files in your vendor directory.