magento / pwa-studio

🛠Development tools to build, optimize and deploy Progressive Web Applications for Magento 2.
https://developer.adobe.com/commerce/pwa-studio/
Open Software License 3.0
1.06k stars 682 forks source link

Error when getting thumbnails on order row for deleted products #4307

Open vacla opened 1 month ago

vacla commented 1 month ago

Describe the bug

When getting orders with deleted products, it gives an error here: https://github.com/magento/pwa-studio/blob/a3faf3f3a3f05d5627e642f7a3d976e2e0fa56df/packages/peregrine/lib/talons/OrderHistoryPage/orderRow.gql.js#L14

This is the error:

{
    "errors": [
        {
            "message": "Variable \"$urlKeys\" got invalid value [null,null]; Expected non-nullable type String! not to be null at value[0].\n\nVariable \"$urlKeys\" got invalid value [null,null]; Expected non-nullable type String! not to be null at value[1].",
            "extensions": {
                "category": "graphql"
            }
        }
    ]
}

To reproduce

Steps to reproduce the behavior:

  1. Login in account
  2. Place order with 1 product
  3. Delete this product out of magento
  4. Go to order history page
  5. See error in console

Expected behavior

No error

Possible solutions

Make this an optional string: https://github.com/magento/pwa-studio/blob/a3faf3f3a3f05d5627e642f7a3d976e2e0fa56df/packages/peregrine/lib/talons/OrderHistoryPage/orderRow.gql.js#L14

Debug Report

ℹ Inspecting Dependencies Found 9 https://github.com/magento dependencies in yarn.lock @magento/pwa-buildpack @ 11.4.3 @adobe/apollo-link-mutation-queue @ 1.0.2 @magento/babel-preset-peregrine @ 1.2.3 @magento/eslint-config @ 1.5.3 @magento/pagebuilder @ 8.2.1 @magento/peregrine @ 13.2.1 @magento/pwa-theme-venia @ 1.4.0 @magento/venia-adobe-data-layer @ 1.0.0 @magento/venia-ui @ 10.3.0

ℹ Inspecting Magento Backend Not using sample backend. Backend is UP!

ℹ Inspecting System OS: https://github.com/magento/pwa-studio/pull/39-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 21:49:14 UTC 2024 Node Version: v16.20.2 NPM Version: 8.19.4

Please complete the following device information:

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

m2-assistant[bot] commented 1 month ago

Hi @vacla. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information. Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.