NullPointerException shown in Real-time crashes page of Google Play developer dashboard - java

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.

Related

Software caused connection abort Client receive

I'm making an app in Android studio and I'm getting an IOException which is unpredictable nor have I managed to replicate it.
W/TcpProtocolLayer: Connection to /x.x.x.x:x closed.
W/System.err: java.io.IOException: Software caused connection abort
W/System.err: at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
W/System.err: at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
W/System.err: at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
W/System.err: at sun.nio.ch.IOUtil.read(IOUtil.java:192)
W/System.err: at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:421)
W/System.err: at x.x.protocol.layer.TcpProtocolLayer.receive(TcpProtocolLayer.java:254)
W/System.err: at x.x.protocol.layer.TcpProtocolLayer.receive(TcpProtocolLayer.java:201)
W/System.err: at x.x.protocol.layer.DatagramProtocolLayer.receive(DatagramProtocolLayer.java:133)
W/System.err: at x.x.protocol.ProtocolStack.receive(ProtocolStack.java:190)
W/System.err: at x.x.protocol.Socket.receive(Socket.java:85)
I've been trying to wrap my head around it and I just can't seem to understand why this would happen, for legal reasons I can't show the code where it's happening but I can describe it.
The phone sends a message to a server and the server responds. This part is always successful and never fails. Then the phone waits for the server to send another message for a confirmation, and this is where it the exception happens. It might throw the exception instantly it might throw it after 10 seconds. I should also say that 90% of the time the code works just fine and no exception is thrown and it processes the information just fine. Then the 10% of the unpredictable attempts this happens and breaks the app completely. I've watched out for it not to be a Async Thread error ,and I've concluded it isn't and the Socket is opened at the moment of this happening. If anyone has any answer I'd be happy to hear it because this problem has been haunting me for a month already and I can't fix it

UVCCamera does not work on specific device

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.

java.lang.SecurityException: Binder invocation to an incorrect interface on Android 6

Recently started getting crashes due to java.lang.SecurityException: Binder invocation to an incorrect interface in our app which only happens on 6.0 and 6.0.1 OS.
The stack trace is pulled from a crash reporting service and could not be replicated locally on any of the Android 6 devices.
The app uses a 'Service' which calls 'startForeground' and the stack trace seems to point to that method call.
java.lang.SecurityException: Binder invocation to an incorrect interface
at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.ActivityManagerProxy.setServiceForeground(ActivityManagerNative.java:4487)
at android.app.Service.startForeground(Service.java:652)
at com.anghami.audio.MusicService.J(MusicService.java:3517)
at com.anghami.audio.MusicService.b(MusicService.java:2676)
at com.anghami.audio.MusicService.F(MusicService.java:2647)
at com.anghami.audio.MusicService.a(MusicService.java:2421)
at com.anghami.audio.MusicService_.a(MusicService_.java:21)
at com.anghami.audio.MusicService_$4.a(MusicService_.java:214)
at org.androidannotations.api.a$a.run(BackgroundExecutor.java:401)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
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 occurred when .Aidl file in client side were placed in wrong location.
the .Aidl file must be placed in a package of the same name as server side in the client's src folder.

Which mysql timeout do I must modify?

I've set up on my Raspberry Pi a Glassfish server (4) and a MySQL, to launch my webservices for my Android Application.
Everything is okay after a lot of problems !
But one question stay in my mind for me, why every day I'm trying to execute a query with my app, I must restart my glassfish to have a result (I have a 500 Internal Server Error).
I've searched on the net, and I think it's a timeout from MySQL, who close the connection between him and Glassfish, so I want to know what I must doing to solve this problem ?
Thanks by advance !
EDIT
Stack Trace :
example.webservices.exceptions.ServiceException: L'appel au webservice a rencontré une erreur 500 : could not execute query
at example.webservices.accessservice.UserAccessService.isUserExists(UserAccessService.java:52)
at example.androidapp.asynctasks.VerifyUserTask.doInBackground(VerifyUserTask.java:38)
at example.androidapp.asynctasks.VerifyUserTask.doInBackground(VerifyUserTask.java:20)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)

Android app force closing when opening amarino connection

I am new to android development, and have run into a problem I seem unable to solve.
My android app should be able to communicate with my arduino device, sending info
to and retrieving info from my device. I have set up my connection between the two
with a bluetooth device and I am using amarino to facilitate the communication.
Now I can connect with amarino and send data and receive data, now I want to do this from
my app. The problem comes when I enter this line:
private static final String DEVICE_ADDRESS = "07:12:04:16:68:18";
Amarino.connect(this, DEVICE_ADDRESS);
The number is the MAC address of my bluetooth adapter connected to my arduino device.
As soon as I run my app on my phone it just force closes due to unexpected error.
Now as I said, I am a bit of a noob when it comes to android, so I installed logCat to try get some log info out of it. All I got from it was this somewhat unhelpful error message:
com.example.projectgreetv3/.StartingPlace
10-24 15:22:55.140 E/AndroidRuntime(4906): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.projectgreetv3/com.example.projectgreetv3.StartingPlace}: java.lang.ClassNotFoundException: com.example.projectgreetv3.StartingPlace in loader dalvik.system.PathClassLoader[/data/app/com.example.projectgreetv3-1.apk]
10-24 15:22:55.140 E/AndroidRuntime(4906): Caused by: java.lang.ClassNotFoundException: com.example.projectgreetv3.StartingPlace in loader dalvik.system.PathClassLoader[/data/app/com.example.projectgreetv3-1.apk]
10-24 15:22:55.148 W/ActivityManager(539): Force finishing activity com.example.projectgreetv3/.StartingPlace
10-24 15:21:51.726 I/UinboxLogger(4585): [UinboxReceiver] onReceive() >> intent.getData() : com.example.projectgreetv3
10-24 15:21:52.382 I/UninstallAppProgress(4575): Finished uninstalling pkg: com.example.projectgreetv3
10-24 15:22:52.523 D/PackageManager(539): Scanning package com.example.projectgreetv3
I hope someone can help me with this, as I am on wits end.
For more info on:
- Arduino:
- http://www.arduino.cc/
- Amarino:
http://www.amarino-toolkit.net/
If you look a bit further down on your stacktrace (in the logcat) you will probably see that the cause of this crash is an NetworkOnMainThreadException. (If you are running Android 3.0 or higher)
Please make sure that you do all your network communication on a separate thread (Thread/ASyncTask).
http://developer.android.com/reference/android/os/NetworkOnMainThreadException.html

Categories

Resources