Skip to content
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

FileSystem.OpenAppPackageFileAsync(string) throws System.IO.FileNotFoundException on Android 14 #26167

Open
mapsouza opened this issue Nov 27, 2024 · 0 comments
Labels
t/bug Something isn't working

Comments

@mapsouza
Copy link

Description

I used FileSystem.OpenAppPackageFileAsync to get a Stream from a MauiImage. On iOS all works is fine. But in Android throws System.IO.FileNotFoundException

Steps to Reproduce

  1. Create a new .NET Maui project

  2. Put this code in OnCounterClicked event:
    `

     private async void OnCounterClicked(object sender, EventArgs e)
     {
    
     var stream = await FileSystem.OpenAppPackageFileAsync("dotnet_bot.png");
     
     using var memoryStream = new MemoryStream();
     await stream.CopyToAsync(memoryStream);
    }
    

`
3. Debug

Link to public reproduction project repository

https://github.com/mapsouza/FileNotFoundImage

Version with bug

8.0.100 SR10

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

@mapsouza mapsouza added the t/bug Something isn't working label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant