Shopware 6 Unable to find a matching sales channel for the request

3.7k Views Asked by At

I have been stuck on this for long enough now, basically I am wanting to try and use Shopware 6 as a PWA.

To install shopware I make use of Valet and Git.

But I am never able to use install Shopware6 in the right way because I am always getting the same error:

Shopware error

This is how I am installing Shopware6:

  1. clone git repo -->https://github.com/shopware/production;

  2. cd /production; -composer install (to install dependencies)

  3. ./bin/console system:setup - At this step I am asked to input some datas:

  4. Application environment [dev]: //dev;

    • URL to your /public folder [http://localhost]: // http://production.test;
    • Blue Green Deployment (yes/no) [yes]: //yes
    • Database user [app]: //root
    • Database password: //root
    • Database host [localhost]: //
    • Database port [3306]: //
    • Database name [shopware]: //
    • Database SSL CA Path []: //
    • Database SSL Cert Path []: //
    • Database SSL Key Path []: //
  • Skip verification of the database server's SSL certificate? (yes/no) [no]: //no

Once Shopware 6 is installed I would visit production/public to create a valet link (virtual host).

valet link production.test

I visit my virtual host on http://production.test

At this moment I always get the above mentioned error: Unable to find a matching sales channel for the request: http://production.test/". Please make sure the domain mapping is correct.

2

There are 2 best solutions below

2
On

This is a bit odd. Good news is that your installation seems to be working, but for some reason it sounds like your SalesChannel -> domain is not set. Try logging into http://production.test/admin & going to the Storefront sales channel. There you can configure the domain. You can see it here as an example: enter image description here

0
On

Was facing issue with the 6.5 branch.

Executed below commands.

php bin/shopware sales-channel:list
php bin/shopware sales-channel:create:storefront --url http://production.test

No trailing slash on URL param