flutter_foreground_task icon indicating copy to clipboard operation
flutter_foreground_task copied to clipboard

Blank White Screen When Opening Closed App

Open JonathanLam12345 opened this issue 3 years ago • 7 comments

When running the sample project, if you close the app and open the app either by selecting the notification or selecting the app on your device home screen, the app will display a blank white screen.

JonathanLam12345 avatar Sep 27 '22 05:09 JonathanLam12345

Can I see a detailed scenario and a screen where the error occurred?

Dev-hwang avatar Sep 30 '22 05:09 Dev-hwang

@Dev-hwang When the app is closed and the foreground task notification is pressed, the function onNotificationPressed() will execute while the app is reopened, and then FlutterForegroundTask.launchApp("/resume-route"); will be executed, it seems like there are some issues when executing this function and it will cause the app screen to have a blank white screen. If you look at my console, there seems to have an error message saying: Couldn't find a unique registered media button receiver in the given context. .

Screen Shot 2022-10-03 at 12 30 22 AM

JonathanLam12345 avatar Oct 03 '22 04:10 JonathanLam12345

I found this StackOverflow post that seems to have the same issue as me: https://stackoverflow.com/questions/73191762/production-build-from-play-store-only-shows-white-screen

JonathanLam12345 avatar Oct 26 '22 05:10 JonathanLam12345

Yep, I am the author of the above mentioned post. I also filed a issue in flutter itself (further setup and config data there), however it got closed with the following explanation: "Since this involves issues with a combination of third-party, we are unfortunately not sure how to resolve this issue". The third-party is flutter_foreground_task. https://github.com/flutter/flutter/issues/109100

kkondarev avatar Oct 27 '22 12:10 kkondarev

I'm facing the same issue. Any updates?

LorenzSchueler avatar Aug 07 '23 17:08 LorenzSchueler

@LorenzSchueler This issue has already been resolved. Make sure you are using the latest package version.

JonathanLam12345 avatar Aug 09 '23 17:08 JonathanLam12345

@JonathanLam12345 I'm using the latest version 6.0.0+1

LorenzSchueler avatar Aug 09 '23 18:08 LorenzSchueler