Repository navigation
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: productionIssues experienced in live production appsIssues experienced in live production appsc: crashStack traces logged to the consoleStack traces logged to the consoleengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.needs repro infoAutomated crash report whose cause isn't yet knownAutomated crash report whose cause isn't yet knownplatform-androidAndroid applications specificallyAndroid applications specificallyteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
Steps to reproduce
Random in production
Expected results
no report the issue
Actual results
Crashlytics report ANR
Code sample
Code sample
No sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
io.flutter.embedding.engine.FlutterJNI.nativeSurfaceDestroyed (FlutterJNI.java)
io.flutter.embedding.engine.FlutterJNI.onSurfaceDestroyed (FlutterJNI.java:713)
io.flutter.embedding.engine.renderer.FlutterRenderer.stopRenderingToSurface (FlutterRenderer.java:1144)
io.flutter.embedding.android.FlutterSurfaceView.disconnectSurfaceFromRenderer (FlutterSurfaceView.java:303)
io.flutter.embedding.android.FlutterSurfaceView.access$400 (FlutterSurfaceView.java:36)
io.flutter.embedding.android.FlutterSurfaceView$1.surfaceDestroyed (FlutterSurfaceView.java:78)
android.view.SurfaceView.notifySurfaceDestroyed (SurfaceView.java:2132)
android.view.SurfaceView.updateSurface (SurfaceView.java:1230)
android.view.SurfaceView.setWindowStopped (SurfaceView.java:403)
android.view.SurfaceView.surfaceDestroyed (SurfaceView.java:2004)
android.view.ViewRootImpl.notifySurfaceDestroyed (ViewRootImpl.java:2962)
android.view.ViewRootImpl.setWindowStopped (ViewRootImpl.java:2918)
android.view.WindowManagerGlobal.setStoppedState (WindowManagerGlobal.java:830)
android.app.Activity.performStop (Activity.java:9261)
android.app.ActivityThread.callActivityOnStop (ActivityThread.java:5898)
android.app.ActivityThread.performStopActivityInner (ActivityThread.java:5872)
android.app.ActivityThread.handleStopActivity (ActivityThread.java:5943)
android.app.servertransaction.StopActivityItem.execute (StopActivityItem.java:43)
android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45)
android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:180)
android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:98)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2685)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loopOnce (Looper.java:230)
android.os.Looper.loop (Looper.java:319)
android.app.ActivityThread.main (ActivityThread.java:8934)
java.lang.reflect.Method.invoke (Native method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:578)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)Flutter Doctor output
Doctor output
[Paste your output here]Reacted by Thibault Deckers, Ashraf Patel and Liam
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: productionIssues experienced in live production appsIssues experienced in live production appsc: crashStack traces logged to the consoleStack traces logged to the consoleengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.needs repro infoAutomated crash report whose cause isn't yet knownAutomated crash report whose cause isn't yet knownplatform-androidAndroid applications specificallyAndroid applications specificallyteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Activity
a-h-mzd commentedon May 28, 2025
This looks like this issue #160357. I only created a new issue because the other was closed. We're getting this error for app built using Flutter version 3.29.3
tirth-patel-nc commentedon May 29, 2025
Hi @a-h-mzd, is that all the information from crashlytics? is there any more dump or stacktrace available? also, are you running with the
--no-enable-impellerflag?a-h-mzd commentedon May 30, 2025
Hi @tirth-patel-nc, that's all the information we have from Crashlytics. No, we're not using the
--no-enable-impellerflag.tirth-patel-nc commentedon May 30, 2025
Alright. I will keep the issue open based on this Stacktrace. Ideally we would require a reproducible case in order to analyze further & make it actionable.
@a-h-mzd if possible, can you check if you’re seeing a similar stacktrace on the latest stable version?
9 remaining items
littleGnAl commentedon Sep 1, 2025
Hello @a-h-mzd @krfgutierrez, do you face the same issue on Flutter SDK 3.35.x?
a-h-mzd commentedon Sep 2, 2025
We have recently released a new version of our app with the latest flutter version(3.35.2) and we have not YET seen this issue.
ChibangLW commentedon Sep 3, 2025
We still see the issue with Flutter v3.35.1. We have not yet updated to 3.35.2.
krfgutierrez commentedon Sep 3, 2025
We haven't updated yet since we're waiting for official fix instead of updating then checking if it is fixed.
ashraf-patel-hs commentedon Sep 28, 2025
qinfendezhou commentedon Jan 21, 2026
This issue still persists in Flutter version 3.35.0. I will try upgrading to version 3.35.2 to see if it fixes the problem.
kisrar commentedon Feb 1, 2026
The issue till persists in Flutter 3.38.8
qinfendezhou commentedon Feb 2, 2026
After a week of testing, unfortunately, the problem still exists in version 3.35.2.
qinfendezhou commentedon Feb 4, 2026
I’d like to share what I found from production analytics, because the repro is random.
What I found (Firebase analytics breadcrumbs)
By analyzing our Firebase Analytics / Crashlytics breadcrumbs & event logs, the ANR most commonly happens under this scenario:
The app is playing a video resource (audio + video) at the time of the ANR.
During video playback, an ad is shown, and in our app flow showing the ad can cause the app to transition to background (Activity stop / surface destroyed path).
So the typical sequence is roughly:
Dependencies
Player: media_kit / media_kit_video
Ads: Google Mobile Ads (AdMob) (google_mobile_ads)
littleGnAl commentedon Feb 9, 2026
In our add-to-app scenario, the APM report showed the following logs:
We mix
FlutterTextViewandFlutterSurfaceViewby usingRenderMode.textureandRenderMode.surface. It's most likely this issue caused byFlutterTextView(i.e.,RenderMode.texture) in our case.gaaclarke commentedon Mar 2, 2026
An internal customer in b/488786379 experienced a similar issue and also stated that switching from
RenderMode.texturetoRenderMode.surfaceseemed to address their issue, but also mentioned there are tradeoffs to that change.ZS-James2026 commentedon Mar 16, 2026
Environment
backtrace:
Using Flutter PlatformViewLink + AndroidViewSurface for native Android view integration
Is there any estimated Flutter Engine version that will fix this issue? Alternatively, Is there any suggestions or workarounds to prevent the app from crashing?
littleGnAl commentedon Apr 14, 2026
Hello @gaaclarke @jason-simmons , could you please confirm whether #183288 fixes the issue?
jason-simmons commentedon Apr 14, 2026
#183288 fixed the
Could not acquire next swapchain image/No surface availableVulkan swapchain issue that was seen by the internal customer.