Closed markusaksli-nc closed 3 years ago
@flutter-symbolizer-bot https://github.com/flutter/flutter/issues/88767#issue-977757416 engine#926ce0d855 debug
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>
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?
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.
Hi @markusaksli-nc Can you try the following? Just out of curiosity if this fixes the issue
Nope. Also I tried flutter create
and flutter run
on 2.6.0-1.0.pre.59
and ran into the same crash.
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)
I Can now confirm that it happens in any flutter version 2.5+ Downgrading to 2.4.0-4.2.pre works.
This looks like a regression in 2.5 cc: @stuartmorgan
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
/cc @blasten
I was unable to repro this issue on "SM G981B • android-arm64 • Android 10 (API 29)". still investigating
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
?
@blasten will try it now and bring you the results
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.
Sounds good. I suggest to start by importing the same plugins.
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.
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
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..
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?
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
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?
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.
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
@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.
@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.
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
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)
@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..
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.
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
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(?)
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"
.
<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">
@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..
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!
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" />
Doesnt work for me phone SM G930F
@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?
@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
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
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?
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"
/>
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
/cc @christopherfujino for cherrypick
@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?
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.
@blasten Hi ~ I want to know why the flutter need to invoke the method reportFullyDrawn . Is this necessary?
@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
@sajanyamaha I think the engine PR hasn't been autorolled into the SDK yet?
@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
@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.
This is a workaround and it works for me .
MainActivity.kt
import android.os.Build
override fun onFlutterUiDisplayed() {
if (Build.VERSION.SDK_INT >= 100) { //I gave 100 just to confirm , it shoud be android ver 10
reportFullyDrawn();
}
}
flutter clean
flutter run
@sajanyamaha I tested the change on Samsung devices available on Firebase testlab running Q (API level 29), and didn't find an issue.
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 runningflutter create
andflutter 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 0000000000000020Only found one related issue but it got closed due to timeout https://github.com/flutter/flutter/issues/71638.