Skip to content

Flutter 3.27.x | Android 10, 11 | Crash: "drawRenderNode called on a context with no surface!" #162147

Open

Description

@namnh-0652

Steps to reproduce

Issue Summary:

Our app uses multiple screens with WebView (flutter_inappwebview). After upgrading Flutter from version 3.24.4 to 3.27.1 to address this issue on iOS 18.2, we started receiving a large number of crash reports on Android.

Steps to Reproduce:

  1. Open and close multiple WebView screens (approximately 5–10 screens).
  2. Open another WebView screen. While it attempts to render, press the Home button to minimize the app.
  3. Reopen the app from the background right after that.
  4. Observed Behavior: The app shows a black screen, ANR logs, and then crashes.

Additional Notes:

1. Impeller Disabled:
Due to this issue, Impeller is disabled on Android:

<meta-data
    android:name="io.flutter.embedding.android.EnableImpeller"
    android:value="false" />

2. Crash Details:

  • Crashes occur 100% of the time on devices running Android 10 and 11.
  • Tested builds:
    • Flutter 3.24.4 & 3.24.5: No crashes observed on a Nokia 8.1 (Android 11).
    • Flutter 3.27.1 & 3.27.3: Crashes consistently occur on the same device (Nokia 8.1, Android 11).

Expected results

Android app should not be crashed

Actual results

App crashes

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs

Android 11:

drawRenderNode called on a context with no surface!
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 30834 >>> my.app.package <<<

backtrace:
  #00  pc 0x000000000004e40c  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164)
  #01  pc 0x000000000055d00c  /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+2308)
  #02  pc 0x0000000000013978  /system/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+76)
  #03  pc 0x0000000000006e18  /system/lib64/liblog.so (__android_log_assert+336)
  #04  pc 0x0000000000215014  /system/lib64/libhwui.so (android::uirenderer::skiapipeline::SkiaOpenGLPipeline::getFrame()+52)
  #05  pc 0x000000000021df14  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::draw()+188)
  #06  pc 0x0000000000220608  /system/lib64/libhwui.so (_ZNSt3__110__function6__funcIZN7android10uirenderer12renderthread13DrawFrameTask11postAndWaitEvE3$_0NS_9allocatorIS6_EEFvvEEclEv$c303f2d2360db58ed70a2d0ac7ed911b+508)
  #07  pc 0x000000000020ed94  /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+220)
  #08  pc 0x000000000023007c  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+88)
  #09  pc 0x00000000000154cc  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+260)
  #10  pc 0x0000000000014d90  /system/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412)
  #11  pc 0x00000000000b0048  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #12  pc 0x00000000000503c8  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Android 10:

drawRenderNode called on a context with no surface!
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 24468 >>> my.app.package <<<

backtrace:
  #00  pc 0x00000000000830f0  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160)
  #01  pc 0x0000000000008a14  /system/lib64/liblog.so (__android_log_assert+328)
  #02  pc 0x00000000002c6dd0  /system/lib64/libhwui.so (android::uirenderer::skiapipeline::SkiaOpenGLPipeline::getFrame()+48)
  #03  pc 0x00000000002d3a00  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::draw()+236)
  #04  pc 0x00000000002d2cc0  /system/lib64/libhwui.so (_ZNSt3__110__function6__funcIZN7android10uirenderer12renderthread13DrawFrameTask11postAndWaitEvE3$_0NS_9allocatorIS6_EEFvvEEclEv$c303f2d2360db58ed70a2d0ac7ed911b+380)
  #05  pc 0x00000000002de238  /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+228)
  #06  pc 0x00000000002ddf20  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+588)
  #07  pc 0x0000000000013654  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328)
  #08  pc 0x00000000000e68a0  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #09  pc 0x0000000000084b6c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Full ARN aborting log:

report-crash.log

See attachment

Flutter Doctor output

Doctor output
[Paste your output here]

Image
Image

Activity

  1. changed the title [-]Android 10, 11 crash "drawRenderNode called on a context with no surface!"[/-] [+]Flutter 3.27.x | Android 10, 11 | Crash: "drawRenderNode called on a context with no surface!"[/+] on Jan 24, 2025
  2. alihassan143 commented on Jan 24, 2025

    @alihassan143
    backtrace:
      #00  pc 0x0000000000083598  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160)
      #01  pc 0x0000000000008a14  /system/lib64/liblog.so (__android_log_assert+328)
      #02  pc 0x00000000002c55f8  /system/lib64/libhwui.so (android::uirenderer::skiapipeline::SkiaOpenGLPipeline::getFrame()+48)
      #03  pc 0x00000000002d2ad4  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::draw()+236)
      #04  pc 0x00000000002d1e70  /system/lib64/libhwui.so (_ZNSt3__110__function6__funcIZN7android10uirenderer12renderthread13DrawFrameTask11postAndWaitEvE3$_0NS_9allocatorIS6_EEFvvEEclEv$c303f2d2360db58ed70a2d0ac7ed911b+380)
      #05  pc 0x00000000002dc9dc  /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+228)
      #06  pc 0x00000000002dc6c4  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+584)
      #07  pc 0x0000000000013654  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328)
      #08  pc 0x00000000000e7160  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
      #09  pc 0x0000000000085014  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
    
    
    backtrace:
      #00  pc 0x000000000652b8c8  /data/app/~~XN5B_YgbPbGCuiWDGe8s9Q==/com.google.android.trichromelibrary_677826033-Su-P8w2qPxOLSUSBBRBQsg==/base.apk!libmonochrome_64.so (BuildId: 9ed5c4caa3379506f628a67b22ba534ae98b7717)
      #01  pc 0x00000000036cb300  /data/app/~~XN5B_YgbPbGCuiWDGe8s9Q==/com.google.android.trichromelibrary_677826033-Su-P8w2qPxOLSUSBBRBQsg==/base.apk!libmonochrome_64.so (BuildId: 9ed5c4caa3379506f628a67b22ba534ae98b7717)
      #02  pc 0x000000000652b8f4  /data/app/~~XN5B_YgbPbGCuiWDGe8s9Q==/com.google.android.trichromelibrary_677826033-Su-P8w2qPxOLSUSBBRBQsg==/base.apk!libmonochrome_64.so (BuildId: 9ed5c4caa3379506f628a67b22ba534ae98b7717)
      #03  pc 0x00000000069c4278  /data/app/~~XN5B_YgbPbGCuiWDGe8s9Q==/com.google.android.trichromelibrary_677826033-Su-P8w2qPxOLSUSBBRBQsg==/base.apk!libmonochrome_64.so (BuildId: 9ed5c4caa3379506f628a67b22ba534ae98b7717)
      #04  pc 0x0000000007575148  /data/app/~~XN5B_YgbPbGCuiWDGe8s9Q==/com.google.android.trichromelibrary_677826033-Su-P8w2qPxOLSUSBBRBQsg==/base.apk!libmonochrome_64.so (BuildId: 9ed5c4caa3379506f628a67b22ba534ae98b7717)
      #05  pc 0x0000000004405e40  /data/app/~~XN5B_YgbPbGCuiWDGe8s9Q==/com.google.android.trichromelibrary_677826033-Su-P8w2qPxOLSUSBBRBQsg==/base.apk!libmonochrome_64.so (BuildId: 9ed5c4caa3379506f628a67b22ba534ae98b7717)
      #06  pc 0x0000000006558788  /data/app/~~XN5B_YgbPbGCuiWDGe8s9Q==/com.google.android.trichromelibrary_677826033-Su-P8w2qPxOLSUSBBRBQsg==/base.apk!libmonochrome_64.so (BuildId: 9ed5c4caa3379506f628a67b22ba534ae98b7717)
      #07  pc 0x0000000003919ff4  /data/app/~~XN5B_YgbPbGCuiWDGe8s9Q==/com.google.android.trichromelibrary_677826033-Su-P8w2qPxOLSUSBBRBQsg==/base.apk!libmonochrome_64.so (BuildId: 9ed5c4caa3379506f628a67b22ba534ae98b7717)
      #08  pc 0x0000000006573b20  /data/app/~~XN5B_YgbPbGCuiWDGe8s9Q==/com.google.android.trichromelibrary_677826033-Su-P8w2qPxOLSUSBBRBQsg==/base.apk!libmonochrome_64.so (BuildId: 9ed5c4caa3379506f628a67b22ba534ae98b7717)
      #09  pc 0x0000000000016bb0  /system/lib64/libutils.so (android::Looper::pollInner(int)+912)
      #10  pc 0x00000000000167b8  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112)
      #11  pc 0x0000000000153f0c  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
      #12  pc 0x000000000023d44c  /system/framework/arm64/boot-framework.oat (art_jni_trampoline+108)
      #13  pc 0x0000000000793488  /system/framework/arm64/boot-framework.oat (android.os.MessageQueue.next+232)
      #14  pc 0x0000000000790684  /system/framework/arm64/boot-framework.oat (android.os.Looper.loopOnce+100)
      #15  pc 0x0000000000790584  /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+516)
      #16  pc 0x000000000050d780  /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main+800)
      #17  pc 0x0000000000218be8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568)
      #18  pc 0x000000000028520c  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+212)
      #19  pc 0x0000000000627760  /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1384)
      #20  pc 0x0000000000597a38  /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+48)
      #21  pc 0x00000000000b2f74  /apex/com.android.art/javalib/arm64/boot.oat (art_jni_trampoline+132)
      #22  pc 0x0000000000ae270c  /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+140)
      #23  pc 0x0000000000aebb38  /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2376)
      #24  pc 0x0000000000218be8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568)
      #25  pc 0x000000000028520c  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+212)
      #26  pc 0x0000000000627ec0  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+448)
      #27  pc 0x0000000000628394  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+92)
      #28  pc 0x0000000000501094  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+612)
      #29  pc 0x00000000000b2b28  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120)
      #30  pc 0x00000000000becd8  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+856)
      #31  pc 0x00000000000025b0  /system/bin/app_process64 (main+1368)
      #32  pc 0x0000000000049b40  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96)
    
  3. alihassan143 commented on Jan 24, 2025

    @alihassan143

    Image
    Crahes are occuring on playstore when using platform view related plugins

  4. darshankawar commented on Jan 24, 2025

    @darshankawar
    Member

    WebView (flutter_inappwebview)

    @namnh-0652 This is third party package. Does the same behavior occur using webview_flutter ? If so, can you provide us minimal code sample ? Does it only occur on Android 10 and 11 versions or in latest versions as well ?

  5. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jan 24, 2025
  6. namnh-0652 commented on Jan 24, 2025

    @namnh-0652
    Author

    @darshankawar There are some crashes on other Android versions, but the console shows that nearly 100% of crashes occur on Android 10 and 11 (details are provided in the logs above). I don’t believe flutter_inappwebview is the cause, as we could not reproduce the issue on Flutter 3.24.x with the same flutter_inappwebview version.

    The crash reports started and have increased since the day we published the release build using Flutter 3.27.1.

  7. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jan 24, 2025
  8. alihassan143 commented on Jan 24, 2025

    @alihassan143
  9. centy commented on Jan 25, 2025

    @centy

    Image

    Image

  10. KaarelKelk commented on Jan 27, 2025

    @KaarelKelk

    Seeing the very same issue after upgrading from 3.24 to 3.27.2. I am using webview_flutter (v4.8.0).

    • Android 10 | 11 only.
    • Same stacktrace visible in GooglePlay as posted by "centy" above.
  11. darshankawar commented on Jan 28, 2025

    @darshankawar
    Member

    I tried to follow the steps to replicate on S10+ device running Android 11 but was unable to replicate the reported crash.
    Since the crash throws drawRenderNode called on a context with no surface!, it looks similar to a fixed issue #112254 in 3.22.
    I also tried to replicate per the repo given in the linked issue but was unable to see the crash.
    Based on the report and crashes received, I'll keep the issue open for team's attention / tracking.

  12. added
    c: crashStack traces logged to the console
    platform-androidAndroid applications specifically
    a: platform-viewsEmbedding Android/iOS views in Flutter apps
    on Jan 28, 2025
  13. 138 remaining items

  14. TheSourabhaSahu commented on Aug 20, 2025

    @TheSourabhaSahu

    But downgrade to what level? 3.24? Isn't that too old?

  15. gaaclarke commented on Aug 20, 2025

    @gaaclarke
    Member

    Anyone got any solution? Please help me to solve the issue. It is frustrating now

    Move to Impeller? The option to opt out is being deprecated anyways.

  16. TheSourabhaSahu commented on Aug 20, 2025

    @TheSourabhaSahu

    So, using flutter version 3.32.6 and using impeller would solve the issue? Also, impeller is on by default right?

    Also, for me, whenever I turned off impeller, my crash rates decreased significantly

  17. gaaclarke commented on Aug 20, 2025

    @gaaclarke
    Member

    So, using flutter version 3.32.6 and using impeller would solve the issue? Also, impeller is on by default right?

    Also, for me, whenever I turned off impeller, my crash rates decreased significantly

    Yes, the bug only happens when impeller is turned off and the ability to turn it off is disappearing. Now would be the time to file any bugs against impeller if there is something stopping you from migrating.

  18. TheSourabhaSahu commented on Aug 20, 2025

    @TheSourabhaSahu

    Are you sure? I mean, is there any evidence that turning off impeller causes the drawRenderNode issue?

    Then I will ship my app with impeller + flutter 3.32.6

    Edit: I forgot to mention that my crash rate increased when I used flutter 3.32.4 + Impeller OFF. And then decreased slightly when I used flutter 3.32.4 + Impeller OFF

    Please anyone reply so that I can proceed

    Thanks in advanced

  19. MathieuPierfitte commented on Aug 21, 2025

    @MathieuPierfitte

    @TheSourabhaSahu I use the default config (so Impeller is ON on most devices) and this crash doesn't occur anymore with version 3.32.6.

  20. mulderpf commented on Aug 21, 2025

    @mulderpf

    There appears to be a lot of questions / clarifications / confusion since the fix. Here's MY experience:

    • I saw a large number of these crashes in my app since the 3.32.1 release.
    • I use Google Mobile Ads 6.0.0 fwiw
    • The fix made in version 3.32.6 completely resolved this issue and my crash rate dropped right down
    • I have done another build with 3.32.7 which has been live since 18 July and I have NOT notice these crash occur again
    • I did NOT tinker with turning impeller on or off - I just use whatever the default is

    From my experience 3.32.6 and 3.32.7 have resolved the issue without the need to play around with Impeller settings (I wouldn't even know how to turn it on or off). This has been running smoothly for over a month on over 77000 installs without seeing this crash.

  21. KaarelKelk commented on Sep 3, 2025

    @KaarelKelk

    Seeing the very same issue after upgrading from 3.24 to 3.27.2. I am using webview_flutter (v4.8.0).

    • Android 10 | 11 only.
    • Same stacktrace visible in GooglePlay as posted by "centy" above.

    Seems like latest version has been stable. No crashes have been reported for 7 days using latest version and impeller enabled. ✅

    pubspec

    environment:
      sdk: '>=3.4.3 <4.0.0'
      flutter: 3.35.2
    
    dependencies:
      flutter_svg: ^2.0.7
      flutter:
        sdk: flutter
      flutter_localizations:
        sdk: flutter
      flutter_gen: ^5.4.0
      intl: any
      http: ^1.2.1
      shared_preferences: ^2.0.5
      webview_flutter: ^4.8.0
      collection: ^1.18.0
      permission_handler: ^11.3.1
      webview_flutter_android: ^3.16.4
      webview_flutter_wkwebview: ^3.13.1
      flutter_nfc_kit: ^3.5.2
      go_router: ^14.2.0
      mobile_scanner: ^7.0.1
      animations: ^2.0.11
      provider: ^6.1.2
      path_provider: ^2.1.3
      path: ^1.9.0
      cross_file: ^0.3.4+1
      mime: ^1.0.5
      file_picker: ^8.1.7
      video_player: ^2.9.1
      http_parser: ^4.0.2
      back_button_interceptor: ^7.0.3
      restart_app: ^1.3.2
      pub_semver: ^2.1.4
      package_info_plus: ^8.0.1
      chewie: ^1.8.3
      flutter_downloader: ^1.11.8
      url_launcher: ^6.3.0
      image_picker: ^1.2.0
    
  22. TheSourabhaSahu commented on Sep 3, 2025

    @TheSourabhaSahu

    Hey everyone
    Just an update that my app is also stable now even with Impeller ON. ANR and Crash rate has dropped drastically
    Finally flutter 3.32.6 solved the issue
    Thanks for the community help

  23. MichalDudkiewicz commented on Jan 3, 2026

    @MichalDudkiewicz

    it's still there in 3.38.5:

    drawRenderNode called on a context with no surface!
    
    backtrace:
      #00  pc 0x000000000004e178  /apex/com.android.runtime/lib64/bionic/libc.so (abort+168)
      #01  pc 0x0000000000552798  /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+2260)
      #02  pc 0x0000000000013990  /system/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+76)
      #03  pc 0x0000000000006e58  /system/lib64/liblog.so (__android_log_assert+336)
      #04  pc 0x00000000002153bc  /system/lib64/libhwui.so (android::uirenderer::skiapipeline::SkiaOpenGLPipeline::getFrame()+52)
      #05  pc 0x000000000021e30c  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::draw()+404)
      #06  pc 0x0000000000220954  /system/lib64/libhwui.so (_ZNSt3__110__function6__funcIZN7android10uirenderer12renderthread13DrawFrameTask11postAndWaitEvE3$_0NS_9allocatorIS6_EEFvvEEclEv$c303f2d2360db58ed70a2d0ac7ed911b+496)
      #07  pc 0x000000000020f140  /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+220)
      #08  pc 0x000000000023017c  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+88)
      #09  pc 0x0000000000015414  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+260)
      #10  pc 0x0000000000014cd8  /system/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412)
      #11  pc 0x00000000000af97c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
      #12  pc 0x00000000000500d0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
    
  24. NamHofstadter commented on Jan 26, 2026

    @NamHofstadter

    @MichalDudkiewicz Have you try not turn Impeller off ?

  25. dragonabyss commented on Apr 24, 2026

    @dragonabyss

    in 3.35.7 with Impeller disabled, the same problem exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsc: crashStack traces logged to the consolee: OS-version specificAffects only some versions of the relevant operating systemplatform-androidAndroid applications specificallyslimpellerEngine binary size reduction. go/slimpellerteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions