reactioncommerce / reaction

Mailchimp Open Commerce is an API-first, headless commerce platform built using Node.js, React, GraphQL. Deployed via Docker and Kubernetes.
https://mailchimp.com/developer/open-commerce/
GNU General Public License v3.0
12.34k stars 2.17k forks source link

Removing product images shows a 410 in console #4051

Closed nnnnat closed 4 years ago

nnnnat commented 6 years ago

Prerequisites

Issue Description

When deleting published product images and republishing a 410 error/warning is shown in the browser console and the images will not be deleted relatively for the customer.

37691099-a85e2ad8-2c6c-11e8-977e-d9ff557d8a6a

Steps to Reproduce

Test this with two browsers open, one as an admin another as a customer to verify published changes make it to the customer catalog

  1. Spin up a fresh RC shop and log in as an Admin
  2. As an admin select, the Basic Reaction Product upload two images to the product then publish.
  3. The green "unpublished" indicators should remove from the admin tow and the images should appear for the customer.
  4. As as admin delete both images from the product and publish. The images should remove from the admin but still be visible for the customer. Check the admin's browser console for the 410 error.

Video of steps http://recordit.co/fqfBEYsiVZ

Notes

This issue doesn't seem to occur every time, also might only be happening in chrome.

Possible Solution

@aldeed mentioned this issue may be coming from a lib we're using for file uploads and how it's caching image URLs in local storage.

Versions

Node: 9.4.0
NPM: 5.6.0
Meteor Node: 8.9.4
Meteor NPM: 5.6.0
Reaction CLI: 0.29.0
Reaction: 1.10.0
Reaction branch: refactor-3994-nnnnat-remove-media-hooks
Docker: 17.12.0-ce
brent-hoover commented 6 years ago

I am also seeing this error on 1.10.0 branch

aldeed commented 4 years ago

This was fixed at some point