pwa-studio icon indicating copy to clipboard operation
pwa-studio copied to clipboard

[bug]: Venia doesn't work with base Magento instance

Open MajorKuprich opened this issue 3 years ago • 9 comments

Describe the bug

Venia doesn't work with base Magento instance with sample data.

To reproduce

Steps to reproduce the behavior:

  1. Install Magento 2.4.1 with sample data.
  2. Install Venia 10.0.0.
  3. Set up .env file for PWA (point MAGENTOBACKENDURL param to Magento app).
  4. Build modules & start storefront server: yarn build && yarn watch:venia.
  5. Reindex & flush cache from Magento side.
  6. Many of images & categories not loading. Can't get any product page due to 404 errors.

Expected behavior

Storefront works correctly:

  • images displaying for all products & categories
  • access to categories & products as in raw Magento instance

Screenshots

Homepage (missing some categories pictures, many GraphQL error messages):

Category (missing products, many GraphQL error messages):

Product (404 code, many GraphQL error messages):

Possible solutions

Fix GraphQL errors.

Debug Report

yarn watch:venia:

Magento exception log: {{ <2021-04-27 08:51:58> main.ERROR: Cannot query field "store*group_code" on type "StoreConfig". {"exception":"<object> (GraphQL\\Error\\Error(code: 0): Cannot query field \"store_group*code\" on type \"StoreConfig\". at /var/www/magento/vendor/webonyx/graphql-php/src/Validator/Rules/FieldsOnCorrectType.php:56)"} <] [2021-04-27 08:51:58> main.ERROR: Cannot query field "store*group_name" on type "StoreConfig". Did you mean "store_name"? {"exception":"<object> (GraphQL\\Error\\Error(code: 0): Cannot query field \"store_group_name\" on type \"StoreConfig\". Did you mean \"store*name\"? at /var/www/magento/vendor/webonyx/graphql-php/src/Validator/Rules/FieldsOnCorrectType.php:56)"} <] [2021-04-27 08:51:58> main.ERROR: Cannot query field "store*sort_order" on type "StoreConfig". {"exception":"<object> (GraphQL\\Error\\Error(code: 0): Cannot query field \"store_sort*order\" on type \"StoreConfig\". at /var/www/magento/vendor/webonyx/graphql-php/src/Validator/Rules/FieldsOnCorrectType.php:56)"} <] [2021-04-27 08:51:58> main.ERROR: Cannot query field "configurable*thumbnail_source" on type "StoreConfig". {"exception":"<object> (GraphQL\\Error\\Error(code: 0): Cannot query field \"configurable_thumbnail*source\" on type \"StoreConfig\". at /var/www/magento/vendor/webonyx/graphql-php/src/Validator/Rules/FieldsOnCorrectType.php:56)"} <] [2021-04-27 08:51:59> main.ERROR: Cannot query field "store*group_name" on type "StoreConfig". Did you mean "store_name"? {"exception":"<object> (GraphQL\\Error\\Error(code: 0): Cannot query field \"store_group_name\" on type \"StoreConfig\". Did you mean \"store*name\"? at /var/www/magento/vendor/webonyx/graphql-php/src/Validator/Rules/FieldsOnCorrectType.php:56)"} <] [2021-04-27 08:51:59> main.ERROR: Cannot query field "uid" on type "ConfigurableProductOptionsValues". {"exception":"<object> (GraphQL\\Error\\Error(code: 0): Cannot query field \"uid\" on type \"ConfigurableProductOptionsValues\". at /var/www/magento/vendor/webonyx/graphql-php/src/Validator/Rules/FieldsOnCorrectType.php:56)"} <] }}

Please complete the following device information:

  • Device: PC
  • Browser: Chrome 90, Firefox 77
  • Magento Version: Magento Open Source 2.4.1

[![](-- Complete the following sections to help us apply appropriate labels) -->

Please let us know what packages this bug is in regards to:

  • venia-concept
  • venia-ui
  • < > pwa-buildpack
  • < > peregrine
  • < > pwa-devdocs
  • < > upward-js
  • < > upward-spec
  • < > create-pwa

MajorKuprich avatar Apr 27 '21 09:04 MajorKuprich

Hi @MajorKuprich. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar Apr 27 '21 09:04 m2-assistant[bot]

PWA Studio 10.0.0 is only compatible with Magento 2.4.2 source https://github.com/magento/pwa-studio/blob/develop/magento-compatibility.js#L7

fooman avatar Apr 27 '21 20:04 fooman

Thanks for providing that link @fooman.

@MajorKuprich please report back and reopen if you have problems running with 2.4.2

sirugh avatar Apr 27 '21 21:04 sirugh

@sirugh @fooman Thank You for Your help. I don't have permissions to reopen this topic. Anyway problem still persists - 404 on existing category page. Testing with Magento 2.4.2 instance.

  1. Homepage not render some of categories images:

  2. Can't access some of categories (these which not load properly images on homepage):

  3. Configurable/bundle product type out of stock when should be available (related issue https://github.com/magento/pwa-studio/issues/3120):

  4. PWA report:

No errors from Magento side.

MajorKuprich avatar May 02 '21 16:05 MajorKuprich

@magento export issue to JIRA project PWA as Bug

sirugh avatar May 17 '21 21:05 sirugh

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/PWA-1777 is successfully created for this GitHub issue.

github-jira-sync-bot avatar May 17 '21 21:05 github-jira-sync-bot

@MajorKuprich - thank you for the clarification after upgrading to 2.4.2. We've spun a couple internal bugs and stories off of this, and will leave it open to track progress. We primarily work with our own Venia Sample Data, but as you've discovered, the Luma sample data does expose some unsupported features.

  1. We do not support placeholder assets served from the /static directory of the backend and currently don't have a client-side fallback. This is related to the second problem you found, where Categories with no products won't have an image, so it falls back to using the placeholder. This whole Category page is going to see a big refresh, and we've linked this bug to that Epic so we at least render a placeholder image here.
  2. The Men Category in this sample data is configured to render a static block only, which are not yet supported, and the app correctly displays that this Category has no products. Blocks and Widgets are tightly coupled to the Luma frontend, so this paradigm likely to be replaced by PageBuilder content support only. This will also fall into that big Category page refresh.
  3. We currently only support Simple and Configurable products. Bundle/Downloadable/Virtual Product support is on the roadmap, but this behavior is expected for now.

Thanks again for bringing this to our attention. We'll reach out if we have any additional questions.

tjwiebell avatar Jul 12 '21 19:07 tjwiebell

@magento

Describe the bug

Venia doesn't work with base Magento instance 2.4.3-p2

To reproduce

Steps to reproduce the behavior:

  • Install Magento 2.4.3-p2 by composer on server.
  • Install Venia 12.3.0 on local.
  • Set up .env file for PWA (point MAGENTOBACKENDURL param to Magento app).
  • Install metapackage on magento side.
  • Reindex & flush cache from Magento side.
  • Build modules & start storefront server: yarn build && yarn watch:venia.
  • Can't get home page & any product page due to 404 errors.

See screenshot

pwa

JollySandhu avatar May 23 '22 09:05 JollySandhu

Don't forget to enable all needed modules in magento backend. After installation they are usually disabled.

ghost avatar Aug 22 '22 16:08 ghost

@JollySandhu Did you solve the issue?

alvin3206 avatar Mar 21 '23 20:03 alvin3206

Hi @MajorKuprich ,

As per testing, we are not able to reproduce the issue with the latest Magento version - 2.4.6, and Venia version - 13.2.0. PFA for the screenshot: Screenshot 2023-07-26 at 6 55 45 PM

Please let us know if we are missing anything

glo80771 avatar Jul 26 '23 13:07 glo80771

as per process waited more than 2 weeks hence clsoing tikcet since no reply from reporter. please feel free to reopen in case still reproducible or any update required.

glo42707 avatar Sep 13 '23 07:09 glo42707