Skip to content

FileCache GetFromCacheAsync throws NullReferenceException #3104

@SoundersFan

Description

@SoundersFan

Describe the bug

A NullReferenceException is thrown when one calls GetFromCacheAsync for an uncached Uri. This is the same as bug1719 which appears to be prematurely closed.

  • Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:

Steps to Reproduce

Steps to reproduce the behavior:

StorageFile file = await FileCache.Instance.GetFromCacheAsync(new Uri("https://www.google.com"));

Expected behavior

No exceptions

Environment

NuGet Package(s): 6.0.0

Package Version(s): 

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [x] May 2019 Update (18362)
- [ ] Insider Build (build number: )

App min and target version:
- [x] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 (version: )
- [x] 2019 (version: 16.4.2) 
- [ ] 2019 Preview (version: )

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Completed 🔥bug 🐛An unexpected issue that highlights incorrect behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions