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

App Unresponsive when prompting the user from a new page #25585

Open
czuck opened this issue Oct 29, 2024 · 3 comments
Open

App Unresponsive when prompting the user from a new page #25585

czuck opened this issue Oct 29, 2024 · 3 comments
Labels
area-controls-dialogalert DisplayAlert, dialog migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)
Milestone

Comments

@czuck
Copy link

czuck commented Oct 29, 2024

Description

After opening a new page and setting IsBusy to true, a call is made to DisplayPromptAsync to prompt the user for information. The prompt doesn't appear, the page is unresponsive at the busy indicator.
This seems to be a timing issue, as adding an await Task.Delay before the prompt will alleviate the issue. In my production app it happens on both Android and iOS and my minimum Task.Delay to get it working is 150. In the reproduction app it happens in just Android and a Task.Delay of 50 will fix the issue. I also tested with DisplayAlert and DisplayActionSheet and they also cause the issue..

Steps to Reproduce

1: Download the reproduction app located at https://github.com/czuck/MauiTest
2: Run the app, tap the hamburger to access the flyout menu, Tap on Display Prompt Async. On iOS it will prompt, on Android it will not, the busy indicator will be running.
3: Edit DisplayPromptPage.cs and uncomment the await Task.Delay stmt on line 106. Follow step #2 on Android. This time you will get the prompt.
4: To test DisplayAlert and DisplayActionSheet comment lines 106 and 108 and uncomment 109 or 110, the follow steps 2 and 3 above.

Link to public reproduction project repository

https://github.com/czuck/MauiTest

Version with bug

8.0.61 SR6.1

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android, iOS

Affected platform versions

iOS 17.6.1, Android 14

Did you find any workaround?

Yes, adding a Task.Delay of sufficient time will get around the issue. The length of the delay needed is not constant.

Relevant log output

No response

@czuck czuck added the t/bug Something isn't working label Oct 29, 2024
@jsuarezruiz jsuarezruiz added area-controls-dialogalert DisplayAlert, dialog t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf) labels Oct 30, 2024
@moljac
Copy link
Contributor

moljac commented Oct 30, 2024

I was able to repro with given sample.

@samhouts samhouts added platform/android 🤖 platform/iOS 🍎 migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert labels Oct 30, 2024
@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Oct 31, 2024
@Zhanglirong-Winnie
Copy link

This issue has been verified using Visual Studio 17.12.0 Preview 4( 9.0.0-rc.2.24503.2 & 8.0.92 & 8.0.61 & 8.0.40 & 8.0.3). Can repro this issue on android and iso platforms.

@czuck
Copy link
Author

czuck commented Dec 9, 2024

This is still an issue with .NET 9 / Maui.Controls 9.0.12. The reproduction project has been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-dialogalert DisplayAlert, dialog migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)
Projects
None yet
Development

No branches or pull requests

5 participants