-
Notifications
You must be signed in to change notification settings - Fork 14
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
Image cropper doesn't seem to work on MAUI iOS #390
Comments
Hi @MarkUngvari just try to not update Src property manually, just use appropriate method for that: https://cropperblazor.github.io/examples/replacing#simple-usage |
I am facing the same issue. When initializing the Src property with a base64-formatted string the image loads, but in a zoomed-in and non-interactable state. It works perfectly on Android and Windows, the problem seems to be related to iOS devices. Moreover, I also figured out that "GetImageDataAsync" task never returns, as described by @MarkUngvari. We are also using .NET 8 and the latest package version in a .NET MAUI Blazor hybrid app. Cheers, Manuel |
I'm seeing a similiar issue on iOS blazor hybrid / dotnet 9. If I provide an image source of a blob via the component Src property it renders the picture on the screen without any of the crop grid appearing so you can't really do anything. Then on that same image if I call await GetCroppedCanvasAsync() it just never returns / hangs indefintely. If I use ReplaceAsync to populate the Src instead of setting it manually as indicated above then the call to ReplaceAsync just hangs indefinitely and the image never loads. Strangely enough I thought this was working initially, It was very slow to load an image using GetImageUsingStreamingAsync but it did eventually load and let me crop and save it. However I decided to try change how I load the image to make it faster (using native file read instead of IBrowserFile, which is WAY faster) and now nothing works. Doesn't even work if I got back to the original setup I can't make it work again. Edit: I pulled the repo and compiled from source in the debug configuration just to see if it would reveal an exception or something, but it worked just fine. On my first try on iOS 18.3 in blazor hybrid / MAUI it pulled up the image and showed the correct cropping screen and was fully functional and then successfuly saved it out as a .webp image. Not sure why it is working to be honest, but i'll play around with it some more. |
Describe the bug
When I try to call the
await cropperComponent!.GetImageUsingStreamingAsync(imageFile, imageFile.Size);
in MAUI iOS it seems to hang forever without any meaningful error messages to be seen anywhere. The weird thing is it works on the regular Blazor app (I have two projects, a regular Blazor and a Blazor MAUI hybrid), it works on android, and it works on the windows app version, but it fails on iOS both on a device and on a simulator.The weird thing is that it used to work without any problem in the past and it popped up recently. I believe I updated both to .NET 8 and updated the package as well.
To Reproduce
Expected behavior
I expected the async method to eventually return but after 5 minutes I didn't wait any longer.
Smartphone:
Additional context
When I construct my own data URL via streams and attept to update the Src property of the cropper then it loads the picture but in a semi unloaded state. It squishes the picture, doesn't diplay the cropper itself, can't be interacted with and can't export the image itself so it just gets stuck.
Thank you for this amazing package by the way and for your time if you are able to look into this. 😄
Cheers,
Mark
The text was updated successfully, but these errors were encountered: