'Flutter app on mobile restarts/aborts on minimize and then made active
I'm on the latest (3.0) flutter version. I'm using VS-Code, in debug mode.
App installs on Android Mobile and runs well.
Issue is that if I minimize and then bring back the app, the app restarts from the beginning (most times, not always) - when this happens, I see this message (not sure if this is related to the issue):
W/Looper (16953): Slow Looper main: Activity com.example.tuotr_main_app/.MainActivity is 343ms late (wall=1ms running=1ms ClientTransaction{ callbacks=[android.app.servertransaction.TopResumedActivityChangeItem] }) because of 1 msg, msg 1 took 343ms (seq=2988 running=259ms runnable=4ms io=25ms h=android.app.ActivityThread$H w=159)
Sometimes the app terminates with this message:
F/OpenGLRenderer(30682): drawRenderNode called on a context with no surface!
Any ideas where I should be looking?
Solution 1:[1]
I installed Crashlytics but the error was not caught and reported.
Found the potential issue here:
https://github.com/flutter/flutter/issues/103870
Turns out, in my case, it is related to the video_player package - since if I remove the widgets using this there is no more issue.
If you have this error, I suggest you remove one widget at a time to isolate the issue, and report this to the developer of those package(s)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sunil Gupta |
