TimeoutException by java.lang.ref.FinalizerReference.add (FinalizerReference.java:61) - android

An app has the following exception occasionally
java.util.concurrent.TimeoutException:
at java.lang.ref.FinalizerReference.add (FinalizerReference.java:61)
at com.android.internal.os.BinderInternal$GcWatcher.finalize (BinderInternal.java:63)
at java.lang.Daemons$FinalizerDaemon.doFinalize (Daemons.java:289)
at java.lang.Daemons$FinalizerDaemon.runInternal (Daemons.java:276)
at java.lang.Daemons$Daemon.run (Daemons.java:137)
at java.lang.Thread.run (Thread.java:919)
It is rare. It happens only on Lenovo and Huawei devices. Could anyone shed some light on the possible cause of this crash?

Related

DeadSystemException in HMSPackageManager

I faced DeadSystemException in app on Huawei devices when HMSPackageManager tries to get info about services from Android PackageManager.
Stacktrace:
Fatal Exception: java.lang.RuntimeException: android.os.DeadSystemException
at android.app.ApplicationPackageManager.queryIntentServicesAsUser(ApplicationPackageManager.java:1192)
at android.app.ApplicationPackageManager.queryIntentServices(ApplicationPackageManager.java:1198)
at com.huawei.hms.utils.HMSPackageManager.f(HMSPackageManager.java:27)
at com.huawei.hms.utils.HMSPackageManager.i(HMSPackageManager.java:4)
at com.huawei.hms.utils.HMSPackageManager.refresh(HMSPackageManager.java:16)
at com.huawei.hms.utils.HMSPackageManager.getHMSPackageName(HMSPackageManager.java:8)
at com.huawei.hms.utils.HMSPackageManager.getHmsVersionCode(HMSPackageManager.java:1)
at com.huawei.hms.utils.HMSPackageManager.isApkUpdateNecessary(HMSPackageManager.java)
at com.huawei.hms.adapter.AvailableAdapter.isHuaweiMobileServicesAvailable(AvailableAdapter.java:77)
at com.huawei.hms.common.internal.BaseHmsClient.checkAvailabilityAndConnect(BaseHmsClient.java:134)
at com.huawei.hms.common.internal.BaseHmsClient.connect(BaseHmsClient.java:1)
at com.huawei.hms.common.internal.HuaweiApiManager$ConnectionManager.connect(HuaweiApiManager.java:97)
at com.huawei.hms.common.internal.HuaweiApiManager$ConnectionManager.sendRequest(HuaweiApiManager.java:96)
at com.huawei.hms.common.internal.HuaweiApiManager.connectAndSendRequest(HuaweiApiManager.java:37)
at com.huawei.hms.common.internal.HuaweiApiManager.handleMessage(HuaweiApiManager.java:35)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:213)
at android.os.HandlerThread.run(HandlerThread.java:67)
Crash occurs on Android 8/9/10/11, so likely it's not android problem. Crash happens only on Huawei devices. Our app not call HMSPackageManager from any place, so I think it happens in time of HMS Core initialization.
Is anyone has same problem?
Huawei support said that problem in Android OS, but they try to fix error in next HMS SDK update in mid of september.

Fatal Exception: com.facebook.react.common.JavascriptException: TypeError: undefined is not an object

Implementing "I18n.js" in our React Native project has worked flawlessly until a couple of days ago. Through the use of "Crashalytics" with Firebase we have noticed repeated but few crashes. These crashes seem to only mainly occur on Android 11 and Samsung + Xiomi devices (none on iPhones yet). The log output is as follows:
Fatal Exception: com.facebook.react.common.JavascriptException: TypeError: undefined is not an object (evaluating 's.languageTag'), stack:
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:83)
at java.lang.reflect.Method.invoke(Method.java)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loop(Looper.java:246)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
at java.lang.Thread.run(Thread.java:923)
I fail to reproduce the crash by changing language in the phone, downloading hardware profiles that match the ones mentioned in the crash logs (Samsung S10, etc), and using them as the emulator.
Any help and/or ideas are much appreciated.
Thank you in advance!
I got the same error. You can debug it by running production build on your phone and connect it with Android studio. You can see the logs by selecting your phone and app process screenshot. I my case the error was about destructuring a property that doesn't exist in object

Concurrent Timeout Exception using SQLCipher in android

I am using SqlCipher in my android application to encrypt the database.
My app works in both online and offline and has many DB transactions.
I am using SQLCipher 3.5.7 version.
I rarely get the below exception and it occur mostly in Samsung devices.
I was unable to reproduce the exception. Kindly help.
java.util.concurrent.TimeoutException: net.sqlcipher.database.SQLiteCompiledSql.finalize() timed out after 60 seconds at java.lang.Object.wait(Native Method) at
java.lang.Thread.parkFor$(Thread.java:2137) at
sun.misc.Unsafe.park(Unsafe.java:358) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190) at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:868) at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:900) at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1223) at
java.util.concurrent.locks.ReentrantLock$FairSync.lock(ReentrantLock.java:225) at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:286) at
net.sqlcipher.database.SQLiteDatabase.lock(SQLiteDatabase.java:553) at
net.sqlcipher.database.SQLiteCompiledSql.releaseSqlStatement(SQLiteCompiledSql.java:106) at
net.sqlcipher.database.SQLiteCompiledSql.finalize(SQLiteCompiledSql.java:152) at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:250) at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:237) at java.lang.Daemons$Daemon.run(Daemons.java:103) at java.lang.Thread.run(Thread.java:764)

TimeoutException android.media.SoundPool.finalize()

On Android 9, this crash appears sometimes, I can't understand why:
Fatal Exception: java.util.concurrent.TimeoutException android.media.SoundPool.finalize() timed out after 10 seconds android.media.SoundPool.native_release (SoundPool.java) android.media.SoundPool.release (SoundPool.java:177) java.lang.Thread.run (Thread.java:764)
All works perfectly before, and now on Android 9 (SONY currently), the crash appears.
Have you got some explanations guys?

Android AssetManager Timeout Exception

We have recently started experiencing a lot of AssetManager Timeout Exception.
Fatal Exception: java.util.concurrent.TimeoutException: android.content.res.AssetManager$AssetInputStream.finalize() timed out after 10 seconds
at android.content.res.AssetManager$AssetInputStream.close(AssetManager.java:565)
at android.content.res.AssetManager$AssetInputStream.finalize(AssetManager.java:598)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:190)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:173)
at java.lang.Thread.run(Thread.java:818)
We recently updated support lib version to 27.1.1 , playservices to '11.0.4'.
Can't think of any possible reason for the crash appearing recently in large numbers.

Categories

Resources