HotcakesCommerce / hotcakes-commerce-core

The core of the e-commerce part of the overall solution. This is an ecommerce shopping cart solution built on top of the DNN (DotNetNuke) CMS. Anyone can do commerce online now!
https://mmmcommerce.com
MIT License
69 stars 55 forks source link

SI: Azure VM Environment Fails to Add Product Images #232

Closed WillStrohl closed 4 years ago

WillStrohl commented 4 years ago

Describe the bug

It's not 100% certain if this is only limited to Microsoft Azure, but this is the only known environment where this is occurring. It's not "traditional" Azure either at the moment, but in Azure VMs.

When you upload a primary product image, the requisite folder is created. What's supposed to happen next is this:

  1. Create a small child folder in the same product folder.
  2. Add a dynamically-created small image to that folder with the same file name as the original image.
  3. Create a medium child folder in the same product folder.
  4. Add a dynamically-created medium image to that folder with the same file name as the original image.

Instead of those steps occurring, the process does not proceed past Step 1. Instead, a suppressed "file already exists" error occurs. This also happens when uploading images in the variants view and when importing images using the XLS import feature.

Reported Software Versions

To Reproduce

Steps to reproduce the behavior:

  1. Install DNN & HCC in an Azure VM environment.
  2. Create a product.
  3. Upload a product image to the product.
  4. Click save.

Expected behavior

The primary image is uploaded and save, and the small and medium folders are each created with their respective image saved to each folder. The respective images are seen in their respective contexts and views.

Actual behavior

The primary image is saved and the small folder is created. Nothing else occurs and the UI doesn't even show the primary image. The other images are not saved and the medium folder is never created. A suppressed error occurs about the file already existing.

System.ArgumentException: 
Unable to create temporary file: {0}The file exists. at Hotcakes.Web.TempFiles.GetTemporaryFileInfo() 
at Hotcakes.Web.Images.ShrinkImageFileOnDisk(String originalFile, String newFileName, Int32 maxWidth, Int32 maxHeight) 
at Hotcakes.Commerce.Utilities.ImageProcessing.ShrinkImage(String originalFile, String outputDirectory, Int32 maxWidth, Int32 maxHeight)
WillStrohl commented 4 years ago

I just created a VM in Azure that matched these specs and attempted to duplicate the issue and could not. This must be an environmental issue.