Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageProcessor not working with v3.0.1, but working with v2.0.1 #202

Open
christophborndigital opened this issue Oct 14, 2021 · 9 comments

Comments

@christophborndigital
Copy link

We've used this package on a number of projects, and added it to another one a few days ago. It took me a rather long time today to figure out why ImageProcessor wasn't working. After lots of comparing configs and updating Azure packages, I eventually started downgrading packages and found that it worked with v2.0.1.

On 3.0.1, images are still served, but ImageProcessor isn't resizing them. I see the following exceptions in the Umbraco logs:

Exception

Azure.RequestFailedException: Service request failed.

Status: 404 (The specified blob does not exist.)

ErrorCode: BlobNotFound



Headers:
Transfer-Encoding: chunked
x-ms-version: 2020-10-02
x-ms-error-code: BlobNotFound
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0


   at Azure.Storage.Blobs.BlobRestClient.GetProperties(String snapshot, String versionId, Nullable`1 timeout, String leaseId, String encryptionKey, String encryptionKeySha256, Nullable`1 encryptionAlgorithm, Nullable`1 ifModifiedSince, Nullable`1 ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, CancellationToken cancellationToken)

   at Azure.Storage.Blobs.Specialized.BlobBaseClient.<GetPropertiesInternal>d__110.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at Azure.Storage.Blobs.Specialized.BlobBaseClient.GetProperties(BlobRequestConditions conditions, CancellationToken cancellationToken)

   at Our.Umbraco.FileSystemProviders.Azure.AzureFileSystem.GetLastModified(String path)

   at Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem.GetLastModified(String path)

   at Our.Umbraco.FileSystemProviders.Azure.FileSystemVirtualFile.Open()

   at System.Web.HttpResponse.WriteVirtualFile(VirtualFile vf)

   at System.Web.StaticFileHandler.ProcessRequestForNonMapPathBasedVirtualFile(HttpRequest request, HttpResponse response, String overrideVirtualPath)

   at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context, String overrideVirtualPath)

   at System.Web.StaticFileHandler.ProcessRequest(HttpContext context)

   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

and

ImageProcessor.Common.Exceptions.ImageProcessingException: GetResponseAsync 132 : Response status code does not indicate success: 500 (Internal Server Error).

SourceContext: ImageProcessor.Web.Helpers.RemoteFile

ImageProcessor is configured with the CloudImageService settings.

After downgrading to 2.0.1, things work as expected, images are resized and I the requests get redirected to the cache on blob storage.

@callumbwhyte
Copy link
Member

We hit this error also, I've just patched it in PR #205. Hopefully we can get it reviewed and released shortly 🤞

@christophborndigital
Copy link
Author

This seems to be fixed in 3.0.2

@christophborndigital
Copy link
Author

I take it back, this is still an issue on 3.0.2!

@ANT-GBR
Copy link

ANT-GBR commented Dec 22, 2021

This is still broken in 3.0.3-alpha-000527:

{"@t":"2021-12-22T16:36:47.3318509Z","@mt":"Exception","@l":"Error","@x":"ImageProcessor.Common.Exceptions.ImageProcessingException: GetResponseAsync 132 : Response status code does not indicate success: 404 (The specified resource does not exist.).","SourceContext":"ImageProcessor.Web.Helpers.RemoteFile","ProcessId":23608,"ProcessName":"iisexpress","ThreadId":38,"AppDomainId":11,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"TONYSURFACE7","Log4NetLevel":"ERROR"}
{"@t":"2021-12-22T16:36:47.3318509Z","@mt":"Exception","@l":"Error","@x":"ImageProcessor.Common.Exceptions.ImageProcessingException: ProcessImageAsync 609 : No image exists at https://xxx.blob.core.windows.net/media/wwvgtvzj/639a5126-bw.jpg","SourceContext":"ImageProcessor.Web.HttpModules.ImageProcessingModule","ProcessId":23608,"ProcessName":"iisexpress","ThreadId":38,"AppDomainId":11,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"TONYSURFACE7","Log4NetLevel":"ERROR"}

Downgrading packages back to v2.0.1 doesn't seem to fix it either.

@christophborndigital
Copy link
Author

@ANT-GBR if downgrading doesn't fix it, you may have some other configuration issue. Downgrading worked consistently for us, both after trying 3.0.1 and 3.0.2.

@ANT-GBR
Copy link

ANT-GBR commented Dec 23, 2021

Thanks for the feedback Christoph.

After some more digging I discovered that the media container was set to private even though the setting 'Blob public access' was set to Enabled. This default set up in Azure must have changed recently.
So the issue is fixed in 3.0.2.

@bobo1002123
Copy link

bobo1002123 commented Apr 30, 2022

Hi all, does anyone have a fix for these log errors (now into the thousands)? Images are showing up as intended. v8 umbraco with 3.0.2 installed. ImageProcessor.Common.Exceptions.ImageProcessingException: GetResponseAsync 132 : Response status code does not indicate success: 404 (The specified resource does not exist.).
Storage account is set to enabled from all networks under firewall and virtual networks and media container is set to blob and shared access signature is set to read permissions. No issue with localhost.

UPDATE Fixed by removing the web.config in the media container. Not sure why that worked. However, now dealing with: ImageProcessor.Common.Exceptions.ImageProcessingException: GetResponseAsync 132 : Response status code does not indicate success: 404 (The specified blob does not exist.).

@christophborndigital
Copy link
Author

Images are showing up as intended

Are you sure? For us, the images were served, but weren't being resized. We stayed on 2.0.1

@bobo1002123
Copy link

The images work correctly and can be viewed on the site (back office as well), but I am being bet with this new error ImageProcessor.Common.Exceptions.ImageProcessingException: GetResponseAsync 132 : Response status code does not indicate success: 404 (The specified blob does not exist.) This is occurring on a newer installation of umbraco v8.18.0 running 3.0.2. The media container exists in the blob. No cache folder exists; not sure if that's correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants