Android IOException is null, Throwing NullPointerException - java

I'm working on an application for Android and I'm having an AsyncTask connect to a server through a client socket in the doInBackground method.
All variables that are being used have been set and I have checked in real time that they are valid before being used. The weird thing is that after trying to create the socket with the designated host/port, it immediately throws an IOException, which in itself is not a problem :P but the value ex is null. I have never seen anything like this and I found some similar cases on google, but none of them yielded a solution.
The code that is throwing the exception,as well as the catch block:
#Override
protected Socket doInBackground(Void... params) {
Socket sock = null;
try {
sock = new Socket("10.0.0.86", 44444);
} catch (UnknownHostException ex) {
ex.printStackTrace();
} catch(IOException ex) {
ex.printStackTrace();
}
return sock;
}
The rest of the code is nothing of help, it's just some getter/setters. Here's the log from the android device:
07-28 03:30:23.438
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
Sending WAIT chunk 07-28 03:30:23.438
9514-9520/com.TestApplication.VEStudio.TestApplication I/dalvikvm﹕
Debugger is active 07-28 03:30:23.438
9514-9514/com.TestApplication.VEStudio.TestApplication
W/ActivityThread﹕ Application
com.TestApplication.VEStudio.TestApplication is waiting for the
debugger on port 8100... 07-28 03:30:23.638
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
Debugger has connected 07-28 03:30:23.638
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:23.838
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:24.038
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:24.238
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:24.438
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:24.638
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:24.838
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:25.038
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
debugger has settled (1482) 07-28 03:30:25.238
9514-9514/com.TestApplication.VEStudio.TestApplication I/Adreno-EGL﹕
: EGL 1.4 QUALCOMM build: ()
OpenGL ES Shader Compiler Version: E031.24.00.06
Build Date: 02/12/14 Wed
Local Branch: au090
Remote Branch:
Local Patches:
Reconstruct Branch: 07-28 03:30:25.268 9514-9514/com.TestApplication.VEStudio.TestApplication
D/OpenGLRenderer﹕ Enabling debug mode 0 07-28 03:30:25.308
9514-9514/com.TestApplication.VEStudio.TestApplication
D/OpenGLRenderer﹕ GL error from OpenGLRenderer: 0x502 07-28
03:30:25.308 9514-9514/com.TestApplication.VEStudio.TestApplication
E/OpenGLRenderer﹕ GL_INVALID_OPERATION 07-28 03:30:25.318
9514-9514/com.TestApplication.VEStudio.TestApplication
I/ActivityManager﹕ Timeline: Activity_idle id:
android.os.BinderProxy#43682588 time:268397923 07-28 03:30:26.468
9514-9514/com.TestApplication.VEStudio.TestApplication
I/ActivityManager﹕ Timeline: Activity_idle id:
android.os.BinderProxy#43682588 time:268399075 07-28 03:30:29.908
9514-9514/com.TestApplication.VEStudio.TestApplication
I/Choreographer﹕ Skipped 150 frames! The application may be doing too
much work on its main thread. 07-28 03:30:33.538
9514-9913/com.TestApplication.VEStudio.TestApplication W/dalvikvm﹕
threadid=15: thread exiting with uncaught exception (group=0x41e98d88)
07-28 03:30:33.578
9514-9913/com.TestApplication.VEStudio.TestApplication
E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #3
Process: com.TestApplication.VEStudio.TestApplication, PID: 9514
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
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)
Caused by: java.lang.NullPointerException
at com.TestApplication.VEStudio.TestApplication.Networking.doInBackground(Networking.java:51)
at com.TestApplication.VEStudio.TestApplication.Networking.doInBackground(Networking.java:12)
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) 07-28 03:35:33.628 9514-9913/com.TestApplication.VEStudio.TestApplication
I/Process﹕ Sending signal. PID: 9514 SIG: 9
Any help at all with this issue would be greatly appreciated, and hopefully someone in the future will need the same intel.

Related

Retrieve Data from multiple documents from Firestore Database

Unable to fetch a value from the Firestore database. Trying to retrieve the value of the mobile number as and when the value of flat and block matches the entry in the database. Below is the code I am using. I have also attached the issues that are registered in LogCat file. Please check and help.
public class Test extends AppCompatActivity {
Button btn;
private FirebaseFirestore firestore;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
firestore = FirebaseFirestore.getInstance();
btn = (Button) findViewById(R.id.button3);
btn.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
getmobile();
//makecall();
}
});
}
private void makecall(){
Intent intent = new Intent(Intent.ACTION_CALL_BUTTON);
intent.setData(Uri.parse("tel:9890910640"));
startActivity(intent);
}
private void getmobile() {
firestore.collection("users").get().addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {
#Override
public void onSuccess(QuerySnapshot documentSnapshots) {
String a = "101";
String b = "F1A";
for(DocumentSnapshot document: documentSnapshots){
if(document.getString("flat")==a&&document.getString("block")==b){
String mobilefromdatabase = document.get("mobile").toString();
Toast.makeText(Test.this, "mobile" + mobilefromdatabase, Toast.LENGTH_LONG).show();
break;
}
}
}
});
}
}
Logcat Details
05-05 03:59:26.721 8805-8805/? E/libprocessgroup: failed to make and chown /acct/uid_10058: Read-only file system
05-05 03:59:26.721 8805-8805/? W/Zygote: createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?
05-05 03:59:26.722 8805-8805/? I/art: Not late-enabling -Xcheck:jni (already on)
05-05 03:59:26.770 8805-8805/com.example.myrwaapp I/MultiDex: VM with version 2.1.0 has multidex support
05-05 03:59:26.770 8805-8805/com.example.myrwaapp I/MultiDex: Installing application
05-05 03:59:26.770 8805-8805/com.example.myrwaapp I/MultiDex: VM has multidex support, MultiDex support library is disabled.
05-05 03:59:26.842 8805-8805/com.example.myrwaapp V/FA: Registered activity lifecycle callback
05-05 03:59:26.857 8805-8831/com.example.myrwaapp W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
05-05 03:59:26.861 8805-8805/com.example.myrwaapp I/FirebaseInitProvider: FirebaseApp initialization successful
05-05 03:59:26.907 8805-8834/com.example.myrwaapp W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
05-05 03:59:26.925 8805-8834/com.example.myrwaapp I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation
05-05 03:59:26.986 8805-8805/com.example.myrwaapp W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
05-05 03:59:27.010 8805-8805/com.example.myrwaapp V/FA: onActivityCreated
05-05 03:59:27.047 8805-8805/com.example.myrwaapp I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
05-05 03:59:27.047 8805-8805/com.example.myrwaapp I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
05-05 03:59:27.048 8805-8830/com.example.myrwaapp V/FA: App measurement collection enabled
05-05 03:59:27.049 8805-8830/com.example.myrwaapp V/FA: App measurement enabled for app package, google app id: com.example.myrwaapp, 1:649640616763:android:9025242f82dd4767798d1e
05-05 03:59:27.052 8805-8830/com.example.myrwaapp I/FA: App measurement initialized, version: 21028
05-05 03:59:27.052 8805-8830/com.example.myrwaapp I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
05-05 03:59:27.052 8805-8830/com.example.myrwaapp I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.example.myrwaapp
05-05 03:59:27.052 8805-8830/com.example.myrwaapp D/FA: Debug-level message logging enabled
05-05 03:59:27.077 8805-8830/com.example.myrwaapp V/FA: Connecting to remote service
05-05 03:59:27.089 8805-8830/com.example.myrwaapp V/FA: Connection attempt already in progress
05-05 03:59:27.143 8805-8830/com.example.myrwaapp V/FA: Activity resumed, time: 8622127
05-05 03:59:27.145 8805-8830/com.example.myrwaapp I/FA: Tag Manager is not found and thus will not be used
05-05 03:59:27.151 8805-8838/com.example.myrwaapp D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
05-05 03:59:27.154 8805-8805/com.example.myrwaapp D/Atlas: Validating map...
05-05 03:59:27.159 8805-8830/com.example.myrwaapp V/FA: Connection attempt already in progress
05-05 03:59:27.159 8805-8830/com.example.myrwaapp V/FA: Connection attempt already in progress
05-05 03:59:27.188 8805-8838/com.example.myrwaapp I/OpenGLRenderer: Initialized EGL, version 1.4
05-05 03:59:27.188 8805-8838/com.example.myrwaapp W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
05-05 03:59:27.215 8805-8838/com.example.myrwaapp D/EGL_emulation: eglCreateContext: 0xa2003100: maj 2 min 0 rcv 2
05-05 03:59:27.240 8805-8838/com.example.myrwaapp D/EGL_emulation: eglMakeCurrent: 0xa2003100: ver 2 0 (tinfo 0xb4233e90)
05-05 03:59:27.243 8805-8838/com.example.myrwaapp D/OpenGLRenderer: Enabling debug mode 0
05-05 03:59:27.294 8805-8838/com.example.myrwaapp D/EGL_emulation: eglMakeCurrent: 0xa2003100: ver 2 0 (tinfo 0xb4233e90)
05-05 03:59:27.738 8805-8830/com.example.myrwaapp D/FA: Connected to remote service
05-05 03:59:27.738 8805-8830/com.example.myrwaapp V/FA: Processing queued up service tasks: 4
05-05 03:59:32.795 8805-8830/com.example.myrwaapp V/FA: Inactivity, disconnecting from the service
05-05 03:59:38.884 8805-8830/com.example.myrwaapp V/FA: Recording user engagement, ms: 11740
05-05 03:59:38.886 8805-8830/com.example.myrwaapp V/FA: Connecting to remote service
05-05 03:59:38.892 8805-8830/com.example.myrwaapp V/FA: Activity paused, time: 8633867
05-05 03:59:38.894 8805-8805/com.example.myrwaapp V/FA: onActivityCreated
05-05 03:59:38.913 8805-8830/com.example.myrwaapp V/FA: Connection attempt already in progress
05-05 03:59:38.913 8805-8830/com.example.myrwaapp V/FA: Activity resumed, time: 8633895
05-05 03:59:38.926 8805-8830/com.example.myrwaapp V/FA: Connection attempt already in progress
05-05 03:59:38.926 8805-8830/com.example.myrwaapp V/FA: Connection attempt already in progress
05-05 03:59:38.993 8805-8838/com.example.myrwaapp D/EGL_emulation: eglMakeCurrent: 0xa2003100: ver 2 0 (tinfo 0xb4233e90)
05-05 03:59:39.034 8805-8838/com.example.myrwaapp D/EGL_emulation: eglMakeCurrent: 0xa2003100: ver 2 0 (tinfo 0xb4233e90)
05-05 03:59:39.051 8805-8838/com.example.myrwaapp D/EGL_emulation: eglMakeCurrent: 0xa2003100: ver 2 0 (tinfo 0xb4233e90)
05-05 03:59:39.177 8805-8838/com.example.myrwaapp D/EGL_emulation: eglMakeCurrent: 0xa2003100: ver 2 0 (tinfo 0xb4233e90)
05-05 03:59:39.222 8805-8830/com.example.myrwaapp D/FA: Connected to remote service
05-05 03:59:39.222 8805-8830/com.example.myrwaapp V/FA: Processing queued up service tasks: 4
05-05 03:59:39.224 8805-8838/com.example.myrwaapp D/EGL_emulation: eglMakeCurrent: 0xa2003100: ver 2 0 (tinfo 0xb4233e90)
05-05 03:59:39.335 8805-8838/com.example.myrwaapp D/EGL_emulation: eglMakeCurrent: 0xa2003100: ver 2 0 (tinfo 0xb4233e90)
05-05 03:59:44.247 8805-8830/com.example.myrwaapp V/FA: Inactivity, disconnecting from the service
05-05 03:59:48.704 8805-8838/com.example.myrwaapp D/EGL_emulation: eglMakeCurrent: 0xa2003100: ver 2 0 (tinfo 0xb4233e90)
05-05 03:59:48.871 8805-8849/com.example.myrwaapp W/DynamiteModule: Local module descriptor class for providerinstaller not found.
05-05 03:59:48.877 8805-8849/com.example.myrwaapp I/DynamiteModule: Considering local module providerinstaller:0 and remote module providerinstaller:0
05-05 03:59:48.877 8805-8849/com.example.myrwaapp W/ProviderInstaller: Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
05-05 03:59:48.881 8805-8849/com.example.myrwaapp W/ResourcesManager: Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
05-05 03:59:48.881 8805-8849/com.example.myrwaapp W/ResourcesManager: Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
05-05 03:59:48.942 8805-8849/com.example.myrwaapp W/linker: libconscrypt_gmscore_jni.so: unused DT entry: type 0x6ffffffe arg 0x13dc
05-05 03:59:48.942 8805-8849/com.example.myrwaapp W/linker: libconscrypt_gmscore_jni.so: unused DT entry: type 0x6fffffff arg 0x2
05-05 03:59:48.948 8805-8849/com.example.myrwaapp V/NativeCrypto: Registering com/google/android/gms/org/conscrypt/NativeCrypto's 284 native methods...
05-05 03:59:48.963 8805-8820/com.example.myrwaapp I/art: Background sticky concurrent mark sweep GC freed 976(49KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 8MB/8MB, paused 5.861ms total 31.265ms
05-05 03:59:48.992 8805-8849/com.example.myrwaapp I/art: Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.Java7ExtendedSSLSession>
05-05 03:59:48.992 8805-8849/com.example.myrwaapp I/art: Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.Java7ExtendedSSLSession>
05-05 03:59:48.992 8805-8849/com.example.myrwaapp I/art: Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.Java8ExtendedSSLSession>
05-05 03:59:48.992 8805-8849/com.example.myrwaapp I/art: Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.Java8ExtendedSSLSession>
05-05 03:59:49.002 8805-8849/com.example.myrwaapp I/ProviderInstaller: Installed default security provider GmsCore_OpenSSL
First of all, String comparison in Java, should not be performed using == operator, as it will always compare the address of the objects from the memory and not the actual values. String comparison should be done using equals() method.
Moreover, if you need an AND operation, you should not get all documents that exist within the users collection and make the comparison on the client. For that, you should use a query that looks exactly like this:
String a = "101";
String b = "F1A";
FirebaseFirestore rootRef = FirebaseFirestore.getInstance();
CollectionReference usersRef = rootRef.collection("users");
Query query = usersRef.whereEqualTo("flat", a).whereEqualTo("block", b);
query.get().addOnSuccessListener(/* ... */);
In this way, you are going to get only the documents where the flat property holds the value of 101 AND the value of block holds F1A. As I think that only one apartment has that constraint, you'll be billed with only one read operation.

App crash on Facebook login using facebook4 plugin for phonegap on android

I have a phonegap hybrid app with Facebook connect plugin. First time when I login then the FB login works but after I logout and then again try to login via Facebook then the app crashes with the following Logcat results :
Plugin URL :
https://github.com/jeduan/cordova-plugin-facebook4
06-18 21:31:50.071 3129-3219/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0x9b2370a0
06-18 21:31:50.096 3129-3129/? I/Choreographer: Skipped 39 frames! The application may be doing too much work on its main thread.
06-18 21:31:50.104 3129-3234/? D/EGL_emulation: eglMakeCurrent: 0x9e677300: ver 2 0 (tinfo 0xaa366e80)
06-18 21:31:50.356 3129-3129/? D/CordovaActivity: Incoming Result. Request code = 64206
06-18 21:31:50.356 3129-3129/? D/CordovaInterfaceImpl: Sending activity result to plugin
06-18 21:31:50.356 3129-3129/? D/ConnectPlugin: activity result in plugin: requestCode(64206), resultCode(-1)
06-18 21:31:50.372 3129-3129/? D/com.facebook.FacebookSdk: getGraphApiVersion: v3.0
06-18 21:31:50.372 3129-3129/? D/com.facebook.FacebookSdk: getGraphApiVersion: v3.0
06-18 21:31:50.378 3129-3129/? D/CordovaActivity: Resumed the activity.
06-18 21:31:50.379 3129-3129/? W/com.facebook.appevents.AppEventsLogger: activateApp events are being logged automatically. There's no need to call activateApp explicitly, this is safe to remove.
06-18 21:31:50.551 3129-3219/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0x98eed520
06-18 21:31:51.043 3129-3129/? D/AndroidRuntime: Shutting down VM
--------- beginning of crash
06-18 21:31:51.044 3129-3129/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.sqlchild.app1, PID: 3129
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.indexOf(int)' on a null object reference
at libcore.net.UriCodec.decode(UriCodec.java:153)
at java.net.URLDecoder.decode(URLDecoder.java:60)
at org.apache.cordova.facebook.ConnectPlugin.makeGraphCall(ConnectPlugin.java:751)
at org.apache.cordova.facebook.ConnectPlugin.access$200(ConnectPlugin.java:55)
at org.apache.cordova.facebook.ConnectPlugin$2$1.onCompleted(ConnectPlugin.java:111)
at com.facebook.GraphRequest$1.onCompleted(GraphRequest.java:301)
at com.facebook.GraphRequest$5.run(GraphRequest.java:1380)
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)
06-18 21:31:51.052 1667-2063/? W/ActivityManager: Force finishing activity com.sqlchild.app1/.MainActivity
06-18 21:31:51.067 1259-1321/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 589824
[ 06-18 21:31:51.097 1667: 2063 D/ ]
HostConnection::get() New Host Connection established 0x9aa0cc00, tid 2063
[ 06-18 21:31:51.099 1667: 2063 W/ ]
Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1
06-18 21:31:51.113 1259-1259/? E/EGL_emulation: tid 1259: eglCreateSyncKHR(1881): error 0x3004 (EGL_BAD_ATTRIBUTE)
06-18 21:31:51.199 1667-1667/? W/art: Long monitor contention event with owner method=void com.android.server.am.ActivityManagerService.crashApplication(com.android.server.am.ProcessRecord, android.app.ApplicationErrorReport$CrashInfo) from ActivityManagerService.java:12502 waiters=0 for 133ms
06-18 21:31:51.289 1667-1677/? I/art: Background partial concurrent mark sweep GC freed 36018(2MB) AllocSpace objects, 1(20KB) LOS objects, 33% free, 7MB/11MB, paused 3.358ms total 105.317ms
06-18 21:31:51.381 1667-1729/? I/OpenGLRenderer: Initialized EGL, version 1.4
06-18 21:31:51.390 1667-1729/? D/EGL_emulation: eglCreateContext: 0xa07fc120: maj 2 min 0 rcv 2
06-18 21:31:51.414 1667-1729/? D/EGL_emulation: eglMakeCurrent: 0xa07fc120: ver 2 0 (tinfo 0xa0ea42f0)
06-18 21:31:51.484 1667-1729/? D/EGL_emulation: eglMakeCurrent: 0xa07fc120: ver 2 0 (tinfo 0xa0ea42f0)
06-18 21:31:51.691 1667-3205/? I/AccountManagerService: getTypesVisibleToCaller: isPermitted? true
06-18 21:31:51.698 1667-1683/? W/ActivityManager: Activity pause timeout for ActivityRecord{21fdafb u0 com.sqlchild.app1/.MainActivity t8 f}
06-18 21:31:51.877 1667-3206/? W/art: Long monitor contention event with owner method=void com.android.server.am.ActivityStack$ActivityStackHandler.handleMessage(android.os.Message) from ActivityStack.java:283 waiters=0 for 175ms
06-18 21:31:51.896 1667-1683/? I/ActivityManager: Killing 2545:com.android.keychain/1000 (adj 15): empty #17
06-18 21:31:52.070 2029-2239/? D/EGL_emulation: eglMakeCurrent: 0xae594600: ver 2 0 (tinfo 0xae5924b0)
06-18 21:31:59.062 3129-3129/? I/Process: Sending signal. PID: 3129 SIG: 9
06-18 21:31:59.075 1667-1729/? D/EGL_emulation: eglMakeCurrent: 0xa07fc120: ver 2 0 (tinfo 0xa0ea42f0)
06-18 21:31:59.079 1667-1729/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0x9e8d1360
06-18 21:31:59.128 1667-3206/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 104)
06-18 21:31:59.130 1667-1721/? W/InputDispatcher: channel '7f56d84 com.sqlchild.app1/com.sqlchild.app1.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
06-18 21:31:59.130 1667-1721/? E/InputDispatcher: channel '7f56d84 com.sqlchild.app1/com.sqlchild.app1.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
06-18 21:31:59.129 1667-3206/? W/InputMethodManagerService: Got RemoteException sending setActive(false) notification to pid 3129 uid 10061
06-18 21:31:59.132 1667-1721/? W/InputDispatcher: channel 'e76402c com.sqlchild.app1/com.facebook.FacebookActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
06-18 21:31:59.133 1667-1721/? E/InputDispatcher: channel 'e76402c com.sqlchild.app1/com.facebook.FacebookActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
06-18 21:31:59.153 1667-3206/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 104)
06-18 21:31:59.168 1667-1680/? I/WindowState: WIN DEATH: Window{e76402c u0 com.sqlchild.app1/com.facebook.FacebookActivity}
06-18 21:31:59.169 1667-1680/? W/InputDispatcher: Attempted to unregister already unregistered input channel 'e76402c com.sqlchild.app1/com.facebook.FacebookActivity (server)'
06-18 21:31:59.174 1667-2280/? D/GraphicsStats: Buffer count: 3
06-18 21:31:59.207 1667-1681/? I/ActivityManager: Process com.sqlchild.app1 (pid 3129) has died
06-18 21:31:59.257 1667-3110/? I/WindowState: WIN DEATH: Window{7f56d84 u0 com.sqlchild.app1/com.sqlchild.app1.MainActivity}
06-18 21:31:59.257 1667-3110/? W/InputDispatcher: Attempted to unregister already unregistered input channel '7f56d84 com.sqlchild.app1/com.sqlchild.app1.MainActivity (server)'

Gradle Build failed - AGPBI

I am struggling with a build error that I can't seem to find an answer to.
AGPBI: {"kind":"error","text":"error: attribute \u0027android:guid\u0027 not found.","sources":[{"file":"D:\\Work\\project\\app\\src\\main\\res\\layout\\activity_home.xml","position":{"startLine":4}}],"original":"","tool":"AAPT"}
It seems like it is repeated for each fragment. (About 30 more times)
I am not sure what to do now.
My logcat returned this
06-13 15:24:11.822 28459-28459/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
06-13 15:24:11.825 28459-28459/? D/AndroidRuntime: CheckJNI is OFF
06-13 15:24:11.964 28459-28459/? D/AndroidRuntime: Calling main entry com.android.commands.pm.Pm
06-13 15:24:11.975 28459-28459/? I/art: System.exit called, status: 0
06-13 15:24:11.975 28459-28459/? I/AndroidRuntime: VM exiting with result code 0.
06-13 15:24:12.354 28478-28478/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
06-13 15:24:12.358 28478-28478/? D/AndroidRuntime: CheckJNI is OFF
06-13 15:24:12.496 28478-28478/? D/AndroidRuntime: Calling main entry com.android.commands.pm.Pm
06-13 15:24:12.508 28478-28478/? I/art: System.exit called, status: 0
06-13 15:24:12.508 28478-28478/? I/AndroidRuntime: VM exiting with result code 0.
------- beginning of system
06-13 15:24:27.005 790-12370/? D/PowerManagerService: acquireWakeLockInternal: lock=875848314, flags=0x1, tag="CMWakeLock", ws=WorkSource{10011 com.google.android.gms}, uid=10011, pid=13763
updateWakeLockSummaryLocked: mWakefulness=Asleep, mWakeLockSummary=0x1
06-13 15:24:27.006 790-12370/? D/PowerManagerService: updateUserActivitySummaryLocked: mWakefulness=Asleep, mUserActivitySummary=0x0, nextTimeout=0 (76973684 ms ago)
updateDisplayPowerStateLocked: mDisplayReady=true, policy=0, mWakefulness=0, mWakeLockSummary=0x1, mUserActivitySummary=0x0, mBootCompleted=true, mScreenBrightnessBoostInProgress=false
06-13 15:24:27.009 790-12370/? D/PowerManagerService: Acquiring suspend blocker "PowerManagerService.WakeLocks".
06-13 15:24:27.009 790-12370/? D/PowerManagerNotifier: onWakeLockAcquired: flags=1, tag="CMWakeLock", packageName=com.google.android.gms, ownerUid=10011, ownerPid=13763, workSource=WorkSource{10011 com.google.android.gms}
06-13 15:24:27.055 13763-28314/? E/Auth: [GoogleAccountDataServiceImpl] getToken() -> BAD_AUTHENTICATION. Account: , App: com.google.android.gms, Service: oauth2:https://www.googleapis.com/auth/contextcontroller
gai: Long live credential not available.
at gaj.b(:com.google.android.gms#12685006#12.6.85 (020300-197041431):20)
at gaj.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):50)
at fyt.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):38)
at hpk.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):8)
at hpk.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):189)
at hok.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):2)
at hoh.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):17)
at hoh.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):6)
at cyz.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):25)
at cyz.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):82)
at fvp.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):6)
at fvo.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):2)
at fvo.e(:com.google.android.gms#12685006#12.6.85 (020300-197041431):6)
at fvo.d(:com.google.android.gms#12685006#12.6.85 (020300-197041431):1)
at fvm.b(:com.google.android.gms#12685006#12.6.85 (020300-197041431):1)
at opm.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):1)
at onz.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):3)
at drq.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):57)
at dmx.run(:com.google.android.gms#12685006#12.6.85 (020300-197041431):2)
at dmv.handleMessage(:com.google.android.gms#12685006#12.6.85 (020300-197041431):3)
at ouz.run(:com.google.android.gms#12685006#12.6.85 (020300-197041431):6)
at ovl.run(:com.google.android.gms#12685006#12.6.85 (020300-197041431):27)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at pbm.run(:com.google.android.gms#12685006#12.6.85 (020300-197041431))
at java.lang.Thread.run(Thread.java:818)
06-13 15:24:27.059 13763-28314/? W/Auth: [GetToken] GetToken failed with status code: BadAuthentication
06-13 15:24:27.083 13763-28314/? W/Auth: [GoogleAuthUtil] GoogleAuthUtil
06-13 15:24:27.083 13763-28314/? W/AuthSessionAuthenticato: Auth related exception is being ignored: BadAuthentication
06-13 15:24:27.100 13763-28314/? E/ctxmgr: [BaseServerTask]Server task (WriteInterestRecordTask) got error statusCode=-1.
com.android.volley.VolleyError: Unable to obtain auth token - is the device online?
at drq.a(:com.google.android.gms#12685006#12.6.85 (020300-197041431):65)
at dmx.run(:com.google.android.gms#12685006#12.6.85 (020300-197041431):2)
at dmv.handleMessage(:com.google.android.gms#12685006#12.6.85 (020300-197041431):3)
at ouz.run(:com.google.android.gms#12685006#12.6.85 (020300-197041431):6)
at ovl.run(:com.google.android.gms#12685006#12.6.85 (020300-197041431):27)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at pbm.run(:com.google.android.gms#12685006#12.6.85 (020300-197041431))
at java.lang.Thread.run(Thread.java:818)
06-13 15:24:27.108 13763-28314/? E/ctxmgr: [SyncServerInterestRecordsOperation]Failed WriteInterestRecord: network status=-1
06-13 15:24:27.109 790-805/? D/PowerManagerService: releaseWakeLockInternal: lock=875848314 [CMWakeLock], flags=0x0
06-13 15:24:27.109 790-805/? D/PowerManagerNotifier: onWakeLockReleased: flags=1, tag="CMWakeLock", packageName=com.google.android.gms, ownerUid=10011, ownerPid=13763, workSource=WorkSource{10011 com.google.android.gms}
06-13 15:24:27.109 790-805/? D/PowerManagerService: updateWakeLockSummaryLocked: mWakefulness=Asleep, mWakeLockSummary=0x0
06-13 15:24:27.110 790-805/? D/PowerManagerService: updateUserActivitySummaryLocked: mWakefulness=Asleep, mUserActivitySummary=0x0, nextTimeout=0 (76973788 ms ago)
updateDisplayPowerStateLocked: mDisplayReady=true, policy=0, mWakefulness=0, mWakeLockSummary=0x0, mUserActivitySummary=0x0, mBootCompleted=true, mScreenBrightnessBoostInProgress=false
Releasing suspend blocker "PowerManagerService.WakeLocks".
Turns out that I renamed all of my android:id attributes to 'guid' and because its not an issue that happens often I couldn't find the issue online

android version compatibility

The question is myapp sometimes run well and sometimes doesn't.I used ionic+cordova+angular to do it. It does not work at 5.0.1 version.
This is the logcat when i test with android studio
07-28 15:55:19.894 9987-9987/? E/Zygote: MountEmulatedStorage()
07-28 15:55:19.894 9987-9987/? E/Zygote: v2
07-28 15:55:19.904 9987-9987/? E/Zygote: accessInfo : 0
07-28 15:55:19.904 9987-9987/? E/SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
07-28 15:55:20.084 9987-9987/io.ionic.starter E/SysUtils: ApplicationContext is null in ApplicationStatus
07-28 15:55:20.164 9987-9987/io.ionic.starter E/chromium: [ERROR:browser_gpu_channel_host_factory.cc(258)] Failed to init browser shader disk cache.
07-28 15:55:20.194 9987-9987/io.ionic.starter E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
07-28 15:55:20.194 9987-10081/io.ionic.starter E/ActivityThread: Failed to find provider info for com.google.settings
ionic cordova plugin add cordova-plugin-crosswalk-webview --save Add this will be work.

Get session info failed

I'm trying to run the opentok android beta but I keep getting
07-28 19:46:03.703: W/opentok-session(1707): get session info failed
07-28 19:46:03.703: W/opentok-session(1707): com.opentok.webservices.TokenAuthRequest$TokenAuthRequestException: Error in response: Invalid Token: Sentinel missing
07-28 19:46:03.703: W/opentok-session(1707): at com.opentok.webservices.TokenAuthRequest.issue(TokenAuthRequest.java:99)
07-28 19:46:03.703: W/opentok-session(1707): at com.opentok.webservices.SessionInfo.<init>(SessionInfo.java:45)
07-28 19:46:03.703: W/opentok-session(1707): at com.opentok.webservices.SessionInfo.fetch(SessionInfo.java:31)
07-28 19:46:03.703: W/opentok-session(1707): at com.opentok.impl.SessionImpl.attach(SessionImpl.java:99)
07-28 19:46:03.703: W/opentok-session(1707): at com.opentok.impl.SessionImpl.access$000(SessionImpl.java:55)
07-28 19:46:03.703: W/opentok-session(1707): at com.opentok.impl.SessionImpl$1.run(SessionImpl.java:86)
07-28 19:46:03.703: W/opentok-session(1707): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
07-28 19:46:03.703: W/opentok-session(1707): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
07-28 19:46:03.703: W/opentok-session(1707): at java.lang.Thread.run(Thread.java:841)
07-28 19:46:03.834: E/demo-hello-world(1707): session failed! com.opentok.android.OpentokException: Authorization Failure - Invalid credentials were provided.
I know it means that the session id and the token I'm providing is wrong but I don't know who that can be because I'm getting it from the opentok dashboard.
EDIT
This is the session id I used 1_MX4zNjA3NDkwMn4xMjcuMC4wLjF-TW9uIEp1bCAyOSAwNDoxNjozMiBQRFQgMjAxM34wLjIzMTkwMzMxfg
and the token I used
cGFydG5lcl9pZD0zNjA3NDkwMiZzZGtfdmVyc2lvbj10YnJ1YnktdGJyYi12MC45MS4yMDExLTAyLTE3JnNpZz0wMzY4NzQzYjFiNDgzNDI3NDAzZWU0ZWM0Yzg1OGVlZGI5YjI0ZGQ1OnJvbGU9cHVibGlzaGVyJnNlc3Npb25faWQ9MV9NWDR6TmpBM05Ea3dNbjR4TWpjdU1DNHdMakYtVFc5dUlFcDFiQ0F5T1NBd05Eb3hOam96TWlCUVJGUWdNakF4TTM0d0xqSXpNVGt3TXpNeGZnJmNyZWF0ZV90aW1lPTEzNzUwOTY2NDYmbm9uY2U9MC44MjM1NjI5MDY2MTA3ODcxJmV4cGlyZV90aW1lPTEzNzUxODMwMjUmY29ubmVjdGlvbl9kYXRhPQ
A valid token will start with T1==, the token you've shown does not. Can you go back to the Dashboard, create a new token for that session, paste the entire string into your application code, and try again?

Categories