Xamarin.forms: ImageLoaderSourceHandler: Could not retrieve image or image data was invalid: Uri

Created on 30 Sep 2019  Â·  40Comments  Â·  Source: xamarin/Xamarin.Forms

Description

Image does not load
It was allegedly fixed in
https://github.com/xamarin/Xamarin.Forms/issues/5172 7248

but latest comment there

Steps to Reproduce

  1. Download project from
    https://docs.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/workingwithimages/

  2. update to latest xamarin forms

  3. Launch android and you will get in output
    ImageLoaderSourceHandler: Could not retrieve image or image data was invalid: Uri: https://aka.ms/campus.jpg

Expected Behavior

Load the image

Actual Behavior

Does not show image

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE: Visual studio 2019 16.3.1
  • Platform Target Frameworks: XF 4.2.0.815419

    • Android: Android 9.0

Screenshots

Reproduction Link

2 Android bug

Most helpful comment

Got the same issue here. Its been working til maybe 1-2 weeks back and we havnt touch this code in a long time. Its still working on iOS but not on Android.
Running latest Xamarin.Forms build 4.2.0.848062 and android.support 28.0.0.3.
IDE: Visual Studio for Mac Pro 8.3.2 and Visual Studio Pro 2019 16.3.2 (windows).

I tested the example project https://docs.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/workingwithimages/ and installing the pre1-3 release of Xamarin.forms 4.3.0.8XXX solved it for this project, but it didnt on my own project.
I have tested the suggested solutions from this thread in my own solution and with a standard Image element with url source (same as the example solution from MS), nothing seems to work.

All 40 comments

@developer9969 we recently fixed an issue with this that should be in the release you mentioned

I tested that sample on an Samsung S9 (API 28) and API 25 Simulator and in both cases it worked for me

Can you make sure the device has internet connectivity? Can you try updating to the latest 4.3 pre? or try the latest nightly builds?

https://github.com/xamarin/Xamarin.Forms/wiki/Nightly-Builds

@PureWeen thanks for your prompt reply. just tried now on emulator.Will try on device as soon as get home, but at work I tried on s9 and sony and did not work. Does work in iOS emulator and device.

Tried latest xamarin and prerelease 4.3 and nothing.. I get the following ,below is just a section.
I definetely have internet! Did not try nightly build.

image

Thread started: #4
Thread started: #5
Thread started: #6
09-30 18:58:20.052 D/Mono ( 7470): Loading reference 9 of /storage/emulated/0/Android/data/com.YourCompany.WorkingWithImages/files/.__override__/Xamarin.Android.Support.Fragment.dll asmctx DEFAULT, looking for Xamarin.Android.Support.ViewPager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
09-30 18:58:20.052 D/Mono ( 7470): Assembly Ref addref Xamarin.Android.Support.Fragment[0xf1c42c80] -> Xamarin.Android.Support.ViewPager[0xf1c437c0]: 4
09-30 18:58:20.141 D/Mono ( 7470): DllImport searching in: '__Internal' ('(null)').
09-30 18:58:20.141 D/Mono ( 7470): Searching for 'java_interop_jnienv_call_static_int_method_a'.
09-30 18:58:20.141 D/Mono ( 7470): Probing 'java_interop_jnienv_call_static_int_method_a'.
09-30 18:58:20.142 D/Mono ( 7470): Found as 'java_interop_jnienv_call_static_int_method_a'.
09-30 18:58:20.170 D/Mono ( 7470): DllImport searching in: '__Internal' ('(null)').
09-30 18:58:20.170 D/Mono ( 7470): Searching for 'java_interop_jnienv_new_string'.
09-30 18:58:20.171 D/Mono ( 7470): Probing 'java_interop_jnienv_new_string'.
09-30 18:58:20.171 D/Mono ( 7470): Found as 'java_interop_jnienv_new_string'.
09-30 18:58:20.179 D/Mono ( 7470): DllImport searching in: '__Internal' ('(null)').
09-30 18:58:20.179 D/Mono ( 7470): Searching for 'java_interop_jnienv_new_local_ref'.
09-30 18:58:20.179 D/Mono ( 7470): Probing 'java_interop_jnienv_new_local_ref'.
09-30 18:58:20.179 D/Mono ( 7470): Found as 'java_interop_jnienv_new_local_ref'.
09-30 18:58:20.207 D/Mono ( 7470): Loading reference 6 of Mono.Android.dll asmctx DEFAULT, looking for System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
09-30 18:58:20.207 D/Mono ( 7470): Assembly Ref addref Mono.Android[0xf1c43b80] -> System.Xml[0xd1e1f6c0]: 3
09-30 18:58:20.214 D/Mono ( 7470): Loading reference 10 of netstandard.dll asmctx DEFAULT, looking for System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
09-30 18:58:20.214 D/Mono ( 7470): Image addref System.Runtime.Serialization[0xd1e21520] (asmctx DEFAULT) -> System.Runtime.Serialization.dll[0xd1e26d00]: 2
09-30 18:58:20.215 D/Mono ( 7470): Prepared to set up assembly 'System.Runtime.Serialization' (System.Runtime.Serialization.dll)
09-30 18:58:20.215 D/Mono ( 7470): Assembly System.Runtime.Serialization[0xd1e21520] added to domain RootDomain, ref_count=1
09-30 18:58:20.223 D/Mono ( 7470): AOT: image 'System.Runtime.Serialization.dll.so' not found: dlopen failed: library "System.Runtime.Serialization.dll.so" not found
09-30 18:58:20.224 D/Mono ( 7470): AOT: image '/Users/builder/jenkins/workspace/archive-mono/2019-06/android/release/sdks/out/android-x86-release/lib/mono/aot-cache/x86/System.Runtime.Serialization.dll.so' not found: (null)
09-30 18:58:20.224 D/Mono ( 7470): Config attempting to parse: 'System.Runtime.Serialization.dll.config'.
09-30 18:58:20.224 D/Mono ( 7470): Config attempting to parse: '/Users/builder/jenkins/workspace/archive-mono/2019-06/android/release/sdks/out/android-x86-release/etc/mono/assemblies/System.Runtime.Serialization/System.Runtime.Serialization.config'.
09-30 18:58:20.224 D/Mono ( 7470): Assembly Ref addref netstandard[0xebd87e80] -> System.Runtime.Serialization[0xd1e21520]: 2
09-30 18:58:20.224 D/Mono ( 7470): Loading reference 0 of System.Runtime.Serialization.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
09-30 18:58:20.224 D/Mono ( 7470): Assembly Ref addref System.Runtime.Serialization[0xd1e21520] -> mscorlib[0xf1c41ae0]: 51
Loaded assembly: System.Runtime.Serialization.dll [External]
09-30 18:58:20.320 D/Mono ( 7470): Loading reference 8 of /storage/emulated/0/Android/data/com.YourCompany.WorkingWithImages/files/.__override__/Xamarin.Forms.Platform.Android.dll asmctx DEFAULT, looking for Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
09-30 18:58:20.320 D/Mono ( 7470): Assembly Ref addref Xamarin.Forms.Platform.Android[0xf1c43940] -> Xamarin.Android.Support.Compat[0xf1c42500]: 5
09-30 18:58:20.321 D/Mono ( 7470): Loading reference 2 of /storage/emulated/0/Android/data/com.YourCompany.WorkingWithImages/files/.__override__/Xamarin.Android.Support.Compat.dll asmctx DEFAULT, looking for Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
09-30 18:58:20.321 D/Mono ( 7470): Assembly Ref addref Xamarin.Android.Support.Compat[0xf1c42500] -> Java.Interop[0xf1c43be0]: 10
[HotReload] (2019-09-30 18:58:17.0): INFO: HotReload: Initialized Agent.
[HotReload] (2019-09-30 18:58:21.1): INFO: Hot Reload Connected and Ready.
09-30 18:58:20.390 D/Mono ( 7470): DllImport searching in: '__Internal' ('(null)').
09-30 18:58:20.390 D/Mono ( 7470): Searching for 'java_interop_jnienv_call_nonvirtual_boolean_method_a'.
09-30 18:58:20.390 D/Mono ( 7470): Probing 'java_interop_jnienv_call_nonvirtual_boolean_method_a'.
09-30 18:58:20.390 D/Mono ( 7470): Found as 'java_interop_jnienv_call_nonvirtual_boolean_method_a'.
09-30 18:58:20.435 D/OpenGLRenderer( 7470): Skia GL Pipeline
09-30 18:58:20.544 D/Mono ( 7470): DllImport searching in: '__Internal' ('(null)').
09-30 18:58:20.544 D/Mono ( 7470): Searching for 'java_interop_jnienv_call_nonvirtual_int_method_a'.
09-30 18:58:20.544 D/Mono ( 7470): Probing 'java_interop_jnienv_call_nonvirtual_int_method_a'.
09-30 18:58:20.544 D/Mono ( 7470): Found as 'java_interop_jnienv_call_nonvirtual_int_method_a'.
09-30 18:58:20.580 D/ ( 7470): HostConnection::get() New Host Connection established 0xd155a5c0, tid 7508
09-30 18:58:20.587 I/ConfigStore( 7470): android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
09-30 18:58:20.587 I/ConfigStore( 7470): android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
09-30 18:58:20.587 I/OpenGLRenderer( 7470): Initialized EGL, version 1.4
09-30 18:58:20.587 D/OpenGLRenderer( 7470): Swap behavior 1
09-30 18:58:20.588 W/OpenGLRenderer( 7470): Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
09-30 18:58:20.588 D/OpenGLRenderer( 7470): Swap behavior 0
09-30 18:58:20.608 D/EGL_emulation( 7470): eglCreateContext: 0xd24eeca0: maj 3 min 0 rcv 3
09-30 18:58:20.669 D/EGL_emulation( 7470): eglMakeCurrent: 0xd24eeca0: ver 3 0 (tinfo 0xd241a400)
09-30 18:58:20.795 D/Mono ( 7470): Loading reference 7 of /storage/emulated/0/Android/data/com.YourCompany.WorkingWithImages/files/.__override__/Xamarin.Android.Support.Fragment.dll asmctx DEFAULT, looking for Xamarin.Android.Arch.Lifecycle.LiveData.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
09-30 18:58:20.795 D/Mono ( 7470): Assembly Ref addref Xamarin.Android.Support.Fragment[0xf1c42c80] -> Xamarin.Android.Arch.Lifecycle.LiveData.Core[0xf1c41f00]: 2
09-30 18:58:21.146 D/Mono ( 7470): DllImport searching in: '__Internal' ('(null)').
09-30 18:58:21.146 D/Mono ( 7470): Searching for 'java_interop_jnienv_call_nonvirtual_float_method_a'.
09-30 18:58:21.146 D/Mono ( 7470): Probing 'java_interop_jnienv_call_nonvirtual_float_method_a'.
09-30 18:58:21.146 D/Mono ( 7470): Found as 'java_interop_jnienv_call_nonvirtual_float_method_a'.
09-30 18:58:21.276 D/Mono ( 7470): DllImport searching in: '__Internal' ('(null)').
09-30 18:58:21.276 D/Mono ( 7470): Searching for 'java_interop_jnienv_get_static_object_field'.
09-30 18:58:21.276 D/Mono ( 7470): Probing 'java_interop_jnienv_get_static_object_field'.
09-30 18:58:21.276 D/Mono ( 7470): Found as 'java_interop_jnienv_get_static_object_field'.
09-30 18:58:21.635 D/Mono ( 7470): DllImport searching in: '__Internal' ('(null)').
09-30 18:58:21.636 D/Mono ( 7470): Searching for 'java_interop_jnienv_is_assignable_from'.
09-30 18:58:21.636 D/Mono ( 7470): Probing 'java_interop_jnienv_is_assignable_from'.
09-30 18:58:21.636 D/Mono ( 7470): Found as 'java_interop_jnienv_is_assignable_from'.
09-30 18:58:21.641 D/Mono ( 7470): DllImport searching in: '__Internal' ('(null)').
09-30 18:58:21.641 D/Mono ( 7470): Searching for 'java_interop_jnienv_get_byte_array_region'.
09-30 18:58:21.641 D/Mono ( 7470): Probing 'java_interop_jnienv_get_byte_array_region'.
09-30 18:58:21.641 D/Mono ( 7470): Found as 'java_interop_jnienv_get_byte_array_region'.
09-30 18:58:21.649 D/Mono ( 7470): DllImport searching in: '__Internal' ('(null)').
09-30 18:58:21.649 D/Mono ( 7470): Searching for 'java_interop_jnienv_set_byte_array_region'.
09-30 18:58:21.649 D/Mono ( 7470): Probing 'java_interop_jnienv_set_byte_array_region'.
09-30 18:58:21.649 D/Mono ( 7470): Found as 'java_interop_jnienv_set_byte_array_region'.
09-30 18:58:21.652 D/skia ( 7470): --- Failed to create image decoder with message 'unimplemented'
[0:] ImageLoaderSourceHandler: Could not retrieve image or image data was invalid: Uri: https://aka.ms/campus.jpg
Thread started: #7
09-30 18:58:21.888 D/EGL_emulation( 7470): eglMakeCurrent: 0xd24eeca0: ver 3 0 (tinfo 0xd241a400)
09-30 18:58:22.001 D/skia ( 7470): --- Failed to create image decoder with message 'unimplemented'
[0:] ImageLoaderSourceHandler: Could not retrieve image or image data was invalid: Uri: https://aka.ms/campus.jpg
09-30 18:58:26.211 D/Mono ( 7470): DllImport searching in: '__Internal' ('(null)').
09-30 18:58:26.211 D/Mono ( 7470): Searching for 'java_interop_jnienv_call_float_method_a'.
09-30 18:58:26.211 D/Mono ( 7470): Probing 'java_interop_jnienv_call_float_method_a'.
09-30 18:58:26.211 D/Mono ( 7470): Found as 'java_interop_jnienv_call_float_method_a'.

same problem here

@ddo88 @developer9969 I realize this one is as simple as downloaded that sample :-) But can you zip up your projects anyway and attach just so I can verify

@ddo88 @developer9969 can you also

  • make sure all your android sdk tools are updated?
  • factory reset the simulator device
  • if you're releases to a physical device uninstall the app and mono shared runtime
  • test with a release build?

@PureWeen Hi good news! I have done a factory reset on the simulator device and works with the latest stable. I cannot try the device as I need to be connected to the machine at work.
I should have done it before I usually do once a day..Sorry for wasting your time!.

Now I will have the issue of how to build using the android 28.0.0.3 on those azure pipelines all those agents are outdated and crashes the build. grrr.

Nightly build not working for me either

same issue here using xamarin.forms 4.2.0.778463, but with the latest version of xamarin forms 4.2.0.815419 and android support 28.0.0.3, it's working fine

@PureWeen Hello, Shane!
After the update for the lastest prerelease 4.3.0.819712-pre2, do the factory reset, uninstalled the last version and tested with the release build. It's working fine!
I did the same test in a Pixel 3 and works well.
For these tests, I've used the Xaminals sample.
Thank you!

For anyone else running into this issue can you try any of the following

  • just uninstall the app
  • turn caching off on the URIImageSource (there's a bug where if it was retrieved wrong in the previous version it'll return the wrong cached version in the new one)

I'm having this issue as well. I upgraded from XF4.1 to 4.2 latest and got "System.ArgumentException: An element with the same key already exists in NameScope Parameter name: name" on various forms. Downgrading to XF4.1 solved that issue, but I couldn't get rid of the image problem.
The image not showing problem changed from Factory being null in 4.2 to stream closed in 4.1. I upgraded to VS2019 16.3 this week.

With 4.1.0.673156 I get this with VS2019, 16.3.1:

10-04 20:53:28.492 D/skia (12559): --- SkAndroidCodec::NewFromStream returned null
[0:] ImageLoaderSourceHandler: Could not retrieve image or image data was invalid: Uri: https://**

Of course the url was not **, but a valid url which has access to a jpeg image. With 4.1.778454 I get the stream closed exception. With 4.2.848062 I also get no picture. When I do a direct HttpClient.Get in that same Xamarin Page, the picture will be downloaded properly. It just doesn't work via XAML markup. I'm stuck because of the other NameScope issue as well.

I see that the Android GetStreamAsync in https://github.com/xamarin/Xamarin.Forms/blob/151bdb5ebfd0cfbcad0aa10d6327ff79e534fda5/Xamarin.Forms.Platform.Android/Forms.cs is newing up an HttpClient for every image:

public async Task<Stream> GetStreamAsync(Uri uri, CancellationToken cancellationToken)
{
    using (var client = new HttpClient())               
    {
        HttpResponseMessage response = await client.GetAsync(uri, cancellationToken).ConfigureAwait(false);
        if (!response.IsSuccessStatusCode)
        {
            Internals.Log.Warning("HTTP Request", $"Could not retrieve {uri}, status code {response.StatusCode}");
            return null;
        }

        // the HttpResponseMessage needs to be disposed of after the calling code is done with the stream 
        // otherwise the stream may get disposed before the caller can use it
        return new StreamWrapper(await response.Content.ReadAsStreamAsync().ConfigureAwait(false), response);                   
    }
}

As far as I know disposing HttpClient results in unreliable behavior. See also https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests.

#7751 (comment)

7764

I did uninstall the app, uninstalled the runtime as well. No luck.

https://github.com/xamarin/Xamarin.Forms/pull/7764
If you still have the issue after

@theo-albers

And disabling caching on the UriImage Source doesn't fix it then can you attach a repro?

https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests

As a first issue, while this class is disposable, using it with the using statement is not the best choice because even when you dispose HttpClient object, the underlying socket is not immediately released and can cause a serious issue named ‘sockets exhaustion’.

I don't think that would cause a single request to a single image to fail

I agree a HttpClientFactory would be a good idea but I don't think it's related to this issue

7764

If you still have the issue after
@theo-albers
And disabling caching on the UriImage Source doesn't fix it then can you attach a repro?

Disabling the cache didn't help. I installed the APK of the release build and that works fine. So I guess it's VS 16.3 related? I will have another look later this week.

https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests

As a first issue, while this class is disposable, using it with the using statement is not the best choice because even when you dispose HttpClient object, the underlying socket is not immediately released and can cause a serious issue named ‘sockets exhaustion’.

I don't think that would cause a single request to a single image to fail
I agree a HttpClientFactory would be a good idea but I don't think it's related to this issue

It's more if you have other HTTP requests in your App, it could go wrong, randomly, right?

So I guess it's VS 16.3 related?

Possibly. There are a few Task/HttpClient Mono Issues that will be part of some upcoming builds that I'm hoping help this out a bit

In the mean time @theo-albers here's the nuget from the PR I referenced above. If you could test this out and let me know what it does for you that would be awesome!!

nuget.zip

In the mean time @theo-albers here's the nuget from the PR I referenced above. If you could test this out and let me know what it does for you that would be awesome!!
nuget.zip

Hi @PureWeen I just tested the attached package and that solved the problem: I can see the downloaded picture. Since this was a low package version, I had to remove some other dependencies, but these were not related to this part of the app.

Still it makes me wonder how to move forward, since I'm having this problem as well when I switch to the latest release of the Xamarin Forms 4.2 package, in case the image download would be fixed: https://github.com/xamarin/Xamarin.Forms/issues/7833, "System.ArgumentException: An element with the same key already exists in NameScope
Parameter name: name". It puzzles me why some pages suddenly suffer from this problem in the latest version.

@theo-albers I've merged https://github.com/xamarin/Xamarin.Forms/pull/7764 so it'll be apart of the next release cycles

If #7833 is causing you issues and you feel there's a bug there can you leave a comment and a repro on that issue?

I've encountered this issue now:

10-08 15:20:14.572 D/skia    ( 3036): --- Failed to create image decoder with message 'unimplemented'
[0:] ImageLoaderSourceHandler: Could not retrieve image or image data was invalid: Uri: https://aware.vismaretail.no/item-images/FruitVegetables.jpg

Got the same issue here. Its been working til maybe 1-2 weeks back and we havnt touch this code in a long time. Its still working on iOS but not on Android.
Running latest Xamarin.Forms build 4.2.0.848062 and android.support 28.0.0.3.
IDE: Visual Studio for Mac Pro 8.3.2 and Visual Studio Pro 2019 16.3.2 (windows).

I tested the example project https://docs.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/workingwithimages/ and installing the pre1-3 release of Xamarin.forms 4.3.0.8XXX solved it for this project, but it didnt on my own project.
I have tested the suggested solutions from this thread in my own solution and with a standard Image element with url source (same as the example solution from MS), nothing seems to work.

it's definitely 16.3 upgrade related - it broke an old xamarin forms 3.6 pcl project and we had to use an old installation of VS to build the apk to get it to work.

Same issue here. An App I have used for the past 6 months with no code changes just stopped working yesterday out of nowhere. Identical issue as reported here. Android/Xamarin App

I replaced UriImageSource with StreamImageSource which works but of course that removes caching.

I have this issue with latest VS for Windows (16.3.4) and VS for Mac (8.3.3 build 8).

Upgrading XF version from 4.1.0.673156 to latest XF (4.2.0.848062 at the time) fixed the issue.

I suffered this issue too... and wow, having running a Xamarin project for many years now, I thought Xamarin was updating always via Visual Studio updates. Completely didn't realise there would be Nuget packages to make sure are up to date too...

As per @SachinCS1992 said, updating to 4.2.0.848062 today worked for me too.

Same issue for me in:

  • VS2019 (16.3.5)
  • Xamarin Android SDK 10.0.3.0
  • target Android version 9.0
  • Xamarin Forms 3.6.0.709228 (android support library 28.0.0.1, tested even with 28.0.0.3)

My woraround is to open the same solution with VS2017 (15.9.5) and all works as expected

closed by #7764

I recently encountered this issue where image can't be loaded. what I did was

  1. Update Xamarin forms and all components to latest stable version.
  2. Uninstalled the app and build it install it again. (both device and imulator shows image)
  3. Make sure when you are using ImageSource FromUri make it "https://..." and not "http://..." (I think because of security issue that http could not be loaded)

I hope this helps. It did solved my problem.

Workaround that @REDECODE suggested to use Visual Studio 2017 worked for me. Hours and hours wasted on this and it is not feasible for me to upgrade to Xamarin Forms 4 to get this bug fix as I am on Xamarin Forms 3.6.0.639721. Would be nice for this to get fixed in Xamarin Forms 3.6 and VS 2019.

@jhadz81

it is not feasible for me to upgrade to Xamarin Forms 4

Why?

Would be nice for this to get fixed in Xamarin Forms 3.6 and VS 2019.

Are you on the latest version of VS 2019? I was thinking they fixed this in the latest release of Mono

Why?

Because I have a bunch of dependencies on NuGet packages that have not been upgraded to support Forms 4 and the client isn't going to pay me to rip out Forms 3, replace it with Forms 4, and find alternates to those packages that work with 4. Plus there is no reason that this shouldn't work in Forms 3. Not Forms 3 it old and unsupported.

I am on 16.3.7 and it looks like .10 is out. I'll try updating. Thanks.

Because I have a bunch of dependencies on NuGet packages that have not been upgraded to support Forms 4

What packages? We don't really use semantic versioning. The 3 to 4 doesn't really mean that it's breaking and all related packages have to also be on 4.

For the most part any packages you have compiled for 3 should work for 4.

If just updating to the latest XF 4 totally breaks your application then I would be curious as to why because it might be something we need to fix.

Ideally your upgrade from v3 to v4 should be seamless

The bug is presented only for some image URLs:
[OK]: https://bdfss.blob.core.windows.net/shots/msedge_12_05_2020__17_20_58__ca81e3fa-0e7a-4562-b12e-2eb592c164a4.png
headers:

HTTP/1.1 200 OK
Content-Length: 78362
Content-Type: image/png
Content-MD5: bhmBjBhnKmixHtvrcPzJzw==
Last-Modified: Tue, 12 May 2020 14:20:58 GMT
Accept-Ranges: bytes
ETag: "0x8D7F67FB0A0A14A"
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 15163051-001e-0130-3668-28ddcc000000
x-ms-version: 2014-02-14
x-ms-lease-status: unlocked
x-ms-lease-state: available
x-ms-blob-type: BlockBlob
Date: Tue, 12 May 2020 14:23:56 GMT

[Error]: https://via.placeholder.com/200.png?text=hello_world
headers:

HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Tue, 12 May 2020 14:23:23 GMT
Content-Type: image/png
Content-Length: 438
Connection: keep-alive
Last-Modified: Tue, 12 May 2020 14:23:00 GMT
ETag: "5ebab144-1b6"
Accept-Ranges: bytes
Expires: Wed, 13 May 2020 14:23:23 GMT
Cache-Control: max-age=86400
X-Cache: L2

The error text is:

[0:] HTTP Request: Could not retrieve https://via.placeholder.com/200.png?text=hello_world, status code Gone
[0:] ImageLoaderSourceHandler: Could not retrieve image or image data was invalid: Uri: https://via.placeholder.com/200.png?text=hello_world

image

Xamarin.Forms - 4.6.0.726

The demo XFIMAG.zip

I am in trouble to load images.
Some images work, but others not.

I think is firewall or other thing in the remote server. it is blocking the connection...

Was this page helpful?
4 / 5 - 1 ratings

Related issues

joseluisct picture joseluisct  Â·  3Comments

EmilAlipiev picture EmilAlipiev  Â·  3Comments

Hudhud picture Hudhud  Â·  3Comments

suihanhbr picture suihanhbr  Â·  3Comments

Papirosnik picture Papirosnik  Â·  3Comments