I have been using android webview to load my PWA app. I have been getting lots of similar crashes on production app regarding webview autofill on crashlytics but unable to reproduce it. The stack trace is as follows:
at com.android.internal.util.Preconditions.checkState(Preconditions.java:169)
at android.view.autofill.AutofillValue.getListValue(AutofillValue.java:108)
at Bw.a(Bw.java:49)
at com.android.webview.chromium.WebViewChromium.autofill(WebViewChromium.java:7)
at android.webkit.WebView.autofill(WebView.java:2837)
at android.view.autofill.AutofillManager.autofill(AutofillManager.java:2188)
at android.view.autofill.AutofillManager.access$2300(AutofillManager.java:160)
at android.view.autofill.AutofillManager$AutofillManagerClient.lambda$autofill$1(AutofillManager.java:3154)
at android.view.autofill.-$$Lambda$AutofillManager$AutofillManagerClient$1jAzMluMSJksx55SMUQn4BKB2Ng.run(-.java:8)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7697)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
I have searched for these issues over the web but couldn't get anything useful. Please provide some pointers here.
Related
I have launched an app on play store but it is crashing on several devices & I am not able test my app on every devices. i have crashlytics report
Crashlytics Report
Stack Trace
Fatal Exception: java.lang.RuntimeException: Internal error in Cloud Firestore (23.0.1).
at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(AsyncQueue.java:19)
at com.google.firebase.firestore.util.-$$Lambda$AsyncQueue$jx84dqgUsF4ojecSMurRqFLFD1Y.run(-.java:2)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:233)
at android.app.ActivityThread.main(ActivityThread.java:7225)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:499)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:962)
Caused by java.lang.RuntimeException: android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.lambda$executeAndReportResult$1(AsyncQueue.java:14)
at com.google.firebase.firestore.util.-$$Lambda$AsyncQueue$SynchronizedShutdownAwareExecutor$pKSAgg-ozJ8RbUveSl-44aUfFQw.run(-.java:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(AsyncQueue.java:15)
at java.lang.Thread.run(Thread.java:764)
Caused by android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY)
at android.database.sqlite.SQLiteConnection.nativeExecute(SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:578)
at android.database.sqlite.SQLiteSession.beginTransactionUnchecked(SQLiteSession.java:323)
at android.database.sqlite.SQLiteSession.beginTransaction(SQLiteSession.java:298)
at android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:553)
at android.database.sqlite.SQLiteDatabase.beginTransactionWithListener(SQLiteDatabase.java:517)
at com.google.firebase.firestore.local.SQLitePersistence.runTransaction(SQLitePersistence.java:17)
at com.google.firebase.firestore.local.LocalStore.startMutationQueue(LocalStore.java:9)
at com.google.firebase.firestore.local.LocalStore.start(LocalStore.java)
at com.google.firebase.firestore.core.ComponentProvider.initialize(ComponentProvider.java:41)
at com.google.firebase.firestore.core.FirestoreClient.initialize(FirestoreClient.java:65)
at com.google.firebase.firestore.core.FirestoreClient.lambda$new$0(FirestoreClient.java:10)
at com.google.firebase.firestore.core.FirestoreClient.lambda$new$0$FirestoreClient(FirestoreClient.java)
at com.google.firebase.firestore.core.-$$Lambda$FirestoreClient$Eq-cAcb1C1mM4tyiJsLJXZ13tyU.run(-.java:8)
at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$2(AsyncQueue.java)
at com.google.firebase.firestore.util.-$$Lambda$AsyncQueue$Y9GO7zO2DX6MzQJ5TbKtKW_NzO0.call(-.java:2)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.lambda$executeAndReportResult$1(AsyncQueue.java)
at com.google.firebase.firestore.util.-$$Lambda$AsyncQueue$SynchronizedShutdownAwareExecutor$pKSAgg-ozJ8RbUveSl-44aUfFQw.run(-.java:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(AsyncQueue.java:15)
at java.lang.Thread.run(Thread.java:764)
Device Information
Brand:OPPO
Model:
Orientation: Portrait
RAM free: 3.28 GB
Disk free: 95.39 GB
Date: 26-07-2021
Operating System
Version:9
Orientation: Portrait
Rooted:No
Other devices with same issue
Oppo: F17 Pro,CPH1853
Realme: 5i,c12,8pro
vivo: 1920,1803
My take on this is that an sqlite query is being executed on an sqlite connection that is already processing a query based on the fact that it is executing side a threaded background worker. it is possible that the system sqlite on this system may be compiled differently such as being in single threaded mode
the cause of this looks to be the firebase library and how it operates and if this is a systems issue (android on the oppo and the provided sqlite) then you may have to detect how it was compiled or bundle a verison of sqlite to work around this
it should be possible to dump the compile options of sqlite via an sql conenction and compare this to a knwn
I am trying to connect a USB Camera with an OTG cable on my Android app and for this purpose I use the UVCCamera repo. All the samples and my app work fine on most devices I have tested, but not on a Motorola E4 (on which I specifically need to run the app).
What I have noticed is that the UsbDevice is detached right after I grant permission to use it, and then is reattached as a new device. If I don't check if this happens I get a NullPointerException as the connection to the device is null when trying to get raw descriptors.
Here are the error messages I get:
E/UsbManager: exception in UsbManager.openDevice
java.lang.IllegalArgumentException: device /dev/bus/usb/001/008 does not exist or is restricted
at android.os.Parcel.readException(Parcel.java:1688)
at android.os.Parcel.readException(Parcel.java:1637)
at android.hardware.usb.IUsbManager$Stub$Proxy.openDevice(IUsbManager.java:443)
at android.hardware.usb.UsbManager.openDevice(UsbManager.java:353)
at com.serenegiant.usb.USBMonitor$UsbControlBlock.<init>(USBMonitor.java:1011)
at com.serenegiant.usb.USBMonitor$UsbControlBlock.clone(USBMonitor.java:1034)
at com.serenegiant.usb.UVCCamera.open(UVCCamera.java:192)
at com.serenegiant.usbcameracommon.AbstractUVCCameraHandler$CameraThread.handleOpen(AbstractUVCCameraHandler.java:444)
at com.serenegiant.usbcameracommon.AbstractUVCCameraHandler.handleMessage(AbstractUVCCameraHandler.java:300)
at com.serenegiant.usbcameracommon.UVCCameraHandler.handleMessage(UVCCameraHandler.java:31)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at com.serenegiant.usbcameracommon.AbstractUVCCameraHandler$CameraThread.run(AbstractUVCCameraHandler.java:747)
12-07 16:08:36.074 20866-20883/com.serenegiant.usbcameratest E/AndroidRuntime: FATAL EXCEPTION: USBMonitor Process: com.serenegiant.usbcameratest, PID: 20866 java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] android.hardware.usb.UsbDeviceConnection.getRawDescriptors()' on a null object reference
at com.serenegiant.usb.USBMonitor.updateDeviceInfo(USBMonitor.java:900)
at com.serenegiant.usb.USBMonitor$UsbControlBlock.<init>(USBMonitor.java:974)
t com.serenegiant.usb.USBMonitor$UsbControlBlock.<init>(USBMonitor.java:0)
at com.serenegiant.usb.USBMonitor$3.run(USBMonitor.java:563)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Other applications on Google Play that use the same library to connect USB cameras work fine on the Motorola E4 too.
I have also posted the issue on github some time ago but have not got any answers.
So I've added the firebase messaging library to gradle, and when i am on my Firebase console and send a notification to devices, It completely crashes my System UI of the device, freezing the phone and making it do weird things. The System UI also crashes without notifications, seeming to be only happening after ive added the gradle dependency for cloudmessaging.
The only indication i have is this error
rocess: com.android.systemui, PID: 18646
java.lang.OutOfMemoryError: Failed to allocate a 64000012 byte allocation with 4193696 free bytes and 51MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:651)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:486)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1085)
at android.content.res.Resources.loadDrawableForCookie(Resources.java:2867)
at android.content.res.Resources.loadDrawable(Resources.java:2756)
at android.content.res.Resources.getDrawable(Resources.java:920)
at android.graphics.drawable.Icon.loadDrawableInner(Icon.java:313)
at android.graphics.drawable.Icon.loadDrawable(Icon.java:269)
at android.graphics.drawable.Icon.loadDrawableAsUser(Icon.java:377)
at com.android.systemui.statusbar.StatusBarIconView.getIcon(StatusBarIconView.java:199)
at com.android.systemui.statusbar.StatusBarIconView.getIcon(StatusBarIconView.java:184)
at com.android.systemui.statusbar.StatusBarIconView.updateDrawable(StatusBarIconView.java:171)
at com.android.systemui.statusbar.StatusBarIconView.set(StatusBarIconView.java:137)
at com.android.systemui.statusbar.BaseStatusBar.createIcon(BaseStatusBar.java:1860)
at com.android.systemui.statusbar.BaseStatusBar.createNotificationViews(BaseStatusBar.java:1826)
at com.android.systemui.statusbar.phone.PhoneStatusBar.addNotification(PhoneStatusBar.java:1429)
at com.android.systemui.statusbar.BaseStatusBar$6$2.run(BaseStatusBar.java:548)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5765)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Anyone can help on where the problem may be? at the moment I really have no idea where to look.
java.lang.NullPointerException:
at com.google.android.gms.internal.im.zzc(im.java:0)
at com.google.android.gms.internal.im.zza(im.java:0)
at <OR>.zza(im.java:0)
at <OR>.zza(im.java:0)
at <OR>.zza(im.java:0)
at <OR>.zza(im.java:0)
at <OR>.zza(im.java:0)
at <OR>.zza(im.java:0)
at <OR>.zza(im.java:0)
at com.google.android.gms.internal.aaw.run(aaw.java:0)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
The problem was firebase remote config. I actually didn't create the remote_config in firebase dashboard yet and looks like in some limited cases the local default values xml file isn't working properly.
After adding the remote config variable in Firebase dashboard, the crash report stopped.
I'm using this tutorial to make an Android login application. I have followed all his steps and successfully am able to load the application on the emulator or my phone, however when I try and create an account I get an error - I followed the instructions he provided stating how to test the system, referencing to here:
Testing the App
For a beginner it will be always difficult to run this project for the first time. But don’t worry, the following steps will helps you testing this app. (The ip address looks like 192.168.0.100)
Make sure that both devices (the device running the PHP project and the android device) are on the same wifi network.
Give correct username , password and database name of MySQL in Config.php
Replace the URL ip address of URL_LOGIN and URL_REGISTER in AppConfig.java with your machine ip address. You can get the ip address by running ipconfig in cmd
my IPv4 address is 192.168.0.11,
So I added that to the AppConfig file as follows:
package android.loginfirstattempt.com.loginfirstattempt.app;
public class AppConfig {
// Server user login url
public static String URL_LOGIN = "http://192.168.0.11/android_login_api/login.php";
// Server user register url
public static String URL_REGISTER = "http://192.168.0.11/android_login_api/register.php";
}
I am using Android Studio's built in emulator so both devices are on the same network.
I am using Lampp and I'm under the assumption by default this is the username and password:
<?php
define("DB_HOST", "localhost");
define("DB_USER", "root");
define("DB_PASSWORD", "");
define("DB_DATABASE", "android_api");
?>
I started the local servers and tested to make sure they were running by loading up a demo page.
I've already also created the MySQL database and table as shown in his example.
My file structure for the server side is shown in this picture
But when I try create a User I get this crash:
beginning of crash
06-26 19:12:13.205 2668-2668/android.loginfirstattempt.com.loginfirstattempt E/AndroidRuntime: FATAL EXCEPTION: main
Process: android.loginfirstattempt.com.loginfirstattempt, PID: 2668
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.loginfirstattempt.com.loginfirstattempt.app.AppController.addToRequestQueue(com.android.volley.Request, java.lang.String)' on a null object reference
at android.loginfirstattempt.com.loginfirstattempt.activity.RegisterActivity.registerUser(RegisterActivity.java:189)
at android.loginfirstattempt.com.loginfirstattempt.activity.RegisterActivity.access$300(RegisterActivity.java:35)
at android.loginfirstattempt.com.loginfirstattempt.activity.RegisterActivity$1.onClick(RegisterActivity.java:84)
at android.view.View.performClick(View.java:5198)
at android.view.View$PerformClick.run(View.java:21147)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I am unable to find any obvious error and was wondering if someone could help!
You didn't add the AppController to the application tag in the AndroidManifest.xml as explained in the tutorial. Your AppController now doesn't get called during the initialization of your app and isn't initialized. When you call AppController.getInstance().addToRequestQueue(strReq, tag_string_req); inside your registerUser method AppController.getInstance() returns null. This causes your nullpointerException. Add the AppController to the manifest and your code should be working.
Your application tag should look like this:
<application
android:name="com.loginfirstattempt.app.AppController"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >