Will not load Images in iOS - works perfect in Android
🐛 Bug Report
It looks as if in iOS only, there are extra query strings/parameters being added to the URL I specify for the image
As you can see, your debug is reporting that it is trying to load: https://sportsopsstorage.blob.core.windows.net/comegowithme/cliques/icons/0b89a9cd-894f-45f3-b959-2cec8526b0aa_Thumbnail.jpg;CircleTransformation,borderSize=0,borderHexColor=
When it should be:https://sportsopsstorage.blob.core.windows.net/comegowithme/cliques/icons/0b89a9cd-894f-45f3-b959-2cec8526b0aa_Thumbnail.jpg
";CircleTransformation,borderSize=0,borderHexColor=" is being added to the end of every URL.
Crash Log: 2020-10-17 07:09:06.006 Xamarin.PreBuilt.iOS[3472:1894540] Image loading failed: https://sportsopsstorage.blob.core.windows.net/comegowithme/cliques/icons/0b89a9cd-894f-45f3-b959-2cec8526b0aa_Thumbnail.jpg;CircleTransformation,borderSize=0,borderHexColor= FFImageLoading.Exceptions.DownloadException: Zero length stream at FFImageLoading.Cache.DownloadCache.DownloadAsync (System.String url, System.Threading.CancellationToken token, System.Net.Http.HttpClient client, FFImageLoading.Work.TaskParameter parameters, FFImageLoading.DownloadInformation downloadInformation) [0x006bd] in C:\projects\ffimageloading\source\FFImageLoading.Common\Cache\DownloadCache.cs:174 at FFImageLoading.Cache.DownloadCache+<>c__DisplayClass15_0.<DownloadAndCacheIfNeededAsync>b__0 () [0x00050] in C:\projects\ffimageloading\source\FFImageLoading.Common\Cache\DownloadCache.cs:58 at FFIma \projects\ffimageloading\source\FFImageLoading.Common\DataResolvers\WrappedDataResolver.cs:21 at FFImageLoading.Work.ImageLoaderTask`3[TDecoderContainer,TImageContainer,TImageView].RunAsync () [0x00300] in C:\projects\ffimageloading\source\FFImageLoading.Common\Work\ImageLoaderTask.cs:618
geLoading.Retry.DoAsync[T] (System.Func`1[TResult] action, System.TimeSpan retryInterval, System.Int32 retryCount, System.Action onRetry) [0x000b2] in C:\projects\ffimageloading\source\FFImageLoading.Common\Helpers\Retry.cs:24 at FFImageLoading.Cache.DownloadCache.DownloadAndCacheIfNeededAsync (System.String url, FFImageLoading.Work.TaskParameter parameters, FFImageLoading.Config.Configuration configuration, System.Threading.CancellationToken token) [0x00401] in C:\projects\ffimageloading\source\FFImageLoading.Common\Cache\DownloadCache.cs:57 at FFImageLoading.DataResolvers.UrlDataResolver.Resolve (System.String identifier, FFImageLoading.Work.TaskParameter parameters, System.Threading.CancellationToken token) [0x00045] in C:\projects\ffimageloading\source\FFImageLoading.Common\DataResolvers\UrlDataResolver.cs:22 at FFImageLoading.DataResolvers.WrappedDataResolver.Resolve (System.String identifier, FFImageLoading.Work.TaskParameter parameters, System.Threading.CancellationToken token) [0x0004e] in C:
Expected behavior
It should load the image from my Azure Storage
Reproduction steps
Simply create a Xamarin Forms project and run on iOS
Configuration
Windows Visual Studio 2019 Xamarin Forms 5.0/0/1558 Pre Release Version: 2.4.11.982
Platform:
- [x ] :iphone: iOS
- [ ] :robot: Android
- [ ] :checkered_flag: WPF
- [ ] :earth_americas: UWP
- [ ] :apple: MacOS
- [ ] :tv: tvOS
- [ ] :monkey: Xamarin.Forms
BTW, if I set DownsampleToViewSize to TRUE it also adds the size parameter to the URL. It does not appear to be happening for Android....just iOS
Downgraded to latest XF 4.8 and it works. So seems like it is just an issue with the new XF 5.x Prerelease.
Fixed by downgrading XF to 4.8
Sorry, now it is quit working again. Still cannot see images in iOS because it is corrupting the URL with extra parameters and query strings. I thought it was because of XF 5.x Prerelease but this is now happening in XF 4.8
Any suggestions on where I should look? Is no one else having issues with iOS? No matter what I try, it simple fails with a Zero Length stream.
I tried to download the source and add to my code but you have some compile bugs in your GifHelperBase.cs that is causing the current Master branch not to compile. "_previousImage" is of a type that !+ cannot be applied to default. So I commented that all our since I dont use GIFs anyway but I still cannot get your Samples to compile.
Hello?
Having the same issue here on iOS , works perfectly on android though
Having the same exact issue:
Xamarin.PreBuilt.iOS[18834:3798381] Image loading failed: https://coconapp.blob.core.windows.net/company-1/Assets/Logo.jpg;CircleTransformation,borderSize=20,borderHexColor=#07ADD3 FFImageLoading.Exceptions.DownloadException: Zero length stream
Xamarin.Forms version 4.8.0.1687 with Hot Reload enabled. Haven't tried any other version though..
Just a quick note, found out this happens only while using the xam hot reload. It does not happen on production builds, so I'm guessing it's a problem with the hot reload. In fact, there are other libraries who also don't play along well with hot reload at the moment...
I'm having this issue with release builds on iOS. With Android and debug iOS builds all is good. Although the crash report shows
Image loading failed: https://xafaxpaymentapi20190520.azurewebsites.net/api/v3/locations/149/image;CircleTransformation,borderSize=0,borderHexColor= FFImageLoading.Exceptions.DownloadException: Zero length stream at FFImageLoading.Cache.DownloadCache.DownloadAsync (System.String url, System.Threading.CancellationToken token, System.Net.Http.HttpClient client, FFImageLoading.Work.TaskParameter parameters, FFImageLoading.DownloadInformation downloadInformation) [0x006bd] in C:\projects\ffimageloading\source\FFImageLoading.Common\Cache\DownloadCache.cs:174 at FFImageLoading.Cache.DownloadCache+<>c__DisplayClass15_0.<DownloadAndCacheIfNeededAsync>b__0 () [0x00050] in C:\projects\ffimageloading\source\FFImageLoading.Common\Cache\DownloadCache.cs:58 at FFImageLoading.Retry.DoAsync[T] (System.Func`1[TResult] action, System.TimeSpan retryInterval, System.Int32 retryCount, System.Action onRetry) [0x000b2] in C:\projects\ffimageloading\source\FFImageLoading.Common\Helpers\Retry.cs:24 at FFImag<…>
When I check on the server I can see that the request was made to the correct address. There is no appending of the ';CircleTransformation,borderSize=0,borderHexColor=' to the request. I guess this is just added to the crash report.