Getting `Enter APP_SCOUT_HANG state` in Flutter app

394 views Asked by At

SPECIFICATION (NEW)

Flutter version 3.13.2
JDK version 17.0.6+0
Dart version 3.1.0

SPECIFICATION (OLD)

Flutter version (but I think it is on 3.3.3)
JDK version (unknown)
Dart version (I think it is on dart 2)

This project I got it from my partner and they need to do some maintenance from the old version to the new version and add some maps page, but there is something happened, while I running the app I get the delay for it and the terminal said "Hang State" or something like that, and to be honest there is a lot of warning and I don't know what can I do and where are the problems.

And these are the summary from terminal Dialog

W/MIUIScout App(31798): Enter APP_SCOUT_WARNING State

W/MIUIScout App(31798): Event:APP_SCOUT_WARNING Thread:main backtrace:
W/MIUIScout App(31798):     at jdk.internal.misc.Unsafe.park(Native Method)
W/MIUIScout App(31798):     at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
W/MIUIScout App(31798):     at  

com.wongpiwat.trust_location.LocationAssistant.checkInitialLocation(LocationAssistant.java:494)

com.google.android.gms.common.api.internal.BasePendingResult$CallbackHandler.handleMessage(com.google.android.gms:play-services-base@@18.1.0:6)

I/e.mobilebenerit(31798): Wrote stack traces to tombstoned
W/MIUIScout App(31798): Enter APP_SCOUT_HANG state
W/MIUIScout App(31798):  (Current message: duration=5003ms seq=31 late=4ms h=com.google.android.gms.common.api.internal.BasePendingResult$CallbackHandler w=1)
D/AppScoutStateMachine(31798): dump trace dirName = com.example.mobilebenerit-31798-APP_SCOUT_HANG-2023-10-13-10-34-24
W/MIUIScout App(31798): Event:APP_SCOUT_HANG Thread:main backtrace:
W/MIUIScout App(31798):     at jdk.internal.misc.Unsafe.park(Native Method)
W/MIUIScout App(31798):     at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
W/MIUIScout App(31798):     at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:717)
W/MIUIScout App(31798):     at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1074)W/MIUIScout App(31798):     at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:276)
W/MIUIScout App(31798):     at com.wongpiwat.trust_location.LocationAssistant$8.onResult(LocationAssistant.java:722)
W/MIUIScout App(31798):     at com.google.android.gms.common.api.internal.BasePendingResult$CallbackHandler.handleMessage(com.google.android.gms:play-services-base@@18.1.0:6)

com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
W/MIUIScout App(31798):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
I/e.mobilebenerit(31798): Thread[5,tid=31817,WaitingInMainSignalCatcherLoop,Thread*=0xb400007ab1d6d000,peer=0x134c4600,"Signal Catcher"]: reacting to signal 3
I/e.mobilebenerit(31798):
I/e.mobilebenerit(31798): Wrote stack traces to tombstoned
W/Looper  (31798): PerfMonitor longMsg : seq=31 plan=10:34:19.957 late=4ms wall=30006ms running=5ms runnable=1ms h=com.google.android.gms.common.api.internal.BasePendingResult$CallbackHandler w=1 procState=-1
I/Choreographer(31798): Skipped 1815 frames!  The application may be doing too much work on its main thread.
W/Looper  (31798): PerfMonitor doFrame : time=0ms vsyncFrame=0 latency=29994ms procState=-1 historyMsgCount=1 (msgIndex=1 wall=30006ms seq=31 running=5ms runnable=1ms late=4ms h=com.google.android.gms.common.api.internal.BasePendingResult$CallbackHandler w=1)

I had try from the error or warning info and fixing some problem in Flutter and upgrade the bug and error from the pubspec.yaml and upgrade the dep to the new version, EXCEPT for http and one_signal and something that connected with it (http : 0.13.6, onesignal_flutter: ^3.2.8)

Is there something I need to upgrade?

1

There are 1 answers

2
Bimantaratirta On

The issue lies in the usage of one of the methods or possibly a variable in the 'trust_location' package, try checking it again. If indeed the package is problematic, consider replacing it with a similar package.