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

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)

Related

How to get the full information of runtime error instead of <Timeout exceeded getting exception details>?

So I'm trying out xamarin in VS2017, but found this undhandled error:
Unhandled Exception:
Java.Lang.SecurityException: <Timeout exceeded getting exception details>
This is very clueless. How can I get the full information of the runtime error like in Android Studio?
I had the same problem while calling some native API,
solved it by
Put a try catch around the block of got which is throwing the error.
Put a breakpoint in the catch block, you can get actual details of the exception.
After getting assistance from Microsoft, I finally found the solution.
TL;DR
Use VS Android device log and filter with "mono-rt" or "Error"
Complete Answer:
There are 2 solution:
1. Using Android Studio logcat:
Open the Android Studio logcat (View > Tool Windows > Logcat). From the logcat window, choose the device, choose the Xamarin.Android deployed application, and choose logcat for Error
Android logcat will display the runtime error:
2. Using Visual Studio Android Device Log:
Open the Visual Studio Android Device Log(Tools > Android > Device Log).
Here is the tricky bit: Unlike Android Studio, VS list all of the device log, not limited to the Xamarin.Android app deployed. So somehow we have to use the filter to get the relevant information. The problem is, what filter should we use? I used my application name and the error didn't show up. It turns out that when the error happen, the log doesn't contain any of the application name. Instead it has "mono-rt" tag with "Error" type.
So there you have it. Filter it with "mono-rt" tag or "Error" type and you will find the error information

What is causing E/BufferItemConsumer error messages in Android Studio logcat?

When debugging my android app, the Android Studio logcat window is flooded with dozens and dozens of identical BufferItemConsumer errors on every click. This is regardless of using the emulator or a physical device.
08-13 18:15:44.497 6005-6005/org.xx.debug E/BufferItemConsumer: [unnamed-6005-129] Failed to release buffer: Unknown error -1 (1)
08-13 18:15:44.499 6005-6005/org.xx.debug E/BufferItemConsumer: [unnamed-6005-130] Failed to release buffer: Unknown error -1 (1)
08-13 18:15:44.502 6005-6005/org.xx.debug E/BufferItemConsumer: [unnamed-6005-131] Failed to release buffer: Unknown error -1 (1)
AS claims the messages are related to the app but no other information is provided in the logs. A google search doesn't turn up anything either.
Any idea where I should start searching to either fix whatever underlying error causes this is or at least suppress the messages? They are more than a nuisance since they crowd out any meaningful log message.

android studio error on startup (failed to create a child event loop)

I've seen this question like 10 times with no good answer. here's the problem whenever i open android studio this error comes up:
Internal Error. Please report to https://https://code.google.com/p/android/issues
java.lang.IllegalStateException: failed to create a child event loop
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:81)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:48)
at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:57)
at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:67)
at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:54)
at org.jetbrains.io.BuiltInServer.start(BuiltInServer.java:79)
at com.intellij.idea.SocketLock$2.call(SocketLock.java:133)
at com.intellij.idea.SocketLock$2.call(SocketLock.java:113)
at com.intellij.idea.SocketLock.underLocks(SocketLock.java:157)
at com.intellij.idea.SocketLock.lock(SocketLock.java:113)
at com.intellij.idea.StartupUtil.lockSystemFolders(StartupUtil.java:263)
at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:101)
at com.intellij.idea.MainImpl.start(MainImpl.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:91)
at java.lang.Thread.run(Thread.java:745) Caused by: io.netty.channel.ChannelException: failed to open a new selector
at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:127)
at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:119)
at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:97)
at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:31)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:77)
... 18 more Caused by: java.io.IOException: Unable to establish loopback connection
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:101)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:68)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:170)
at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)
at java.nio.channels.Pipe.open(Pipe.java:155)
at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:127)
at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:125)
... 22 more Caused by: java.net.ConnectException: Connection timed out: connect
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Net.java:454)
at sun.nio.ch.Net.connect(Net.java:446)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
at sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(PipeImpl.java:130)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:83)
... 30 more
now i've tried everything only "netsh winsock reset" works BUT for only one time and when i go inside Studio it can't build a project because it can't connect to the server using 127.0.0.1 .
please give a decent answer (NOT REINSTALL & RESTART.DONE THAT LIKE 20 TIMES)
The main issue is that even when i'm in android studio and i want to sync a project this error keeps popping up :
Error:Could not connect to server [7c2499c6-5abf-40a5-bcbb-1171adbb7e58 port:50376, addresses:[/127.0.0.1]]. Tried addresses: [/127.0.0.1].
Have you tried the approach in the second comment?https://code.google.com/p/android/issues/detail?id=206352

Installation error: Unknown failure 5

My application worked very well till today, but now when I try to run app, it gives me this error:
[2015-05-04 22:21:44 - probajedan] Installation error: Unknown failure
[2015-05-04 22:21:44 - probajedan] Please check logcat output for more details.
[2015-05-04 22:21:44 - probajedan] Launch canceled!
I tried everything I found on internet but nothing helps.
It's master/detail flow application
SS of logcat is in comment.

Adding parameter in link causes network error (Android 4.0.3+PhoneGap)

When trying to navigate from index.html page to purchase.html, this "A Network error occurred" would appear if I add a parameter to the link
<a href="purchase.html?id=2">.
Removing the "?id=2" then the link works.
This is the detailed error msg:
04-08 21:09:23.850: D/Cordova(967): DroidGap: GapViewClient.onReceivedError: Error code=-1 Description=A network error occurred. URL=file:///android_asset/www/purchase.html?id=2
It seems to be a major issue of Android. http://code.google.com/p/android/issues/detail?id=17535

Categories

Resources