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

FilePicker.PickMultipleAsync does not wait and just returns null on Mac #11574

Closed
datvm opened this issue Nov 23, 2022 · 1 comment
Closed

FilePicker.PickMultipleAsync does not wait and just returns null on Mac #11574

datvm opened this issue Nov 23, 2022 · 1 comment
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/macOS 🍏 macOS / Mac Catalyst s/duplicate 2️⃣ This issue or pull request already exists t/bug Something isn't working

Comments

@datvm
Copy link

datvm commented Nov 23, 2022

Description

Calling FilePicker.PickMultipleAsync on Mac shows the Open dialog. However before user has anything to do with the dialog, the code jumps to the next instruction right away (my code has await).

    async Task OnClick()
    {
        this.files = await FilePicker.PickMultipleAsync();

        // Just to be sure
        System.Diagnostics.Debugger.Break();
        this.StateHasChanged();
    }

Steps to Reproduce

  1. Create a new MAUI Blazor project.
  2. Add the above code for any button or event handler.
  3. Click the button.
  4. The Open file dialog shows up but the code does not stop and wait. Instead, the next line of code is executed and the returned value is null.

Link to public reproduction project repository

https://github.com/datvm/MauiPickMultipleAsyncMacBug

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

macOS

Affected platform versions

Mac 13.0.1 (22A400)

Did you find any workaround?

No response

Relevant log output

No response

@datvm datvm added the t/bug Something isn't working label Nov 23, 2022
@jsuarezruiz jsuarezruiz added area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/macOS 🍏 macOS / Mac Catalyst labels Nov 23, 2022
@rachelkang
Copy link
Member

Duplicate of #11088

@rachelkang rachelkang marked this as a duplicate of #11088 Nov 23, 2022
@rachelkang rachelkang added the s/duplicate 2️⃣ This issue or pull request already exists label Nov 23, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Dec 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/macOS 🍏 macOS / Mac Catalyst s/duplicate 2️⃣ This issue or pull request already exists t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants