Debugging Xamarin.Forms App on Android Oreo Fails - android

Every time I run to debug app on my Nexus 6P (Android Oreo), the app will get deployed, starts briefly and then exits and Visual Studio (2015) will stop debug process and show following message
Android application is debugging.
Couldn't connect to logcat, GetProcessId returned: 0
Checking Logcat shows lots of errors, 2 of which are predominant
Time Device Name Type PID Tag Message
09-29 13:03:50.240 Huawei Nexus 6P Error 11451 o.mz java.lang.NoClassDefFoundError: o.ʖ
at o.ʷ.ˏ(:363)
at o.Г.ॱ(:247)
at o.Г.ˋ(:141)
at o.ץ.ˎ(:406)
at o.ץ.ˋ(:4352)
at o.ץ.ॱ(:244)
at o.ץ.ˊ(:142)
at o.ᴄ.ॱ(:476)
at o.Ḯ.ˋ(:3890)
at o.Ḯ.ॱ(:3784)
at o.mz$If.onMessage(:3899)
at okhttp3.internal.ws.RealWebSocket$1.onMessage(:62)
at okhttp3.internal.ws.WebSocketReader.readMessageFrame(:242)
at okhttp3.internal.ws.WebSocketReader.processNextFrame(:108)
at okhttp3.internal.ws.RealWebSocket.readMessage(:97)
at okhttp3.ws.WebSocketCall.createWebSocket(:152)
at okhttp3.ws.WebSocketCall.access$000(:41)
at okhttp3.ws.WebSocketCall$1.onResponse(:97)
at okhttp3.RealCall$AsyncCall.execute(:126)
at okhttp3.internal.NamedRunnable.run(:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
and the 2nd and most dominant error is
Time Device Name Type PID Tag Message
09-29 13:04:34.666 Huawei Nexus 6P Error 3759 QC-QMI linux_qmi_qmux_io_wake_lock: Err in writing wakelock=qmuxd_port_wl_0, error [1:Operation not permitted]

Related

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

Malloc debug on Android Nougat doesnt work for my Native code

I am trying to find memory leaks and corruptions in my native code, which is part of a sample java app. Since the procedure for using malloc debug has been updated from Nougat onwards (ref: Malloc Debug for Android N), I have followed the steps in that page to set the options of my interest.
Fortunately, I was able to get the mem corruption detection work (by use of guard option) for a simple buffer overflow in my native code. But, whatever option I use, I couldn't get the leaks detected.
I tried these options:
adb shell setprop libc.debug.malloc.options backtrace
adb shell setprop libc.debug.malloc.options leak_track
I also tried a combination of both options. I didnt see any mallocs or leaks present in my code being captured in logcat. In fact, for most devices I see that device is stuck in bootup when 'backtrace' option is set.
However, what I see is in the logs, is apparently false-positives for leaks in lot of other system programs:
12-16 13:05:51.908 8396 8396 E malloc_debug: +++ chmod leaked block of size 152 at 0x7f7de4b0e0 (leak 1 of 19)
...
12-16 13:05:52.156 8423 8423 E malloc_debug: +++ chown leaked block of size 152 at 0x7f8384b0e0 (leak 1 of 26)
...
12-16 13:05:56.533 8845 8845 E malloc_debug: +++ getprop leaked block of size 152 at 0x7fb684b0e0 (leak 1 of 17)
...
12-16 13:07:24.036 12393 12393 E malloc_debug: +++ /system/bin/dex2oat leaked block of size 131072 at 0xeb22c010 (leak 1 of 2452)
...
12-16 13:07:49.192 13734 13734 E malloc_debug: +++ logcat leaked block of size 5176 at 0x7f8dc5f020 (leak 1 of 21)
So, I have two questions in this context:
Does my apk need to be in a specific location for backtrace/leak_track to work? Was it ever tested for apks before, at least on N?
Do I need to set any other option for leak detection to work?
It looks like Malloc debug on Nougat is not explored much, so I didnt see any results on Google for any known issues or restrictions.
More details on my setup:
- Android Nougat 7.0
- 64 bit chipset
- Java sample app, with native code as shared lib

android.media.MediaCodec.finalize() timed out after 10 seconds

Fatal Exception: java.util.concurrent.TimeoutException
android.media.MediaCodec.finalize() timed out after 10 seconds
I'm receiving this exception from fabric happened with Samsung Galaxy Note 3 (4.3) on the end users side, anybody has any clue on why it happened?
This crash reported by fabric. This is not related to your Application:
https://code.google.com/p/android/issues/detail?id=205978
Devices:
Samsung (62%) : GT-I9300, SM-G7105, GT-I9500, ...
LG (19%) : Nexus 4, H815, D855
Motorola (15%) : XT1058, XT1060, XT1055,...
others (4%)
Android versions:
Android 5.x : 54%
Android 4.x : 45%
Android 6.x : 1%
Following link clearly explains.
How to handle :java.util.concurrent.TimeoutException: android.os.BinderProxy.finalize() timed out after 10 seconds errors?

Adreno error crashes Android cordova app on select dropdown

My Android cordova-based app crashes on an Motorola Droid Turbo 2, Android Version 6.0. The app runs fine on many other devices/platforms - including my android phone.  I can crash the app by making a selection in a completely barebones dropdown.
ADDITIONAL DETAILS (new 5/27/16): 1.) The app does not always crash the first time. Sometimes he can tap on 2 or 3 dropdowns. 2.) The user has another app on his phone, which I built with the same architecture, and it runs fine.
UPDATE: I finally followed USKMobility's tip and handled the whitelist error I had been getting, and got different message right before the app crashes. I have updated them in the block below.
Here are the crucial logcat lines. They start with when I tap the dropdown.
04-30 11:28:26.619: W/Adreno-GSL(9728): <gsl_ldd_control:475>: ioctl fd 38 code 0x40180917 (IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_CTXTID) failed: errno 22 Invalid argument
04-30 11:28:26.620: W/Adreno-GSL(9728): <gsl_ldd_control:475>: ioctl fd 38 code 0x40180917 (IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_CTXTID) failed: errno 16 Device or resource busy
04-30 11:28:26.635: I/Adreno(9728): DequeueBuffer: dequeueBuffer failed
04-30 11:28:26.692: W/google-breakpad(9728): Microdump crash handler failed.
04-30 11:28:26.707: A/libc(9728): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x7f576c0000 in tid 9780 (Chrome_InProcGp)
Another update is that I the app no longer crashes consistently on the first time I use a dropdown. Sometimes I can use 3-5 dropdowns before it crashes. Ideas?

Android Studio logcat BUG spamming java.io.IOException: Connection refused

In Android Studio when phone is connected for debugging logcat keeps spamming this error:
06-27 00:17:17.440 947-2476/? E/UsbDebuggingManager﹕ Communication error:
java.io.IOException: Connection refused
at android.net.LocalSocketImpl.connectLocal(Native Method)
at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:290)
at android.net.LocalSocket.connect(LocalSocket.java:130)
at com.android.server.usb.UsbDebuggingManager.listenToSocket(UsbDebuggingManager.java:75)
at com.android.server.usb.UsbDebuggingManager.run(UsbDebuggingManager.java:111)
at java.lang.Thread.run(Thread.java:841)
It's really anoying and it makes very difficult to debug.
You can filter this out of logcat using the Filter Configuration dropdown box to the right-hand side of the search box.
Then enter a Log Tag regex:
For my Nexus 5, I'm using this tag regex to suppress the spammy logs: ^(?!WifiStateMachine|ConnectivityService|ConnectivityManager)

Categories

Resources