magento / magento-cloud-docker

All Submissions you make to Magento Inc. (“Magento") through GitHub are subject to the following terms and conditions: (1) You grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission") you submit through GitHub. (2) Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3) You agree to the Contributor License Agreement found here: https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html
Open Software License 3.0
256 stars 192 forks source link

Problems with Adobe Live Search on Local docker containers | 503 Varnish backend fetch failed #365

Closed pisicabogdan closed 3 months ago

pisicabogdan commented 6 months ago

Preconditions

  1. Magento Cloud Docker with PHP 8.2
  2. OpenSearch 2.4
  3. Nginx 1.19
  4. Varnish 6.6

Steps to reproduce

First, I upgraded some existing packages:

Then:

  1. Update the API keys from the Magento Admin for SaaS
  2. Install Adobe Live Search version 4.1.2 following the documentation: https://experienceleague.adobe.com/en/docs/commerce-merchant-services/live-search/install through composer: composer require magento/live-search
  3. Disable OpenSearch/ElasticSearch modules: bin/magento module:disable Magento_Elasticsearch Magento_Elasticsearch7 Magento_OpenSearch Magento_ElasticsearchCatalogPermissions Magento_InventoryElasticsearch Magento_ElasticsearchCatalogPermissionsGraphQl
  4. Run bin/magento setup:upgrade
  5. Run sync catalog data bin/magento commands

Expected result

The site should load correctly and Live Search should be functional.

Actual result

On a branch of Adobe Cloud, everything works as expected.

The specific issue I encounter happens only on my local DEV environments, the official docker containers: WebsiteCrashError

I created a ticket on Adobe Commerce Support but their answer was that they don't deal with local environments, even if the official images are used.

Is there anyone who has installed Live Search on the local environment, in which they have Adobe Sensei activated at the same time?

Thanks in advance!

andriyShevtsov commented 6 months ago

4. Run bin/magento setup:upgrade

That needs to be corrected. You can't simply run setup:upgrade. Please check step 4 here https://developer.adobe.com/commerce/cloud-tools/docker/deploy/production-mode/

pisicabogdan commented 6 months ago

4. Run bin/magento setup:upgrade

That needs to be corrected. You can't simply run setup:upgrade. Please check step 4 here https://developer.adobe.com/commerce/cloud-tools/docker/deploy/production-mode/ Hello!

Thanks for the reply. I will try.

Question: even if magento is set to developer mode, do I need to rebuild the docker images?

pisicabogdan commented 5 months ago

4. Run bin/magento setup:upgrade

That needs to be corrected. You can't simply run setup:upgrade. Please check step 4 here https://developer.adobe.com/commerce/cloud-tools/docker/deploy/production-mode/

It seems that it doesn't work even with this solution.

andriyShevtsov commented 5 months ago

@pisicabogdan Internal ticket was created MCLOUD-12387

pawelrox commented 3 months ago

@andriyShevtsov is there an update on this issue? We are currently exploring Adobe Live Search but cannot because this issue is a blocker.

pisicabogdan commented 3 months ago

Hello,

I solved the problem. The error appears when the Content Security Policy header is longer than the limit imposed in varnish. After I disabled the custom CSP, the website worked.