You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Check failed: android_context_->IsValid(). Could not create surface from invalid Android context #163532
App does not start and I am getting Check failed: android_context_->IsValid(). Could not create surface from invalid Android context
Running with flutter run --no-enable-impeller works.
Code sample
Not needed
Screenshots or Video
No response
Logs
Logs
F/flutter ( 5341): [FATAL:flutter/shell/platform/android/platform_view_android.cc(127)] Check failed: android_context_->IsValid(). Could not create surface from invalid Android context.F/flutter ( 5376): [FATAL:flutter/shell/platform/android/platform_view_android.cc(127)] Check failed: android_context_->IsValid(). Could not create surface from invalid Android context.^CError waiting for a debug connection: The log reader stopped unexpectedlyError launching application on KFSUWI.f
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):[✓] Flutter (Channel stable, 3.29.0, on macOS 15.3 24D60 darwin-arm64, locale en-US)[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)[✓] Xcode - develop for iOS and macOS (Xcode 16.2)[✓] Chrome - develop for the web[✓] Android Studio (version 2024.1)[✓] Android Studio (version 2024.1)[✓] VS Code (version 1.97.2)[✓] Connected device (4 available) ! Error: Could not locate device support files. You may be able to resolve the issue by installing the latest version of Xcode from the Mac App Store or developer.apple.com. [missing string: 869a8e318f07f3e2f42e11d435502286094f76de] (code 2) ! Error: Browsing on the local area network for iPad. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27)[✓] Network resources• No issues found!
@santoshgistto I don't see any of the messages I added in those logs. Its possible that its something else, but could you double check that you've updated to the latest master and then try again?
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
santoshgistto commentedon Feb 20, 2025
Same issue on https://www.amazon.com/fire-tv-stick-with-3rd-gen-alexa-voice-remote/dp/B08C1W5N87
jonahwilliams commentedon Feb 24, 2025
We have a few known crashes on old Android version:
I can't say that this is necessarily one of those two as we don't seem to have any logs or errors? Are there any other error messages on logcat?
fotiDim commentedon Feb 24, 2025
No other logs, I am afraid.
santoshgistto commentedon Feb 25, 2025
@jonahwilliams here is the full logs
Package :
com.example.fire_stick_demobugreport-sheldon-PS7688.4591N-2025-02-24-21-00-47.txt
jonahwilliams commentedon Feb 25, 2025
@santoshgistto do you have access to the device that is failing. It looks like we have some debugging logs but they are disabled in release builds: https://github.com/flutter/flutter/blob/flutter-3.29-candidate.0/engine/src/flutter/shell/platform/android/android_context_gl_impeller.cc#L167
I can push a change to master that enables these. If I do that would you be able to test or else vend out a new build from head once that is done?
From looking at the logs, it must be one of these - no other later messages are printed.
santoshgistto commentedon Feb 25, 2025
@jonahwilliams yes i am having device and i can test it
Note :
flutter run --no-enable-impellerwithout impeller works good[Impeller] make DLOG into LOG for startup errors. (#164110)
santoshgistto commentedon Feb 26, 2025
@jonahwilliams Here is the logs from
master channelbugreport-sheldon-PS7688.4591N-2025-02-26-10-11-20.txt
anasmohammed361 commentedon Feb 28, 2025
jonahwilliams commentedon Mar 3, 2025
@santoshgistto I don't see any of the messages I added in those logs. Its possible that its something else, but could you double check that you've updated to the latest master and then try again?
1 remaining item
g7i commentedon Mar 13, 2025
Its crashing on a lot of Android mobile phones. Disabling impeller seems to work.
jonahwilliams commentedon Mar 13, 2025
For older devices (< API 29) we plan to disable Impeller in the next hotifx.
fotiDim commentedon Mar 13, 2025
What is the greatest API level that the issue has been experienced on? My device is on 22.
tetianazakhozhaeva commentedon Mar 13, 2025
The same crash on android 8.1 (api 27). Xiaomi
g7i commentedon Mar 14, 2025
The crash is happening on some API 29 devices as well. Ex - Oppo F17 Pro, Oppo Reno3 Pro 5G
jonahwilliams commentedon Mar 14, 2025
This crash is a very generic error message. If you're having the same issue but on a different device, that needs to be a different bug.
g7i commentedon Mar 14, 2025
The crash goes away after disabling Impeller. So I'd assume its somehow related to Impeller only. Let me know if I can help you with the logs.
jonahwilliams commentedon Mar 14, 2025
@g7i if you want me to look at it you'll need to file a bug with details. I will close this issue once 3.29.2 is released regardless.
jonahwilliams commentedon Mar 14, 2025
Fixed in 3.29.2
github-actions commentedon Mar 28, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.