flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.21k stars 27.5k forks source link

java.lang.SecurityException: Permission Denial crash at launch #88767

Closed markusaksli-nc closed 3 years ago

markusaksli-nc commented 3 years ago

I was trying to confirm if https://github.com/flutter/flutter/issues/35734 is still reproducible on master and ran into this crash. Didn't even need to change the default flutter create app as it turns out. Just running flutter create and flutter run is enough to crash on my SM G950F.

flutter doctor -v ``` [√] Flutter (Channel master, 2.5.0-7.0.pre.211, on Microsoft Windows [Version 10.0.19043.1165], locale en-GB) • Flutter version 2.5.0-7.0.pre.211 at C:\Development\flutter_master • Upstream repository https://github.com/flutter/flutter.git • Framework revision 56b681247d (6 hours ago), 2021-08-23 20:44:05 -0400 • Engine revision 926ce0d855 • Dart version 2.15.0 (build 2.15.0-43.0.dev) [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at C:\Users\marku\AppData\Local\Android\sdk • Platform android-31, build-tools 31.0.0 • Java binary at: C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\203.7621141\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [√] Android Studio (version 2020.3) • Android Studio at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\203.7621141 • Flutter plugin version 59.0.2 • Dart plugin version 203.8292 • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) [√] Connected device (3 available) • SM G950F (mobile) • ce12171c51cc001c03 • android-arm64 • Android 9 (API 28) • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.131 • Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.78 • No issues found! ```
Logs ``` Syncing files to device SM G950F... D/vndksupport( 8582): Loading /vendor/lib64/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace. E/flutter ( 8582): [ERROR:flutter/fml/platform/android/jni_util.cc(182)] java.lang.SecurityException: Permission Denial: broadcast from android asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS E/flutter ( 8582): at android.os.Parcel.createException(Parcel.java:1966) E/flutter ( 8582): at android.os.Parcel.readException(Parcel.java:1934) E/flutter ( 8582): at android.os.Parcel.readException(Parcel.java:1884) E/flutter ( 8582): at android.app.IActivityManager$Stub$Proxy.reportActivityFullyDrawn(IActivityManager.java:7318) E/flutter ( 8582): at android.app.Activity.reportFullyDrawn(Activity.java:2092) E/flutter ( 8582): at io.flutter.embedding.android.FlutterActivity.onFlutterUiDisplayed(FlutterActivity.java:1100) E/flutter ( 8582): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$1.onFlutterUiDisplayed(FlutterActivityAndFragmentDelegate.java:88) E/flutter ( 8582): at io.flutter.embedding.android.FlutterView$2.onFlutterUiDisplayed(FlutterView.java:133) E/flutter ( 8582): at io.flutter.embedding.engine.FlutterJNI.onFirstFrame(FlutterJNI.java:462) E/flutter ( 8582): at android.os.MessageQueue.nativePollOnce(Native Method) E/flutter ( 8582): at android.os.MessageQueue.next(MessageQueue.java:326) E/flutter ( 8582): at android.os.Looper.loop(Looper.java:181) E/flutter ( 8582): at android.app.ActivityThread.main(ActivityThread.java:7050) E/flutter ( 8582): at java.lang.reflect.Method.invoke(Native Method) E/flutter ( 8582): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) E/flutter ( 8582): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965) E/flutter ( 8582): Caused by: android.os.RemoteException: Remote stack trace: E/flutter ( 8582): at com.android.server.am.UserController.handleIncomingUser(UserController.java:1818) E/flutter ( 8582): at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:25752) E/flutter ( 8582): at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:25683) E/flutter ( 8582): at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:26553) E/flutter ( 8582): at android.app.ContextImpl.sendBroadcastAsUser(ContextImpl.java:1264) E/flutter ( 8582): E/flutter ( 8582): F/flutter ( 8582): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1220)] Check failed: fml::jni::CheckException(env). F/libc ( 8582): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 8582 (.example.master), pid 8582 (.example.master) *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Build fingerprint: 'samsung/dreamltexx/dreamlte:9/PPR1.180610.011/G950FXXUCDUD1:user/release-keys' Revision: '10' ABI: 'arm64' pid: 8582, tid: 8582, name: .example.master >>> com.example.master <<< signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1220)] Check failed: fml::jni::CheckException(env). ' x0 0000000000000000 x1 0000000000002186 x2 0000000000000006 x3 0000000000000008 x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000080 x8 0000000000000083 x9 0000007e66b38838 x10 fffffff87ffffbdf x11 0000000000000001 x12 0000007dbe0b2080 x13 0000000000000003 x14 ffffffffffffffff x15 0000000000000000 x16 0000007e66b6f2a0 x17 0000007e66aae920 x18 0000007fe7576b6a x19 0000000000002186 x20 0000000000002186 x21 0000000000000083 x22 0000000000000033 x23 0000007ddb019e30 x24 0000007ddb019e18 x25 0000000000000000 x26 0000007e685d55f8 x27 0000000000000033 x28 0000000000000001 x29 0000007fe7577420 sp 0000007fe75773e0 lr 0000007e66aa1d68 pc 0000007e66aa1d94 backtrace: #00 pc 0000000000021d94 /system/lib64/libc.so (abort+124) #01 pc 000000000146c35c /data/app/com.example.master-lN5-K3x1G7AcykrCx1DHGA==/lib/arm64/libflutter.so (offset 0x146a000) #02 pc 0000000001497ce4 /data/app/com.example.master-lN5-K3x1G7AcykrCx1DHGA==/lib/arm64/libflutter.so (offset 0x146a000) #03 pc 0000000001474d44 /data/app/com.example.master-lN5-K3x1G7AcykrCx1DHGA==/lib/arm64/libflutter.so (offset 0x146a000) #04 pc 0000000000000020 Lost connection to device. ```

Only found one related issue but it got closed due to timeout https://github.com/flutter/flutter/issues/71638.

markusaksli-nc commented 3 years ago

@flutter-symbolizer-bot https://github.com/flutter/flutter/issues/88767#issue-977757416 engine#926ce0d855 debug

flutter-symbolizer-bot commented 3 years ago

crash from https://github.com/flutter/flutter/issues/88767#issue-977757416 symbolized using symbols for 926ce0d8550152466aa50336c7a2120481854e9f android-arm64-debug

#00 0000000000021d94 /system/lib64/libc.so (abort+124)
#01 000000000146c35c <...>/lib/arm64/libflutter.so (offset 0x146a000)
                                                   std::__throw_bad_alloc()
                                                   third_party/libcxx/include/optional:193:9
#02 0000000001497ce4 <...>/lib/arm64/libflutter.so (offset 0x146a000)
                                                   fml::LogMessage::~LogMessage()
                                                   flutter/fml/logging.cc:130:5
#03 0000000001474d44 <...>/lib/arm64/libflutter.so (offset 0x146a000)
                                                   flutter::PlatformViewAndroidJNIImpl::FlutterViewOnFirstFrame()
                                                   flutter/shell/platform/android/platform_view_android_jni_impl.cc:0:3
#04 0000000000000020 <unknown> 
TahaTesser commented 3 years ago

Hi @markusaksli-nc Unable to reproduce on Android 11 Samsung device following the steps. Your device is running API 28 Is the issue reproducible on another device or emulator?

logs ```console [ +68 ms] executing: [C:\Users\Taha\Code\flutter_master/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +413 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ +1 ms] 6dc18ef74e2f814c252ef71632b06d3e6e03ca12 [ +1 ms] executing: [C:\Users\Taha\Code\flutter_master/] git tag --points-at 6dc18ef74e2f814c252ef71632b06d3e6e03ca12 [ +45 ms] Exit code 0 from: git tag --points-at 6dc18ef74e2f814c252ef71632b06d3e6e03ca12 [ +1 ms] executing: [C:\Users\Taha\Code\flutter_master/] git describe --match *.*.* --long --tags 6dc18ef74e2f814c252ef71632b06d3e6e03ca12 [ +81 ms] Exit code 0 from: git describe --match *.*.* --long --tags 6dc18ef74e2f814c252ef71632b06d3e6e03ca12 [ ] 2.5.0-6.0.pre-213-g6dc18ef74e [ +9 ms] executing: [C:\Users\Taha\Code\flutter_master/] git rev-parse --abbrev-ref --symbolic @{u} [ +28 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/master [ ] executing: [C:\Users\Taha\Code\flutter_master/] git ls-remote --get-url origin [ +24 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +97 ms] executing: [C:\Users\Taha\Code\flutter_master/] git rev-parse --abbrev-ref HEAD [ +30 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] master [ +74 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +5 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +54 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe devices -l [ +43 ms] List of devices attached R9ZR205XX0A device product:a02qins model:SM_M025F device:a02q transport_id:7 emulator-5554 device product:sdk_gphone_x86 model:sdk_gphone_x86 device:generic_x86_arm transport_id:6 [ +6 ms] C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s R9ZR205XX0A shell getprop [ +92 ms] C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s emulator-5554 shell getprop [ +52 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ +11 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +69 ms] Multiple devices found: [ +3 ms] ro.hardware = qcom [ +1 ms] ro.hardware = ranchu [ +21 ms] SM M025F (mobile) • R9ZR205XX0A • android-arm • Android 11 (API 30) [ +2 ms] sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator) [ +1 ms] Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.160] [ +1 ms] Windows (UWP) (desktop) • winuwp • windows-uwp-x64 • [ ] Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159 [ ] Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.78 [ +2 ms] [1]: SM M025F (R9ZR205XX0A) [ ] [2]: sdk gphone x86 (emulator-5554) [ ] [3]: Windows (windows) [ ] [4]: Windows (UWP) (winuwp) [ ] [5]: Chrome (chrome) [ ] [6]: Edge (edge) [ +1 ms] Please choose one (To quit, press "q/Q") [ ] : [+70177 ms] ` [ +1 ms] Please choose one (To quit, press "q/Q") [ +1 ms] : [+16786 ms] 1 [ +11 ms] Skipping pub get: version match. [ +104 ms] Generating C:\Users\Taha\StudioProjects\myapp\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java [ +93 ms] Initializing file store [ +9 ms] Skipping target: gen_localizations [ +6 ms] Skipping target: gen_dart_plugin_registrant [ +1 ms] Skipping target: _composite [ +2 ms] complete [ +6 ms] Launching lib\main.dart on SM M025F in debug mode... [ +5 ms] C:\Users\Taha\Code\flutter_master\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\Users\Taha\Code\flutter_master\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\Users\Taha\Code\flutter_master\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill C:\Users\Taha\AppData\Local\Temp\flutter_tools.eb949d2a\flutter_tool.dc535a3d\app.dill --packages C:\Users\Taha\StudioProjects\myapp\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build\c075001b96339384a97db4862b8ab8db.cache.dill.track.dill --flutter-widget-cache --enable-experiment=alternative-invalidation-strategy [ +11 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s R9ZR205XX0A shell -x logcat -v time -t 1 [ +15 ms] <- compile package:myapp/main.dart [ +471 ms] --------- beginning of main 08-24 14:32:15.598 D/SensorService( 1488): [SO] [0 -> 255] [ +10 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe version [ +21 ms] Android Debug Bridge version 1.0.41 Version 31.0.3-7562133 Installed as C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe [ +2 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe start-server [ +20 ms] Building APK [ +17 ms] Running Gradle task 'assembleDebug'... [ +3 ms] Using gradle from C:\Users\Taha\StudioProjects\myapp\android\gradlew.bat. [ +10 ms] executing: C:\Users\Taha\Code\android-studio\jre\bin\java -version [ +113 ms] Exit code 0 from: C:\Users\Taha\Code\android-studio\jre\bin\java -version [ ] openjdk version "11.0.10" 2021-01-19 OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) OpenJDK 64-Bit Server VM (build 11.0.10+0-b96-7249189, mixed mode) [ +1 ms] executing: [C:\Users\Taha\StudioProjects\myapp\android/] C:\Users\Taha\StudioProjects\myapp\android\gradlew.bat -Pverbose=true -Ptarget-platform=android-arm -Ptarget=C:\Users\Taha\StudioProjects\myapp\lib\main.dart -Pdart-defines=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ== -Pdart-obfuscation=false -Ptrack-widget-creation=true -Ptree-shake-icons=false -Pfilesystem-scheme=org-dartlang-root assembleDebug [+7582 ms] > Task :app:compileFlutterBuildDebug [ +1 ms] [ +57 ms] executing: [C:\Users\Taha\Code\flutter_master/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +1 ms] [ +415 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] [ ] 6dc18ef74e2f814c252ef71632b06d3e6e03ca12 [ ] [ ] executing: [C:\Users\Taha\Code\flutter_master/] git tag --points-at 6dc18ef74e2f814c252ef71632b06d3e6e03ca12 [ ] [ +44 ms] Exit code 0 from: git tag --points-at 6dc18ef74e2f814c252ef71632b06d3e6e03ca12 [ ] [ +1 ms] executing: [C:\Users\Taha\Code\flutter_master/] git describe --match *.*.* --long --tags 6dc18ef74e2f814c252ef71632b06d3e6e03ca12 [ ] [ +70 ms] Exit code 0 from: git describe --match *.*.* --long --tags 6dc18ef74e2f814c252ef71632b06d3e6e03ca12 [ ] [ ] 2.5.0-6.0.pre-213-g6dc18ef74e [ ] [ +7 ms] executing: [C:\Users\Taha\Code\flutter_master/] git rev-parse --abbrev-ref --symbolic @{u} [ ] [ +26 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] [ ] origin/master [ ] [ ] executing: [C:\Users\Taha\Code\flutter_master/] git ls-remote --get-url origin [ ] [ +25 ms] Exit code 0 from: git ls-remote --get-url origin [ ] [ ] https://github.com/flutter/flutter.git [ ] [ +49 ms] executing: [C:\Users\Taha\Code\flutter_master/] git rev-parse --abbrev-ref HEAD [ ] [ +27 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] [ ] master [ ] [ +51 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] [ +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] [ +89 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update. [ ] [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update. [ ] [ +2 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update. [ ] [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'PubDependencies' is not required, skipping update. [ ] [ +44 ms] Initializing file store [ ] [ +19 ms] Skipping target: gen_localizations [ ] [ +11 ms] Skipping target: gen_dart_plugin_registrant [ ] [ +1 ms] kernel_snapshot: Starting due to {} [ ] [ +11 ms] C:\Users\Taha\Code\flutter_master\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\Users\Taha\Code\flutter_master\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\Users\Taha\Code\flutter_master\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies -DFLUTTER_WEB_AUTO_DETECT=true -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --no-link-platform --packages C:\Users\Taha\StudioProjects\myapp\.dart_tool\package_config.json --output-dill C:\Users\Taha\StudioProjects\myapp\.dart_tool\flutter_build\5bc19cbc5a95dffbb3d4e18e3d1e4312\app.dill --depfile C:\Users\Taha\StudioProjects\myapp\.dart_tool\flutter_build\5bc19cbc5a95dffbb3d4e18e3d1e4312\kernel_snapshot.d package:myapp/main.dart [+6774 ms] [+7360 ms] kernel_snapshot: Complete [ +394 ms] [ +434 ms] debug_android_application: Starting due to {} [ +207 ms] [ +148 ms] debug_android_application: Complete [ +500 ms] [ +507 ms] Persisting file store [ +1 ms] [ +9 ms] Done persisting file store [ ] [ +5 ms] build succeeded. [ ] [ +13 ms] "flutter assemble" took 8,680ms. [ +92 ms] [ +53 ms] ensureAnalyticsSent: 50ms [ +1 ms] [ ] Running shutdown hooks [ +1 ms] [ ] Shutdown hooks complete [ ] [ ] exiting with code 0 [ +201 ms] > Task :app:packLibsflutterBuildDebug [ +1 ms] > Task :app:preBuild UP-TO-DATE [ ] > Task :app:preDebugBuild UP-TO-DATE [ ] > Task :app:compileDebugAidl NO-SOURCE [ ] > Task :app:compileDebugRenderscript NO-SOURCE [ ] > Task :app:generateDebugBuildConfig [ +899 ms] > Task :app:checkDebugAarMetadata [ +1 ms] > Task :app:cleanMergeDebugAssets UP-TO-DATE [ +1 ms] > Task :app:mergeDebugShaders [ ] > Task :app:compileDebugShaders NO-SOURCE [ ] > Task :app:generateDebugAssets UP-TO-DATE [ ] > Task :app:mergeDebugAssets [ +295 ms] > Task :app:copyFlutterAssetsDebug [ +1 ms] > Task :app:generateDebugResValues [ ] > Task :app:generateDebugResources [ +620 ms] > Task :app:createDebugCompatibleScreenManifests [ +15 ms] > Task :app:extractDeepLinksDebug [ +351 ms] > Task :app:processDebugMainManifest [ ] > Task :app:processDebugManifest [ +111 ms] > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE [ ] > Task :app:javaPreCompileDebug [ ] > Task :app:processDebugJavaRes NO-SOURCE [ +894 ms] > Task :app:compressDebugAssets [ +502 ms] > Task :app:mergeDebugResources [+3995 ms] > Task :app:mergeDebugJniLibFolders [ +1 ms] > Task :app:checkDebugDuplicateClasses [ +1 ms] > Task :app:validateSigningDebug [ ] > Task :app:processDebugManifestForPackage [ +591 ms] > Task :app:processDebugResources [ +109 ms] > Task :app:desugarDebugFileDependencies [+2495 ms] > Task :app:mergeDebugNativeLibs [+9499 ms] > Task :app:compileDebugKotlin [ +702 ms] > Task :app:compileDebugJavaWithJavac [ ] > Task :app:compileDebugSources [ +998 ms] > Task :app:dexBuilderDebug [ +698 ms] > Task :app:mergeDebugJavaResource [+1800 ms] > Task :app:stripDebugDebugSymbols [ ] Unable to strip the following libraries, packaging them as they are: libflutter.so. [ +503 ms] > Task :app:mergeExtDexDebug [ +487 ms] > Task :app:mergeDexDebug [+1712 ms] > Task :app:packageDebug [ +188 ms] > Task :app:assembleDebug [ +1 ms] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. [ ] Use '--warning-mode all' to show the individual deprecation warnings. [ ] See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings [ ] BUILD SUCCESSFUL in 43s [ ] 32 actionable tasks: 31 executed, 1 up-to-date [ +541 ms] Running Gradle task 'assembleDebug'... (completed in 43.9s) [ +30 ms] calculateSha: LocalDirectory: 'C:\Users\Taha\StudioProjects\myapp\build\app\outputs\flutter-apk'/app.apk [ +599 ms] ✓ Built build\app\outputs\flutter-apk\app-debug.apk. [ +4 ms] executing: C:\Users\Taha\Code\android-sdk\build-tools\31.0.0\aapt dump xmltree C:\Users\Taha\StudioProjects\myapp\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml [ +25 ms] Exit code 0 from: C:\Users\Taha\Code\android-sdk\build-tools\31.0.0\aapt dump xmltree C:\Users\Taha\StudioProjects\myapp\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml [ ] N: android=http://schemas.android.com/apk/res/android E: manifest (line=2) A: android:versionCode(0x0101021b)=(type 0x10)0x1 A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0") A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11") A: package="com.example.myapp" (Raw: "com.example.myapp") A: platformBuildVersionCode=(type 0x10)0x1e A: platformBuildVersionName=(type 0x10)0xb E: uses-sdk (line=7) A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e E: uses-permission (line=14) A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET") E: application (line=16) A: android:label(0x01010001)="myapp" (Raw: "myapp") A: android:icon(0x01010002)=@0x7f080000 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory") E: activity (line=21) A: android:theme(0x01010000)=@0x7f0a0000 A: android:name(0x01010003)="com.example.myapp.MainActivity" (Raw: "com.example.myapp.MainActivity") A: android:launchMode(0x0101001d)=(type 0x10)0x1 A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4 A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10 A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff E: meta-data (line=35) A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme") A: android:resource(0x01010025)=@0x7f0a0001 E: intent-filter (line=39) E: action (line=40) A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN") E: category (line=42) A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER") E: meta-data (line=49) A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding") A: android:value(0x01010024)=(type 0x10)0x2 [ +4 ms] Stopping app 'app.apk' on SM M025F. [ +1 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s R9ZR205XX0A shell am force-stop com.example.myapp [ +208 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s R9ZR205XX0A shell pm list packages com.example.myapp [ +215 ms] Installing APK. [ +5 ms] Installing build\app\outputs\flutter-apk\app.apk... [ +1 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s R9ZR205XX0A install -t -r C:\Users\Taha\StudioProjects\myapp\build\app\outputs\flutter-apk\app.apk [+4833 ms] Performing Streamed Install Success [ +2 ms] Installing build\app\outputs\flutter-apk\app.apk... (completed in 4.8s) [ +5 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s R9ZR205XX0A shell echo -n 4d63e11de8520305f4c217688e50ffb7975765e0 > /data/local/tmp/sky.com.example.myapp.sha1 [ +77 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s R9ZR205XX0A shell -x logcat -v time -t 1 [ +558 ms] --------- beginning of main 08-24 14:33:06.198 E/nder:appservic(28103): Not starting debugger since process cannot load the jdwp agent. [ +7 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s R9ZR205XX0A shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true com.example.myapp/com.example.myapp.MainActivity [ +206 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.myapp/.MainActivity (has extras) } [ +1 ms] Waiting for observatory port to be available... [+2419 ms] Observatory URL on device: http://127.0.0.1:33945/Vl03poZ53ys=/ [ +5 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s R9ZR205XX0A forward tcp:0 tcp:33945 [ +34 ms] 51578 [ ] Forwarded host port 51578 to device port 33945 for Observatory [ +4 ms] Caching compiled dill [ +23 ms] Connecting to service protocol: http://127.0.0.1:51578/Vl03poZ53ys=/ [ +707 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:51578/Vl03poZ53ys=/. [ +373 ms] DDS is listening at http://127.0.0.1:51581/jfXQ5nXMtXY=/. [ +46 ms] Successfully connected to service protocol: http://127.0.0.1:51578/Vl03poZ53ys=/ [ +267 ms] DevFS: Creating new filesystem on the device (null) [ +92 ms] DevFS: Created new filesystem on the device (file:///data/user/0/com.example.myapp/code_cache/myappZZMOEZ/myapp/) [ +2 ms] Updating assets [ +65 ms] Syncing files to device SM M025F... [ +2 ms] <- reset [ ] Compiling dart to kernel with 0 updated files [ +2 ms] <- recompile package:myapp/main.dart 1bd9d324-aa6d-4531-bea0-318aaa606eb7 [ ] <- 1bd9d324-aa6d-4531-bea0-318aaa606eb7 [ +33 ms] DevTools activation throttled until 2021-08-24 22:17:57.954729. [ +36 ms] Updating files. [ ] DevFS: Sync finished [ +1 ms] Syncing files to device SM M025F... (completed in 76ms) [ +1 ms] Synced 0.0MB. [ +2 ms] <- accept [ +6 ms] Connected to _flutterView/0xea901810. [ +2 ms] Flutter run key commands. [ +1 ms] r Hot reload. 🔥🔥🔥 [ +1 ms] R Hot restart. [ ] h List all available interactive commands. [ ] d Detach (terminate "flutter run" but leave application running). [ ] c Clear the screen [ ] q Quit (terminate the application on the device). [ ] 💪 Running with sound null safety 💪 [ ] An Observatory debugger and profiler on SM M025F is available at: http://127.0.0.1:51581/jfXQ5nXMtXY=/ [+2326 ms] I/m.example.myap(27582): Thread[6,tid=28197,WaitingInMainSignalCatcherLoop,Thread*=0xeab85800,peer=0x134016f8,"Signal Catcher"]: reacting to signal 28 [ +3 ms] I/m.example.myap(27582): [ +2 ms] I/m.example.myap(27582): SIGSAVEPRF profile save [ +906 ms] I/Gralloc4(27582): mapper 4.x is not supported [ +2 ms] W/Gralloc3(27582): mapper 3.x is not supported [ +252 ms] I/SurfaceView(27582): applySurfaceTransforms: t = android.view.SurfaceControl$Transaction@d6bb5f0 surfaceControl = Surface(name=SurfaceView - com.example.myapp/com.example.myapp.MainActivity@8fce331@0)/@0xfebc769 frame = 1 [ +148 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): MSG_WINDOW_FOCUS_CHANGED 1 1 [ +4 ms] D/InputMethodManager(27582): prepareNavigationBarInfo() DecorView@152fb9f[MainActivity] [ +1 ms] D/InputMethodManager(27582): getNavigationBarColor() -16711423 [ +1 ms] D/InputMethodManager(27582): prepareNavigationBarInfo() DecorView@152fb9f[MainActivity] [ ] D/InputMethodManager(27582): getNavigationBarColor() -16711423 [ ] V/InputMethodManager(27582): Starting input: tba=com.example.myapp ic=null mNaviBarColor -16711423 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false [ ] D/InputMethodManager(27582): startInputInner - Id : 0 [ ] I/InputMethodManager(27582): startInputInner - mService.startInputOrWindowGainedFocus [ +2 ms] The Flutter DevTools debugger and profiler on SM M025F is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:51581/jfXQ5nXMtXY=/ [ +3 ms] D/InputTransport(27582): Input channel constructed: 'ClientS', fd=100 [ ] D/InputMethodManager(27582): prepareNavigationBarInfo() DecorView@152fb9f[MainActivity] [ ] D/InputMethodManager(27582): getNavigationBarColor() -16711423 [ ] V/InputMethodManager(27582): Starting input: tba=com.example.myapp ic=null mNaviBarColor -16711423 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false [ ] D/InputMethodManager(27582): startInputInner - Id : 0 [ +11 ms] I/SurfaceControl(27582): nativeRelease nativeObject s[3993525440] [ +1 ms] I/SurfaceControl(27582): nativeRelease nativeObject e[3993525440] [ ] I/SurfaceControl(27582): nativeRelease nativeObject s[3993525408] [ ] I/SurfaceControl(27582): nativeRelease nativeObject e[3993525408] [+6880 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 0 [ +44 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 1 [+1497 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 0 [ +88 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 1 [ +251 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 0 [ +74 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 1 [ +83 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 0 [ +56 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 1 [ +68 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 0 [ +47 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 1 [ +85 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 0 [ +53 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 1 [ +63 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 0 [ +60 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 1 [ +48 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 0 [ +57 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 1 [+1969 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 0 [ +79 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): ViewPostIme pointer 1 [+29968 ms] D/InputMethodManager(27582): prepareNavigationBarInfo() DecorView@152fb9f[MainActivity] [ +1 ms] D/InputMethodManager(27582): getNavigationBarColor() -16711423 [ ] V/InputMethodManager(27582): Starting input: tba=com.example.myapp ic=null mNaviBarColor -16711423 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false [ ] D/InputMethodManager(27582): startInputInner - Id : 0 [ ] I/InputMethodManager(27582): startInputInner - mService.startInputOrWindowGainedFocus [ ] D/InputTransport(27582): Input channel constructed: 'ClientS', fd=97 [ ] D/InputTransport(27582): Input channel destroyed: 'ClientS', fd=100 [ +406 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): stopped(true) old=false [ +1 ms] I/SurfaceView(27582): windowStopped(true) false io.flutter.embedding.android.FlutterSurfaceView{8fce331 V.E...... ........ 0,0-720,1574} of ViewRootImpl@f75b2bb[MainActivity] [ +19 ms] I/SurfaceView(27582): surfaceDestroyed callback.size 1 #1 io.flutter.embedding.android.FlutterSurfaceView{8fce331 V.E...... ........ 0,0-720,1574} [ +12 ms] I/SurfaceView(27582): remove() io.flutter.embedding.android.FlutterSurfaceView{8fce331 V.E...... ........ 0,0-720,1574} Surface(name=SurfaceView - com.example.myapp/com.example.myapp.MainActivity@8fce331@0)/@0xfebc769 [ +1 ms] I/SurfaceControl(27582): nativeRelease nativeObject s[3993525792] [ +1 ms] I/SurfaceControl(27582): nativeRelease nativeObject e[3993525792] [ ] I/SurfaceControl(27582): nativeRelease nativeObject s[3993525824] [ ] I/SurfaceControl(27582): nativeRelease nativeObject e[3993525824] [ ] I/SurfaceControl(27582): nativeRelease nativeObject s[3993525344] [ ] I/SurfaceControl(27582): nativeRelease nativeObject e[3993525344] [ ] I/SurfaceControl(27582): nativeRelease nativeObject s[3993524640] [ ] I/SurfaceControl(27582): nativeRelease nativeObject e[3993524640] [ ] I/SurfaceView(27582): onWindowVisibilityChanged(4) false io.flutter.embedding.android.FlutterSurfaceView{8fce331 V.E...... ........ 0,0-720,1574} of ViewRootImpl@f75b2bb[MainActivity] [ +30 ms] I/SurfaceControl(27582): assignNativeObject: nativeObject = 0 Surface(name=null)/@0x36fd69e / android.view.SurfaceControl.readFromParcel:1115 android.view.IWindowSession$Stub$Proxy.relayout:1810 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995 [ +11 ms] I/SurfaceControl(27582): assignNativeObject: nativeObject = 0 Surface(name=null)/@0x795c584 / android.view.SurfaceControl.readFromParcel:1115 android.view.IWindowSession$Stub$Proxy.relayout:1820 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995 [ +1 ms] I/SurfaceControl(27582): nativeRelease nativeObject s[3980588768] [ ] I/SurfaceControl(27582): nativeRelease nativeObject e[3980588768] [ +8 ms] I/SurfaceControl(27582): nativeRelease nativeObject s[3980588512] [ ] I/SurfaceControl(27582): nativeRelease nativeObject e[3980588512] [ ] I/SurfaceControl(27582): nativeRelease nativeObject s[3980588192] [ ] I/SurfaceControl(27582): nativeRelease nativeObject e[3980588192] [ ] I/ViewRootImpl@f75b2bb[MainActivity](27582): Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)4 dur=14 res=0x5 s={false 0} ch=false fn=-1 [ +10 ms] I/SurfaceView(27582): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{8fce331 V.E...... ........ 0,0-720,1574} of ViewRootImpl@f75b2bb[MainActivity] [ +9 ms] I/SurfaceControl(27582): assignNativeObject: nativeObject = 0 Surface(name=null)/@0x36fd69e / android.view.SurfaceControl.readFromParcel:1115 android.view.IWindowSession$Stub$Proxy.relayout:1810 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995 [ +11 ms] I/SurfaceControl(27582): assignNativeObject: nativeObject = 0 Surface(name=null)/@0x795c584 / android.view.SurfaceControl.readFromParcel:1115 android.view.IWindowSession$Stub$Proxy.relayout:1820 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995 [ +1 ms] I/SurfaceControl(27582): nativeRelease nativeObject s[3201749376] [ +1 ms] I/SurfaceControl(27582): nativeRelease nativeObject e[3201749376] [ ] I/SurfaceControl(27582): nativeRelease nativeObject s[3201749216] [ ] I/SurfaceControl(27582): nativeRelease nativeObject e[3201749216] [ ] I/SurfaceControl(27582): nativeRelease nativeObject s[3980590944] [ ] I/SurfaceControl(27582): nativeRelease nativeObject e[3980590944] [ ] I/ViewRootImpl@f75b2bb[MainActivity](27582): Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)8 dur=18 res=0x1 s={false 0} ch=false fn=-1 [ +28 ms] I/ViewRootImpl@f75b2bb[MainActivity](27582): MSG_WINDOW_FOCUS_CHANGED 0 1 [ +472 ms] I/SurfaceControl(27582): nativeRelease nativeObject s[3980587712] [ +1 ms] I/SurfaceControl(27582): nativeRelease nativeObject e[3980587712] [ ] I/SurfaceControl(27582): nativeRelease nativeObject s[4012428608] [ ] I/SurfaceControl(27582): nativeRelease nativeObject e[4012428608] [ ] I/SurfaceControl(27582): nativeRelease nativeObject s[3201749696] [ ] I/SurfaceControl(27582): nativeRelease nativeObject e[3201749696] ```
flutter doctor -v ```console [✓] Flutter (Channel master, 2.5.0-7.0.pre.213, on Microsoft Windows [Version 10.0.22000.160], locale en-US) • Flutter version 2.5.0-7.0.pre.213 at C:\Users\Taha\Code\flutter_master • Upstream repository https://github.com/flutter/flutter.git • Framework revision 6dc18ef74e (6 hours ago), 2021-08-24 11:09:04 +0530 • Engine revision 926ce0d855 • Dart version 2.15.0 (build 2.15.0-43.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at C:\Users\Taha\Code\android-sdk • Platform android-31, build-tools 31.0.0 • ANDROID_SDK_ROOT = C:\Users\Taha\Code\android-sdk • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.1) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.11.31613.86 • Windows 10 SDK version 10.0.19041.0 [✓] Android Studio (version 2020.3) • Android Studio at C:\Users\Taha\Code\android-studio • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) [✓] VS Code (version 1.59.1) • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.25.0 [✓] Connected device (6 available) • SM M025F (mobile) • R9ZR205XX0A • android-arm • Android 11 (API 30) • sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.160] • Windows (UWP) (desktop) • winuwp • windows-uwp-x64 • • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159 • Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.78 • No issues found! ```
markusaksli-nc commented 3 years ago

Didn't see any crash on API 28 or API 30 emulator. Don't have any other physical devices to test with atm. The crash still just reproduces on my SM G950F with 2.5.0-7.0.pre.228.

FYI any flutter projects created with an older version don't produce this crash, just the one created with the mentioned master version but I'm not sure what changes occurred in the tool to cause this.

TahaTesser commented 3 years ago

Hi @markusaksli-nc Can you try the following? Just out of curiosity if this fixes the issue

markusaksli-nc commented 3 years ago

Nope. Also I tried flutter create and flutter run on 2.6.0-1.0.pre.59 and ran into the same crash.

flutter doctor -v ``` [√] Flutter (Channel master, 2.6.0-1.0.pre.59, on Microsoft Windows [Version 10.0.19043.1165], locale en-GB) • Flutter version 2.6.0-1.0.pre.59 at C:\Development\flutter_master • Upstream repository https://github.com/flutter/flutter.git • Framework revision 74ac7c476c (3 hours ago), 2021-08-25 23:01:03 -0700 • Engine revision 03d403f46d • Dart version 2.15.0 (build 2.15.0-53.0.dev) [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at C:\Users\marku\AppData\Local\Android\sdk • Platform android-31, build-tools 31.0.0 • Java binary at: C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\203.7621141\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [√] Android Studio (version 2020.3) • Android Studio at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\203.7621141 • Flutter plugin version 59.0.2 • Dart plugin version 203.8292 • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) [√] IntelliJ IDEA Ultimate Edition (version 2021.2) • IntelliJ at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\212.5080.55 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart [√] Connected device (3 available) • SM G950F (mobile) • ce12171c51cc001c03 • android-arm64 • Android 9 (API 28) • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.131 • Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.78 • No issues found! ```
atrope commented 3 years ago

This is also happening here..

As you can see more than 30k users are reporting they can't even open the app...

We are downgrading hoping to find a flutter version without this issue. Tried latest dev and latest beta.


2021-09-02 23:08:56.778 16218-16218/? E/flutter: [ERROR:flutter/fml/platform/android/jni_util.cc(182)] java.lang.SecurityException: Permission Denial: broadcast from android asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS
        at android.os.Parcel.readException(Parcel.java:2029)
        at android.os.Parcel.readException(Parcel.java:1975)
        at android.app.IActivityManager$Stub$Proxy.reportActivityFullyDrawn(IActivityManager.java:8518)
        at android.app.Activity.reportFullyDrawn(Activity.java:2054)
        at io.flutter.embedding.android.FlutterActivity.onFlutterUiDisplayed(Unknown Source:6)
        at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$1.onFlutterUiDisplayed(Unknown Source:6)
        at io.flutter.embedding.android.FlutterView$2.onFlutterUiDisplayed(Unknown Source:28)
        at io.flutter.embedding.engine.FlutterJNI.onFirstFrame(Unknown Source:21)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:325)
        at android.os.Looper.loop(Looper.java:142)
        at android.app.ActivityThread.main(ActivityThread.java:7000)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
2021-09-02 23:08:56.779 16218-16218/? A/flutter: [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1201)] Check failed: fml::jni::CheckException(env). 
2021-09-02 23:08:56.932 16218-16218/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 16218 (ca.suamusicaapp), pid 16218 (ca.suamusicaapp)
2021-09-02 23:08:57.075 16464-16464/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-09-02 23:08:57.075 16464-16464/? A/DEBUG: Build fingerprint: 'samsung/on7xelteub/on7xelte:8.1.0/M1AJQ/G610MUBS8CTG1:user/release-keys'
2021-09-02 23:08:57.075 16464-16464/? A/DEBUG: Revision: '4'
2021-09-02 23:08:57.075 16464-16464/? A/DEBUG: ABI: 'arm'
2021-09-02 23:08:57.075 16464-16464/? A/DEBUG: pid: 16218, tid: 16218, name: ca.suamusicaapp  >>> suamusica.suamusicaapp <<<
2021-09-02 23:08:57.075 16464-16464/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2021-09-02 23:08:57.084 16464-16464/? A/DEBUG: Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1201)] Check failed: fml::jni::CheckException(env). 
    '
2021-09-02 23:08:57.084 16464-16464/? A/DEBUG:     r0 00000000  r1 00003f5a  r2 00000006  r3 00000008
2021-09-02 23:08:57.084 16464-16464/? A/DEBUG:     r4 00003f5a  r5 00003f5a  r6 ffba3844  r7 0000010c
2021-09-02 23:08:57.084 16464-16464/? A/DEBUG:     r8 00000000  r9 c7b6e8e0  sl c77ad5fc  fp ffba39d0
2021-09-02 23:08:57.084 16464-16464/? A/DEBUG:     ip 00000002  sp ffba3830  lr e9e37e6f  pc e9e31528  cpsr 200d0030
2021-09-02 23:08:57.085 16464-16464/? A/DEBUG: backtrace:
2021-09-02 23:08:57.085 16464-16464/? A/DEBUG:     #00 pc 0001a528  /system/lib/libc.so (abort+63)
2021-09-02 23:08:57.085 16464-16464/? A/DEBUG:     #01 pc 00011a5f  /data/app/suamusica.suamusicaapp-RiJDJjUmx0pXscOaNPYRig==/lib/arm/libflutter.so (offset 0x13d000)

image

atrope commented 3 years ago

I Can now confirm that it happens in any flutter version 2.5+ Downgrading to 2.4.0-4.2.pre works.

TahaTesser commented 3 years ago

This looks like a regression in 2.5 cc: @stuartmorgan

atrope commented 3 years ago

A Few more data.. Mostly happens on Samsung Devices. Android 8/8.1 is the worst followed by 7/7.1.

Also seen on Android 6,9,10

Let me know if i can provide more data.

Thanks

stuartmorgan commented 3 years ago

/cc @blasten

blasten commented 3 years ago

I was unable to repro this issue on "SM G981B • android-arm64 • Android 10 (API 29)". still investigating

blasten commented 3 years ago

I'm also unable to reproduce the issue in "SM N960U1 (mobile) • android-arm64 • Android 9 (API 28)".

@atrope are you able to reproduce this issue by just running flutter create app && cd app && flutter run?

flutter doctor ``` Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel unknown, 2.6.0-1.0.pre.175, on macOS 11.5.2 20G95 darwin-x64, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 12.5) [✓] Chrome - develop for the web [✓] Android Studio (version 4.1) [✓] VS Code (version 1.59.0) [✓] Connected device (3 available) • No issues found! ```
atrope commented 3 years ago

@blasten will try it now and bring you the results

atrope commented 3 years ago

Hi @blasten ,

With mine SM G610M 8.1 is not happening with default create app. i will try to achieve a minimum example trying to copy parts of the project that is happening.

blasten commented 3 years ago

Sounds good. I suggest to start by importing the same plugins.

markusaksli-nc commented 3 years ago

I have older projects that work on master and the flutter create project still crashes for me. I could try to diff the android directory but since you can't repro it I'm not sure it would help.

markusaksli-nc commented 3 years ago

This diff makes the project crash for me https://github.com/markusaksli-nc/android-crash-diff/commit/774229f3af83dd5cfc3aaa02688c39adb62300d8 which is https://github.com/flutter/flutter/pull/87619

atrope commented 3 years ago

I Still don't know how it happens. With default app and @markusaksli-nc android dir(latest commit), it does not crash in my phone..

with my actual app release it crash more often when i reboot the phone and install again the app in release mode (but not always...)

I Tried to put all my plugins in a fresh create app and it does not happens every time..

atrope commented 3 years ago

What i do know is that it happens in versions 2.5+ (I Deployed version 2.4 again to production and it does not happen anymore)..

@markusaksli-nc are you using any plugins?

markusaksli-nc commented 3 years ago

No like I said, for me, it crashes with just the template flutter create app for likely any flutter version with https://github.com/flutter/flutter/pull/87619

TahaTesser commented 3 years ago

cc: @escamoteur

From https://github.com/flutter/flutter/issues/88767#issuecomment-913820549, "are you using any plugins?"

Is the issue reproducible with the just a template?

escamoteur commented 3 years ago

I just tested it. I can't reproduce it only with the default template. My Project uses a whole bunch of plugins and it also uses a splash screen if that could be a reason.

Klazyo commented 3 years ago

Try this work-around that worked for me when the app builds and you get that white screen just before it craches lock your phone then reopen it after that u can rebuild and hot reload with no problem try it multiple time till it works

tvolkert commented 3 years ago

@blasten my read on this is that it's not common enough to warrant cherrypicking a fix (once we identify the fix) into the 2.5 release. Once we root-cause this, please escalate to me if you think I was wrong and the fix should be cherrypicked.

blasten commented 3 years ago

@tvolkert sg.

@atrope are you still able to reproduce the issue locally when you run the app you have in the Play Store using Flutter 2.5+? If this is the case, I would suggest to start there. Try to remove any private code, and once you have something that you could share, please send it to us, so we can analyze it.

syzhugh commented 3 years ago

I have the same problem . And my flutter version is 1.20.4.

Mostly happens on Samsung Devices. Android os version is in 7 to 9.

[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.7 19H2, locale
    zh-Hans-CN)
    • Flutter version 1.20.4 at /Users/didi/.taco/flutter/master/flutter
    • Framework revision fba99f6cf9 (12 months ago), 2020-09-14 15:32:52 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/didi/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Users/didi/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor
      --android-licenses
atrope commented 3 years ago

I dos not had time this week tô this issue.. maybe tomorrow i Will bê able to!

Now with 2.5 stable i think this issue Will get more and more popular as apps Will be updated and crashes Will Go through the roof..

(Only from downgrading to 2.4 i had 98.7% less crashes on play store metrics)

Captura de Tela 2021-09-08 às 19 26 32
atrope commented 3 years ago

@blasten, Ok I got somewhere.. as @markusaksli-nc said it appears to be related to the splash screen..

With Flutter's default create of 2.5 stable it is creating with

<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background"/>

When trying to run default app in testlab it pass all tests.

When i Removed this meta-data and tried to run, it crashed in some devices With our crash here..

Captura de Tela 2021-09-09 às 23 51 06

Those are the devices I tested:

gcloud firebase test android run --type instrumentation \
    --app build/app/outputs/apk/"$MODE"/app-"$MODE".apk \
    --test build/app/outputs/apk/androidTest/"$MODE"/app-"$MODE"-androidTest.apk\
    --timeout 6m \
    --use-orchestrator \
    --no-auto-google-login \
    --async  \
    --device=model=hero2qlteatt,version=26 \
    --device=model=poseidonlteatt,version=26 \
    --device=model=star2qlteue,version=26 \
    --device=model=starlte,version=26 \
    --device=model=pettyl,version=27 \
    --device=model=crownqlteue,version=27 \
    --device=model=j7popltevzw,version=27 \

Will now try to put that metadata back in my production app and test in firebase testlab.

atrope commented 3 years ago

Ok now i am pretty confident that adding <meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" /> back to manifest is a valid workaround and makes the app not break.

We should remove the recommendation for users to remove it from Manifest (this is why i removed in first place) as it may lead to unexpeted crashes

TheJulianJES commented 3 years ago

Nice find! In my project, I'm (still) only using "LaunchTheme" (not even "NormalTheme", the Android S way, or io.flutter.embedding.android.SplashScreenDrawable). https://flutter.dev/docs/development/ui/advanced/splash-screen?tab=android-splash-alignment-java-tab#set-up-the-flutteractivity-in-androidmanifestxml

I'm still getting the same exception on some (Samsung) devices.

Interestingly, I don't get the exception on some of the devices you're getting them on. I guess it only crashes sometimes(?) Bildschirmfoto 2021-09-10 um 05 37 14

ghost commented 3 years ago

I have also encountered similar problems, there is no permission (java.lang.SecurityException) at startup, and android:exported="true" may be required. If you do not fill in this field, Android Studio 2021 will have a warning, i can debug the Flutter program normally after adding android:exported="true". image

        <activity
            android:name="xxx.xxx.MainActivity"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:exported="true"
            android:hardwareAccelerated="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:windowSoftInputMode="adjustResize"
            tools:targetApi="honeycomb">
ahaboubi commented 3 years ago

@blasten, Ok I got somewhere.. as @markusaksli-nc said it appears to be related to the splash screen..

With Flutter's default create of 2.5 stable it is creating with

<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background"/>

When trying to run default app in testlab it pass all tests.

When i Removed this meta-data and tried to run, it crashed in some devices With our crash here..

Captura de Tela 2021-09-09 às 23 51 06

Those are the devices I tested:

gcloud firebase test android run --type instrumentation \
    --app build/app/outputs/apk/"$MODE"/app-"$MODE".apk \
    --test build/app/outputs/apk/androidTest/"$MODE"/app-"$MODE"-androidTest.apk\
    --timeout 6m \
    --use-orchestrator \
    --no-auto-google-login \
    --async  \
    --device=model=hero2qlteatt,version=26 \
    --device=model=poseidonlteatt,version=26 \
    --device=model=star2qlteue,version=26 \
    --device=model=starlte,version=26 \
    --device=model=pettyl,version=27 \
    --device=model=crownqlteue,version=27 \
    --device=model=j7popltevzw,version=27 \

Will now try to put that metadata back in my production app and test in firebase testlab.

Adding <meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background"/> fixed the issue for me!

Klazyo commented 3 years ago

<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" /> Doesnt work for me phone SM G930F

atrope commented 3 years ago

@Klazyo do you have android/app/src/main/res/drawable/launch_background.xml? And if you do the bitmap is there also?

Can you put the error here?

Klazyo commented 3 years ago

@atrope I have launch_background.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@android:color/white" />

    <!-- You can insert your own image assets here -->
    <!-- <item>
        <bitmap
            android:gravity="center"
            android:src="@mipmap/launch_image" />
    </item> -->
</layer-list>

The crash error

Launching lib\main.dart on SM G930F in debug mode...
Running Gradle task 'assembleDebug'...
√  Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
Debug service listening on ws://127.0.0.1:8704/D2dokbnex3Y=/ws
Syncing files to device SM G930F...
I/zygote64( 1409): Compiler allocated 8MB to compile void android.view.ViewRootImpl.performTraversals()
D/libGLESv2( 1409): STS_GLApi : DTS, ODTC are not allowed for Package : com.example.sparter
I/zygote64( 1409): find the special shared library, skip check
I/zygote64( 1409): find the special shared library, skip check
I/DynamiteModule( 1409): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:212104400
I/DynamiteModule( 1409): Selected remote version of com.google.android.gms.ads.dynamite, version >= 212104400
D/DynamitePackage( 1409): Instantiated singleton DynamitePackage.
D/DynamitePackage( 1409): Instantiating com.google.android.gms.ads.ChimeraMobileAdsSettingManagerCreatorImpl
D/ConnectivityManager( 1409): requestNetwork; CallingUid : 10846, CallingPid : 1409
I/Ads     ( 1409): Updating ad debug logging enablement.
W/ConnectionStatusConfig( 1409): Dynamic lookup for intent failed for action: com.google.android.gms.leibniz.events.service.START
E/GmsClient( 1409): unable to connect to service: com.google.android.gms.leibniz.events.service.START on com.google.android.gms
I/zygote64( 1409): no shared libraies, dex_files: 1
I/zygote64( 1409): Background concurrent copying GC freed 32075(2MB) AllocSpace objects, 15(704KB) LOS objects, 49% free, 2MB/5MB, paused 5.339ms total 63.582ms
I/WebViewFactory( 1409): Loading com.android.chrome version 93.0.4577.62 (code 457706223)
I/cr_WVCFactoryProvider( 1409): Loaded version=93.0.4577.62 minSdkVersion=24 isBundle=true multiprocess=true packageId=2
I/cr_LibraryLoader( 1409): Successfully loaded native library
I/cr_CachingUmaRecorder( 1409): Flushed 7 samples from 7 histograms.
W/ResourceType( 1409): Failure getting entry for 0x7f1307bc (t=18 e=1980) (error -2147483647)
W/chromium( 1409): [WARNING:dns_config_service_android.cc(153)] Failed to read DnsConfig.
D/ConnectivityManager( 1409): requestNetwork; CallingUid : 10846, CallingPid : 1409
W/cr_media( 1409): Requires BLUETOOTH permission
I/Choreographer( 1409): Skipped 55 frames!  The application may be doing too much work on its main thread.
W/Ads     ( 1409): Update ad debug logging enablement as false
W/System  ( 1409): Ignoring header X-Firebase-Locale because its value was null.
I/System.out( 1409): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out( 1409): (HTTPLog)-Static: isSBSettingEnabled false
W/DynamiteModule( 1409): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
D/ConnectivityManager( 1409): requestNetwork; CallingUid : 10846, CallingPid : 1409
I/DynamiteModule( 1409): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 1409): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
I/flutter ( 1409): 0          .....it set the build 
V/NativeCrypto( 1409): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 294 native methods...
I/ProviderInstaller( 1409): Installed default security provider GmsCore_OpenSSL
D/ConnectivityManager( 1409): requestNetwork; CallingUid : 10846, CallingPid : 1409
W/ManagedChannelImpl( 1409): [{0}] Failed to resolve name. status={1}
W/Firestore( 1409): (23.0.3) [WatchStream]: (e82c094) Stream closed with status: Status{code=UNAVAILABLE, description=Unable to resolve host firestore.googleapis.com, cause=java.lang.RuntimeException: java.net.UnknownHostException: Unable to resolve host "firestore.googleapis.com": No address associated with hostname
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver.resolveAll(DnsNameResolver.java:436)
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver$Resolve.resolveInternal(DnsNameResolver.java:272)
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:228)
W/Firestore( 1409):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
W/Firestore( 1409):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
W/Firestore( 1409):     at java.lang.Thread.run(Thread.java:764)
W/Firestore( 1409): Caused by: java.net.UnknownHostException: Unable to resolve host "firestore.googleapis.com": No address associated with hostname
W/Firestore( 1409):     at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:141)
W/Firestore( 1409):     at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:90)
W/Firestore( 1409):     at java.net.InetAddress.getAllByName(InetAddress.java:787)
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver$JdkAddressResolver.resolveAddress(DnsNameResolver.java:646)
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver.resolveAll(DnsNameResolver.java:404)
W/Firestore( 1409):     ... 5 more
W/Firestore( 1409): Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
W/Firestore( 1409):     at libcore.io.Linux.android_getaddrinfo(Native Method)
W/Firestore( 1409):     at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:58)
W/Firestore( 1409):     at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:122)
W/Firestore( 1409):     ... 9 more
W/Firestore( 1409): }.
W/Firestore( 1409): (23.0.3) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: Status{code=UNAVAILABLE, description=Unable to resolve host firestore.googleapis.com, cause=java.lang.RuntimeException: java.net.UnknownHostException: Unable to resolve host "firestore.googleapis.com": No address associated with hostname
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver.resolveAll(DnsNameResolver.java:436)
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver$Resolve.resolveInternal(DnsNameResolver.java:272)
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:228)
W/Firestore( 1409):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
W/Firestore( 1409):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
W/Firestore( 1409):     at java.lang.Thread.run(Thread.java:764)
W/Firestore( 1409): Caused by: java.net.UnknownHostException: Unable to resolve host "firestore.googleapis.com": No address associated with hostname
W/Firestore( 1409):     at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:141)
W/Firestore( 1409):     at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:90)
W/Firestore( 1409):     at java.net.InetAddress.getAllByName(InetAddress.java:787)
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver$JdkAddressResolver.resolveAddress(DnsNameResolver.java:646)
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver.resolveAll(DnsNameResolver.java:404)
W/Firestore( 1409):     ... 5 more
W/Firestore( 1409): Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
W/Firestore( 1409):     at libcore.io.Linux.android_getaddrinfo(Native Method)
W/Firestore( 1409):     at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:58)
W/Firestore( 1409):     at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:122)
W/Firestore( 1409):     ... 9 more
W/Firestore( 1409): }
W/Firestore( 1409): This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
I/zygote64( 1409): Do full code cache collection, code=248KB, data=170KB
I/zygote64( 1409): After code cache collection, code=231KB, data=142KB
W/Firestore( 1409): (23.0.3) [WatchStream]: (e82c094) Stream closed with status: Status{code=UNAVAILABLE, description=Unable to resolve host firestore.googleapis.com, cause=java.lang.RuntimeException: java.net.UnknownHostException: Unable to resolve host "firestore.googleapis.com": No address associated with hostname
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver.resolveAll(DnsNameResolver.java:436)
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver$Resolve.resolveInternal(DnsNameResolver.java:272)
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:228)
W/Firestore( 1409):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
W/Firestore( 1409):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
W/Firestore( 1409):     at java.lang.Thread.run(Thread.java:764)
W/Firestore( 1409): Caused by: java.net.UnknownHostException: Unable to resolve host "firestore.googleapis.com": No address associated with hostname
W/Firestore( 1409):     at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:141)
W/Firestore( 1409):     at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:90)
W/Firestore( 1409):     at java.net.InetAddress.getAllByName(InetAddress.java:787)
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver$JdkAddressResolver.resolveAddress(DnsNameResolver.java:646)
W/Firestore( 1409):     at io.grpc.internal.DnsNameResolver.resolveAll(DnsNameResolver.java:404)
W/Firestore( 1409):     ... 5 more
W/Firestore( 1409): Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
W/Firestore( 1409):     at libcore.io.Linux.android_getaddrinfo(Native Method)
W/Firestore( 1409):     at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:58)
W/Firestore( 1409):     at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:122)
W/Firestore( 1409):     ... 9 more
W/Firestore( 1409): }.
W/ManagedChannelImpl( 1409): [{0}] Failed to resolve name. status={1}
E/flutter ( 1409): [ERROR:flutter/fml/platform/android/jni_util.cc(182)] java.lang.SecurityException: Permission Denial: broadcast from android asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS
E/flutter ( 1409):  at android.os.Parcel.readException(Parcel.java:1967)
E/flutter ( 1409):  at android.os.Parcel.readException(Parcel.java:1913)
E/flutter ( 1409):  at android.app.IActivityManager$Stub$Proxy.reportActivityFullyDrawn(IActivityManager.java:8587)
E/flutter ( 1409):  at android.app.Activity.reportFullyDrawn(Activity.java:2015)
E/flutter ( 1409):  at io.flutter.embedding.android.FlutterActivity.onFlutterUiDisplayed(FlutterActivity.java:1061)
E/flutter ( 1409):  at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$1.onFlutterUiDisplayed(FlutterActivityAndFragmentDelegate.java:88)
E/flutter ( 1409):  at io.flutter.embedding.android.FlutterView$2.onFlutterUiDisplayed(FlutterView.java:133)
E/flutter ( 1409):  at io.flutter.embedding.engine.FlutterJNI.onFirstFrame(FlutterJNI.java:461)
E/flutter ( 1409):  at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter ( 1409):  at android.os.MessageQueue.next(MessageQueue.java:325)
E/flutter ( 1409):  at android.os.Looper.loop(Looper.java:142)
E/flutter ( 1409):  at android.app.ActivityThread.main(ActivityThread.java:6944)
E/flutter ( 1409):  at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 1409):  at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
E/flutter ( 1409):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
E/flutter ( 1409): 
F/flutter ( 1409): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1201)] Check failed: fml::jni::CheckException(env). 
E/flutter ( 1409): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: SocketException: Failed host lookup: 'ip-api.com' (OS Error: No address associated with hostname, errno = 7)
E/flutter ( 1409): #0      _NativeSocket.startConnect (dart:io-patch/socket_patch.dart:677:35)
E/flutter ( 1409): #1      _RawSocket.startConnect (dart:io-patch/socket_patch.dart:1680:26)
E/flutter ( 1409): #2      RawSocket.startConnect (dart:io-patch/socket_patch.dart:27:23)
E/flutter ( 1409): #3      Socket._startConnect (dart:io-patch/socket_patch.dart:1891:22)
E/flutter ( 1409): #4      Socket.startConnect (dart:io/socket.dart:738:21)
E/flutter ( 1409): #5      _ConnectionTarget.connect (dart:_http/http_impl.dart:2439:18)
E/flutter ( 1409): #6      _HttpClient._getConnection.connect (dart:_http/http_impl.dart:2805:12)
E/flutter ( 1409): #7      _HttpClient._getConnection (dart:_http/http_impl.dart:2810:12)
E/flutter ( 1409): #8      _HttpClient._openUrl (dart:_http/http_impl.dart:2694:12)
E/flutter ( 1409): #9      _HttpClient.openUrl (dart:_http/http_impl.dart:2568:7)
E/flutter ( 1409): #10     IOClient.send (package:http/src/io_client.dart:30:38)
E/flutter ( 1409): #11     BaseClient._sendUnstreamed (package:http/src/base_client.dart:93:38)
E/flutter ( 1409): #12     BaseClient.get (package:http/src/base_client.dart:27:7)
E/flutter ( 1409): #13     get.<anonymous closure> (package:http/http.dart:46:36)
E/flutter ( 1409): #14     _withClient (package:http/http.dart:164:20)
E/flutter ( 1409): #15     get (package:http/http.dart:46:5)
E/flutter ( 1409): #16     _HomeState.initState (package:sparter/wraper/Home.dart:201:7)
E/flutter ( 1409): #17     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4805:57)
E/flutter ( 1409): #18     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4638:5)
E/flutter ( 1409): #19     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3673:14)
E/flutter ( 1409): #20     Element.updateChild (package:flutter/src/widgets/framework.dart:3425:18)
E/flutter ( 1409): #21     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4690:16)
E/flutter ( 1409): #22     Element.rebuild (package:flutter/src/widgets/framework.dart:4355:5)
E/flutter ( 1409): #23     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4643:5)
E/flutter ( 1409): #24     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4638:5)
E/flutter ( 1409): #25     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3673:14)
E/flutter ( 1409): #26     Element.updateChild (package:flutter/src/widgets/framework.dart:3425:18)
E/flutter ( 1409): #27     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4690:16)
E/flutter ( 1409): #28     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4840:11)
E/flutter ( 1409): #29     Element.rebuild (package:flutter/src/widgets/framework.dart:4355:5)
E/flutter ( 1409): #30     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4643:5)
E/flutter ( 1409): #31     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4831:11)
E/flutter ( 1409): #32     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4638:5)
E/flutter ( 1409): #33     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3673:14)
E/flutter ( 1409): #34     Element.updateChild (package:flutter/src/widgets/framework.dart:3422:20)
E/flutter ( 1409): #35     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4690:16)
E/flutter ( 1409): #36     Element.rebuild (package:flutter/src/widgets/framework.dart:4355:5)
E/flutter ( 1409): #37     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2620:33)
E/flutter ( 1409): #38     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:882:21)
E/flutter ( 1409): #39     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:319:5)
E/flutter ( 1409): #40     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1143:15)
E/flutter ( 1409): #41     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1080:9)
E/flutter ( 1409): #42     SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:863:7)
E/flutter ( 1409): #43     _rootRun (dart:async/zone.dart:1420:47)
E/flutter ( 1409): #44     _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter ( 1409): #45     _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
E/flutter ( 1409): #46     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1276:23)
E/flutter ( 1409): #47     _rootRun (dart:async/zone.dart:1428:13)
E/flutter ( 1409): #48     _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter ( 1409): #49     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1260:23)
E/flutter ( 1409): #50     Timer._createTimer.<anonymous 
F/libc    ( 1409): Fatal signal 6 (SIGABRT), code -6 in tid 1409 (example.sparter)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/heroltexx/herolte:8.0.0/R16NW/G930FXXS8ETCA:user/release-keys'
Revision: '8'
ABI: 'arm64'
pid: 1409, tid: 1409, name: example.sparter  >>> com.example.sparter <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1201)] Check failed: fml::jni::CheckException(env). 
'
    x0   0000000000000000  x1   0000000000000581  x2   0000000000000006  x3   0000000000000008
    x4   0000800000000000  x5   0000800000000000  x6   0000800000000000  x7   0000000000800000
    x8   0000000000000083  x9   bac918b43fc58c49  x10  0000000000000000  x11  0000000000000001
    x12  ffffffffffffffff  x13  0000000000000028  x14  ffffffffffffffff  x15  000084ee7fafa2b6
    x16  0000007fb20f42f8  x17  0000007fb2095408  x18  000000001397f930  x19  0000000000000581
    x20  0000000000000581  x21  0000007ff70d7848  x22  0000007f89557970  x23  0000007f89557958
    x24  000000000000003d  x25  0000007ff70d7ab8  x26  0000000000000000  x27  0000000000000001
    x28  000000000000003d  x29  0000007ff70d7820  x30  0000007fb2047bd4
    sp   0000007ff70d77e0  pc   0000007fb2095410  pstate 0000000060000000
backtrace:
    #00 pc 000000000006b410  /system/lib64/libc.so (tgkill+8)
    #01 pc 000000000001dbd0  /system/lib64/libc.so (abort+88)
    #02 pc 000000000000205c  /data/app/com.example.sparter-dbtrM5ICj_rLntvRGWT3dw==/lib/arm64/libflutter.so (offset 0x1453000)
Lost connection to device.

But like i said if i lock my phone while it builds then reopen it the app works and i can debug without problem

blasten commented 3 years ago

This issue is related to https://github.com/flutter/flutter/issues/46172, and exacerbated after recent changes in https://github.com/flutter/engine/pull/27645 by @jiahaog

blasten commented 3 years ago

To summarize the problem, we made a recent change that removed the need of a custom Android layout used to replicate the Android splash screen while the user was waiting for the Flutter first frame. This was achieved by using a predraw listener that allows Android to suspend rendering of any native Android view.

However, when reportFullyDrawn() is called, it triggers this exception on Samsung devices for reasons I wasn't able to find. There have been some related issues in the past that suggests unclear behavior in some configurations that Flutter supports.

I wonder if we need to call reportFullyDrawn after using the predraw listener. Presumably, using the predraw listener means that Android doesn't need another call to know when the first frame was drawn.

cc @xster do you know who from the Android team can confirm this?

sajanyamaha commented 3 years ago

Any update guys , This is now happening in all channels , stable was working for me for sometime , also the bug created by me is closed here https://github.com/flutter/flutter/issues/89307

And adding this meta tag doesnt make any difference ,

<meta-data
            android:name="io.flutter.embedding.android.SplashScreenDrawable"
            android:resource="@drawable/launch_background"
            />
syzhugh commented 3 years ago

I have the same problem . And my flutter version is 1.20.4.

Mostly happens on Samsung Devices. Android os version is in 7 to 9.

[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.7 19H2, locale
    zh-Hans-CN)
    • Flutter version 1.20.4 at /Users/didi/.taco/flutter/master/flutter
    • Framework revision fba99f6cf9 (12 months ago), 2020-09-14 15:32:52 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/didi/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Users/didi/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor
      --android-licenses

@blasten my version is 1.20.4

blasten commented 3 years ago

/cc @christopherfujino for cherrypick

atrope commented 3 years ago

@blasten shouldn't we also remove the warning "A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps."

It would also create a crash wouldn't?

blasten commented 3 years ago

No, it shouldn't crash. The splash screen wasn't the reason of the crash. We refactored the code a bit, and added some code that caused this issue.

syzhugh commented 3 years ago

@blasten Hi ~ I want to know why the flutter need to invoke the method reportFullyDrawn . Is this necessary?

sajanyamaha commented 3 years ago

@blasten saw your commit to master , is it now available for pull ? as I can still see the same error with Samsung Android Ver 9 , as per your commit this issue should not come for anything less than Ver 10 right ?

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
      reportFullyDrawn();
    }

For me still erroring , I did

flutter channel master
flutter upgrade
markusaksli-nc commented 3 years ago

@sajanyamaha I think the engine PR hasn't been autorolled into the SDK yet?

sajanyamaha commented 3 years ago

@markusaksli-nc is it working for you now ? and what is the flutter version in stable which is still working , when I downgraded the JAVA_HOME issues popped up

tvolkert commented 3 years ago

@sajanyamaha as @markusaksli-nc says, the fix hasn't rolled into the framework yet (the autoroller is currently 4 days behind ToT), so it's not yet in any version of Flutter that has a prebuilt engine.

If you like, you can compile the engine against ToT and build your app against the local engine using the --local-engine flag.

sajanyamaha commented 3 years ago

This is a workaround and it works for me .

  1. go to MainActivity.kt
  2. Import import android.os.Build
  3. Paste this
    override fun onFlutterUiDisplayed() {
        if (Build.VERSION.SDK_INT >= 100) { //I gave 100 just to confirm , it shoud be android ver 10
            reportFullyDrawn();
        }
    }
  4. flutter clean
  5. flutter run
blasten commented 3 years ago

@sajanyamaha I tested the change on Samsung devices available on Firebase testlab running Q (API level 29), and didn't find an issue.