Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

[Bug] GravatarImageSource throws exception when offline #1770

@varyamereon

Description

@varyamereon

Description

If a GravatarImageSource is used when the app is offline, such as in flight mode, and it has no cached image to display, it throws the exception: Java.Net.UnknownHostException: 'Unable to resolve host "www.gravatar.com": No address associated with hostname'. If the image has already been cached then this problem does not occur.

Stack Trace

No stack trace.

Link to Reproduction Sample

https://github.com/varyamereon/GravatarSample

Steps to Reproduce

  1. Run the repo or simply add a GravatarImageSource
  2. Run the app on a device with no internet connection
  3. Exception is thrown

Expected Behavior

Should fail gracefully, in my example the GravatarImageSource is used in an AvatarView, and I would expect the avatar view to simply show the Text value until the device has connectivity restored and can obtain the Gravatar.

Actual Behavior

Exception thrown and app terminates.

Basic Information

  • Version with issue: 1.3.1
  • Last known good version: n/a
  • IDE: Visual Studio 2022 Windows
  • Platform Target Frameworks:
    • iOS: not tested
    • Android: 11
    • UWP: not tested
  • Android Support Library Version: n/a
  • Nuget Packages: n/a
  • Affected Devices: Tested on OnePlus 6

Workaround

Haven't found a workaround. Have tried setting the source in code behind wrapped in a try/catch statement, but the exception is still thrown and the app terminates.

Metadata

Metadata

Labels

bugSomething isn't working. Breaky break.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions