2 years ago

#65039

test-img

Vikas Jilla

App stuck at black screen after upgraded from flutter 1.22.2 to flutter 2.5.3

After upgrading flutter, if I run the app from Android studio, I am consistently getting black screen. And If we create release bundle then opening the app and closing we are getting black screen 2 in 5 times.

And when shared the play console internal testing, after install and first open it is stuck at black screen and until user kills the app and reopen then it is opening. Even in this case also once in 3 times of closing and opening it is giving black screen.

2022-01-18 17:21:02.472 31430-31430/? I/lix.sample: Late-enabling -Xcheck:jni
2022-01-18 17:21:02.551 31430-31430/? I/lix.sample: Unquickening 26 vdex files!
2022-01-18 17:21:02.618 31430-31430/? D/ActivityThread: setConscryptValidator
2022-01-18 17:21:02.619 31430-31430/? D/ActivityThread: setConscryptValidator - put
2022-01-18 17:21:02.689 31430-31430/com.example.sample D/ActivityThread: handleBindApplication()++ app=com.example.sample
         DEVICE | 0x78c683e3e0 | 0002 | RGBx_8888    |    0.0  480.0 2560.0 2080.0 |    0    0 2560 1600 | com.android.systemui.ImageWallpaper$_1872#0
2022-01-18 17:21:02.472 31430-31430/? I/lix.sample: Late-enabling -Xcheck:jni
2022-01-18 17:21:02.551 31430-31430/? I/lix.sample: Unquickening 26 vdex files!
2022-01-18 17:21:02.618 31430-31430/? D/ActivityThread: setConscryptValidator
2022-01-18 17:21:02.619 31430-31430/? D/ActivityThread: setConscryptValidator - put
2022-01-18 17:21:02.689 31430-31430/com.example.sample D/ActivityThread: handleBindApplication()++ app=com.example.sample
2022-01-18 17:21:02.472 31430-31430/? I/lix.sample: Late-enabling -Xcheck:jni
2022-01-18 17:21:02.551 31430-31430/? I/lix.sample: Unquickening 26 vdex files!
2022-01-18 17:21:02.618 31430-31430/? D/ActivityThread: setConscryptValidator
2022-01-18 17:21:02.619 31430-31430/? D/ActivityThread: setConscryptValidator - put
2022-01-18 17:21:02.689 31430-31430/com.example.sample D/ActivityThread: handleBindApplication()++ app=com.example.sample
2022-01-18 17:21:03.281 31430-31430/com.example.sample D/LoadedApk: LoadedApk::makeApplication() appContext=android.app.ContextImpl@ef78042 appContext.mOpPackageName=com.example.sample appContext.mBasePackageName=com.example.sample appContext.mPackageInfo=android.app.LoadedApk@d81e853
2022-01-18 17:21:03.282 31430-31430/com.example.sample D/NetworkSecurityConfig: Using Network Security Config from resource network_security_config debugBuild: true
2022-01-18 17:21:03.330 31430-31430/com.example.sample D/NetworkSecurityConfig: Using Network Security Config from resource network_security_config debugBuild: true
2022-01-18 17:21:03.392 31430-31430/com.example.sample I/FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT]
2022-01-18 17:21:03.470 31430-31430/com.example.sample I/FirebaseInitProvider: FirebaseApp initialization successful
2022-01-18 17:21:03.472 31430-31430/com.example.sample D/FLTFireContextHolder: received application context.
2022-01-18 17:21:03.511 31430-31430/com.example.sample D/ActivityThread: handleBindApplication() -- skipGraphicsSupport=false
2022-01-18 17:21:03.529 31430-32714/com.example.sample I/ResourceExtractor: Found extracted resources res_timestamp-85-1642506494019
2022-01-18 17:21:03.529 31430-32714/com.example.sample I/ResourceExtractor: Resource version mismatch res_timestamp-85-1642506661529
2022-01-18 17:21:03.556 31430-31430/com.example.sample I/sampleTestBed: in Application class on create82a8af868409226a
2022-01-18 17:21:03.591 31430-32733/com.example.sample I/AdrenoGLES-0: QUALCOMM build                   : 4fb6cde, I78bcc4c05a
    Build Date                       : 12/15/20
    OpenGL ES Shader Compiler Version: EV031.32.02.06
    Local Branch                     : mybrancheb3e9cd6-ca89-f13d-b631-08f1eafda2d0
    Remote Branch                    : quic/gfx-adreno.lnx.1.0.r114-rel
    Remote Branch                    : NONE
    Reconstruct Branch               : NOTHING
2022-01-18 17:21:03.591 31430-32733/com.example.sample I/AdrenoGLES-0: Build Config                     : S P 10.0.7 AArch64
2022-01-18 17:21:03.591 31430-32733/com.example.sample I/AdrenoGLES-0: Driver Path                      : /vendor/lib64/egl/libGLESv2_adreno.so
2022-01-18 17:21:03.597 31430-32733/com.example.sample I/AdrenoGLES-0: PFP: 0x016ee190, ME: 0x00000000
2022-01-18 17:21:03.603 31430-31430/com.example.sample I/MainActivity: keys and data from intent
2022-01-18 17:21:03.604 31430-31430/com.example.sample I/MainActivity: data received from applink null app link action android.intent.action.MAINintent Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.sample/com.example.example.MainActivity }
2022-01-18 17:21:03.623 31430-31430/com.example.sample I/DecorView: [INFO] isPopOver=false, config=true
2022-01-18 17:21:03.623 31430-31430/com.example.sample I/DecorView: updateCaptionType >> DecorView@991b1d1[], isFloating=false, isApplication=true, hasWindowDecorCaption=false, hasWindowControllerCallback=true
2022-01-18 17:21:03.623 31430-31430/com.example.sample D/DecorView: setCaptionType = 0, this = DecorView@991b1d1[]
2022-01-18 17:21:03.638 31430-31430/com.example.sample I/BranchSDK: onActivityCreated, activity = com.example.example.MainActivity@ed5bdc2
2022-01-18 17:21:04.418 31430-32714/com.example.sample I/ResourceExtractor: Extracted baseline resource assets/flutter_assets/kernel_blob.bin
2022-01-18 17:21:04.420 31430-32714/com.example.sample I/ResourceExtractor: Extracted baseline resource assets/flutter_assets/vm_snapshot_data
2022-01-18 17:21:04.464 31430-32714/com.example.sample I/ResourceExtractor: Extracted baseline resource assets/flutter_assets/isolate_snapshot_data
2022-01-18 17:21:04.601 31430-31430/com.example.sample I/WebViewFactory: Loading com.google.android.webview version 97.0.4692.87 (code 469208733)
2022-01-18 17:21:04.630 31430-31430/com.example.sample W/lix.sample: Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (greylist, reflection, allowed)
2022-01-18 17:21:04.630 31430-31430/com.example.sample W/lix.sample: Accessing hidden method Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V (greylist, reflection, allowed)
2022-01-18 17:21:04.630 31430-31430/com.example.sample W/lix.sample: Accessing hidden method Landroid/os/Trace;->traceEnd(J)V (greylist, reflection, allowed)
2022-01-18 17:21:04.630 31430-31430/com.example.sample W/lix.sample: Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (greylist, reflection, allowed)
2022-01-18 17:21:04.630 31430-31430/com.example.sample W/lix.sample: Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (greylist, reflection, allowed)
2022-01-18 17:21:04.633 31430-31430/com.example.sample I/cr_WVCFactoryProvider: Loaded version=97.0.4692.87 minSdkVersion=29 isBundle=true multiprocess=true packageId=2
2022-01-18 17:21:04.662 31430-31430/com.example.sample I/cr_LibraryLoader: Successfully loaded native library
2022-01-18 17:21:04.663 31430-31430/com.example.sample I/cr_CachingUmaRecorder: Flushed 8 samples from 8 histograms.
2022-01-18 17:21:04.670 31430-31430/com.example.sample I/TetheringManager: registerTetheringEventCallback:com.example.sample
2022-01-18 17:21:04.670 31430-31430/com.example.sample D/ConnectivityManager: ConnectivityManager() mContext=com.example.example.BranchApplicationClass@efa180c getOpPackageName()=com.example.sample getBasePackageName()=com.example.sample getPackageName()=com.example.sample
2022-01-18 17:21:04.740 31430-613/com.example.sample I/flutter: Observatory listening on http://127.0.0.1:34591/BoFcuBcmvWM=/
2022-01-18 17:21:04.819 31430-31430/com.example.sample D/PathProviderPlugin: Don't use TaskQueues.
2022-01-18 17:21:04.855 31430-31430/com.example.sample I/TextToSpeech: Sucessfully bound to com.samsung.SMT
2022-01-18 17:21:04.888 31430-31430/com.example.sample W/lix.sample: Accessing hidden method Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J (greylist,test-api, reflection, allowed)
2022-01-18 17:21:04.888 31430-31430/com.example.sample W/lix.sample: Accessing hidden method Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J (greylist, reflection, allowed)
2022-01-18 17:21:04.888 31430-31430/com.example.sample W/lix.sample: Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; (greylist, reflection, allowed)
2022-01-18 17:21:04.888 31430-31430/com.example.sample W/lix.sample: Accessing hidden method Landroid/util/LongArray;->get(I)J (greylist, reflection, allowed)
2022-01-18 17:21:04.904 31430-31430/com.example.sample I/BranchSDK: onActivityStarted, activity = com.example.example.MainActivity@ed5bdc2
2022-01-18 17:21:04.909 31430-31430/com.example.sample I/MainActivity: data from intent null
2022-01-18 17:21:04.910 31430-31430/com.example.sample I/BranchSDK: Warning: You are using your test app's Branch Key. Remember to change it to live Branch Key during deployment.
2022-01-18 17:21:04.941 31430-31430/com.example.sample I/BranchSDK: onActivityResumed, activity = com.example.example.MainActivity@ed5bdc2
2022-01-18 17:21:04.969 31430-31430/com.example.sample D/InputTransport: Input channel constructed: 'ac866f0', fd=152
2022-01-18 17:21:04.975 31430-31430/com.example.sample I/ViewRootImpl@8ee4c76[MainActivity]: setView = com.android.internal.policy.DecorView@991b1d1 TM=true
2022-01-18 17:21:05.028 31430-31430/com.example.sample I/SurfaceControl: assignNativeObject: nativeObject = 0 Surface(name=null)/@0xc29ff13 / android.view.SurfaceControl.readFromParcel:1117 android.view.IWindowSession$Stub$Proxy.relayout:1820 android.view.ViewRootImpl.relayoutWindow:9130 android.view.ViewRootImpl.performTraversals:3420 android.view.ViewRootImpl.doTraversal:2669 android.view.ViewRootImpl$TraversalRunnable.run:10092 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995 
2022-01-18 17:21:05.032 31430-31430/com.example.sample I/ViewRootImpl@8ee4c76[MainActivity]: Relayout returned: old=(0,0,1600,2560) new=(0,0,1600,2560) req=(1600,2560)0 dur=19 res=0x7 s={true 505099329536} ch=true fn=-1
2022-01-18 17:21:05.040 31430-31430/com.example.sample I/ViewRootImpl@8ee4c76[MainActivity]: [DP] dp(1) 1 android.view.ViewRootImpl.reportNextDraw:11078 android.view.ViewRootImpl.performTraversals:3915 android.view.ViewRootImpl.doTraversal:2669 
2022-01-18 17:21:05.040 31430-31430/com.example.sample I/ViewRootImpl@8ee4c76[MainActivity]: [DP] pd() Asnyc report
2022-01-18 17:21:05.041 31430-31430/com.example.sample I/ViewRootImpl@8ee4c76[MainActivity]: mAttachInfo.mThreadedRenderer.draw, mView = DecorView@991b1d1[MainActivity] w = 1600 h = 2560
2022-01-18 17:21:06.108 31430-32733/com.example.sample I/Gralloc4: mapper 4.x is not supported
2022-01-18 17:21:06.109 31430-32733/com.example.sample W/Gralloc3: mapper 3.x is not supported
2022-01-18 17:21:06.147 31430-32733/com.example.sample I/OpenGLRenderer: Davey! duration=1169ms; Flags=1, IntendedVsync=958650888198330, Vsync=958650904864996, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=958650906882843, AnimationStart=958650906893780, PerformTraversalsStart=958650906900499, DrawStart=958650952542113, SyncQueued=958651991816332, SyncStart=958651992435290, IssueDrawCommandsStart=958651992788363, SwapBuffers=958652055637373, FrameCompleted=958652058430394, DequeueBufferDuration=25025677, QueueBufferDuration=1090052, GpuCompleted=0, 
2022-01-18 17:21:06.160 31430-31430/com.example.sample I/ViewRootImpl@8ee4c76[MainActivity]: [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$performDraw$1$ViewRootImpl:4743 android.view.-$$Lambda$ViewRootImpl$DJd0VUYJgsebcnSohO6h8zc_ONI.run:6 android.os.Handler.handleCallback:938 
2022-01-18 17:21:06.160 31430-31430/com.example.sample I/ViewRootImpl@8ee4c76[MainActivity]: [DP] rdf()
2022-01-18 17:21:06.164 31430-31430/com.example.sample I/Choreographer: Skipped 71 frames!  The application may be doing too much work on its main thread.
2022-01-18 17:21:06.191 31430-31430/com.example.sample I/TextToSpeech: Connected to ComponentInfo{com.samsung.SMT/com.samsung.SMT.SamsungTTSService}
2022-01-18 17:21:06.193 31430-31430/com.example.sample I/ViewRootImpl@8ee4c76[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
2022-01-18 17:21:06.194 31430-31430/com.example.sample D/InputMethodManager: prepareNavigationBarInfo() DecorView@991b1d1[MainActivity]
2022-01-18 17:21:06.194 31430-31430/com.example.sample D/InputMethodManager: getNavigationBarColor() -855310
2022-01-18 17:21:06.196 31430-31430/com.example.sample D/InputMethodManager: prepareNavigationBarInfo() DecorView@991b1d1[MainActivity]
2022-01-18 17:21:06.196 31430-31430/com.example.sample D/InputMethodManager: getNavigationBarColor() -855310
2022-01-18 17:21:06.196 31430-32714/com.example.sample I/TextToSpeech: Set up connection to ComponentInfo{com.samsung.SMT/com.samsung.SMT.SamsungTTSService}
2022-01-18 17:21:06.196 31430-31430/com.example.sample V/InputMethodManager: Starting input: tba=com.example.sample ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2022-01-18 17:21:06.197 31430-31430/com.example.sample D/InputMethodManager: startInputInner - Id : 0
2022-01-18 17:21:06.197 31430-31430/com.example.sample I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
2022-01-18 17:21:06.197 31430-32723/com.example.sample I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
2022-01-18 17:21:06.198 31430-32723/com.example.sample I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
2022-01-18 17:21:06.205 31430-32612/com.example.sample D/InputTransport: Input channel constructed: 'ClientS', fd=161
2022-01-18 17:21:06.231 31430-31430/com.example.sample D/InputMethodManager: prepareNavigationBarInfo() DecorView@991b1d1[MainActivity]
2022-01-18 17:21:06.231 31430-31430/com.example.sample D/InputMethodManager: getNavigationBarColor() -855310
2022-01-18 17:21:06.231 31430-31430/com.example.sample V/InputMethodManager: Starting input: tba=com.example.sample ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2022-01-18 17:21:06.232 31430-31430/com.example.sample D/InputMethodManager: startInputInner - Id : 0
2022-01-18 17:21:06.235 31430-31430/com.example.sample I/SurfaceControl: nativeRelease nativeObject s[503463222464]
2022-01-18 17:21:06.235 31430-31430/com.example.sample I/SurfaceControl: nativeRelease nativeObject e[503463222464]
2022-01-18 17:21:06.235 31430-31430/com.example.sample I/SurfaceControl: nativeRelease nativeObject s[503463221504]
2022-01-18 17:21:06.235 31430-31430/com.example.sample I/SurfaceControl: nativeRelease nativeObject e[503463221504]
2022-01-18 17:21:06.240 31430-564/com.example.sample I/flutter: Log.INFO : in checkAndHandleLocalNotificationOnLaunch
2022-01-18 17:21:06.284 31430-31430/com.example.sample W/FlutterJNI: FlutterJNI.setRefreshRateFPS called more than once
2022-01-18 17:21:06.286 31430-761/com.example.sample W/FlutterJNI: FlutterJNI.loadLibrary called more than once
2022-01-18 17:21:06.287 31430-32714/com.example.sample I/ResourceExtractor: Found extracted resources res_timestamp-85-1642506661529
2022-01-18 17:21:06.288 31430-763/com.example.sample W/FlutterJNI: FlutterJNI.prefetchDefaultFontManager called more than once
2022-01-18 17:21:06.291 31430-31430/com.example.sample W/FlutterJNI: FlutterJNI.init called more than once
2022-01-18 17:21:06.292 31430-31430/com.example.sample I/FLTFireBGExecutor: Creating background FlutterEngine instance, with args: []
2022-01-18 17:21:06.308 31430-31430/com.example.sample D/PathProviderPlugin: Don't use TaskQueues.
2022-01-18 17:21:06.319 31430-31430/com.example.sample I/TextToSpeech: Sucessfully bound to com.samsung.SMT
2022-01-18 17:21:06.337 31430-31430/com.example.sample I/TextToSpeech: Connected to ComponentInfo{com.samsung.SMT/com.samsung.SMT.SamsungTTSService}
2022-01-18 17:21:06.342 31430-32714/com.example.sample I/TextToSpeech: Set up connection to ComponentInfo{com.samsung.SMT/com.samsung.SMT.SamsungTTSService}

EDIT: One more observation I found is, if I declare splashscreen drawable in manifest file, then the splash screen is coming up and then immediately black screen is coming and the app is stuck.

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

UPDATE: After day of debugging and narrowing it down, finally found the culprit. This was present in MainActivity.java, apparently it was added to handle the black screen in older versions of flutter, but now this lead to complete stuck.

    @NonNull
    @Override
    protected FlutterActivityLaunchConfigs.BackgroundMode getBackgroundMode() {
        return FlutterActivityLaunchConfigs.BackgroundMode.transparent;
    }

flutter

upgrade

0 Answers

Your Answer

Accepted video resources