Android libcore io iobridge

at libcore.io.IoBridge.connectErrno(IoBridge.java:169) #3191

Comments

aiven163 commented Feb 27, 2017

Hi,swankjesse:
when i send the request, I’m getting some strange errors during requests. I did not find a solution, I need help,thank you;

Retrofit: 2.2.0
OkHttp: 3.6.0
Tested Android versions: 5.0.2, 5.1 and 5.1.1

Stacktrace:

java.net.SocketTimeoutException: failed to connect to /117.185.124.14 (port 18080) after 20000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:169)
at libcore.io.IoBridge.connect(IoBridge.java:122)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:184)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:457)
at java.net.Socket.connect(Socket.java:882)
at okhttp3.internal.Platform$Android.connectSocket(Platform.java:200)
at okhttp3.internal.io.RealConnection.connectSocket(RealConnection.java:137)
at okhttp3.internal.io.RealConnection.connect(RealConnection.java:108)
at okhttp3.internal.http.StreamAllocation.findConnection(StreamAllocation.java:188)
at okhttp3.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:127)
at okhttp3.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
at okhttp3.internal.http.HttpEngine.connect(HttpEngine.java:289)
at okhttp3.internal.http.HttpEngine.sendRequest(HttpEngine.java:241)
at okhttp3.RealCall.getResponse(RealCall.java:240)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:198)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160)
at okhttp3.RealCall.execute(RealCall.java:57)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:177)
at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:111)
at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:92)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:8666)
at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:220)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
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:818)

The text was updated successfully, but these errors were encountered:

Источник

java.lang.ClassCastException libcore.io.IoBridge.getLocalInetSocketAddress #18118

Comments

hkxicor commented Feb 27, 2018

Is this a bug report?

Have you read the Contributing Guidelines?

(Write your answer here.)

Environment

Steps to Reproduce

App getting crash white operating on OnePlus OnePlus5 (OnePlus5), 6144MB RAM, Android 8.0

Expected Behavior

(Write what you thought would happen.)

Actual Behavior

App Getting Crashed

java.lang.ClassCastException:
at libcore.io.IoBridge.getLocalInetSocketAddress (IoBridge.java:700)
at libcore.io.IoBridge.connectDetail (IoBridge.java:197)
at libcore.io.IoBridge.connect (IoBridge.java:138)
at java.net.PlainSocketImpl.socketConnect (PlainSocketImpl.java:129)
at java.net.AbstractPlainSocketImpl.doConnect (AbstractPlainSocketImpl.java:356)
at java.net.AbstractPlainSocketImpl.connectToAddress (AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect (AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:356)
at java.net.Socket.connect (Socket.java:616)
at okhttp3.internal.platform.AndroidPlatform.connectSocket (AndroidPlatform.java:63)
at okhttp3.internal.connection.RealConnection.connectSocket (RealConnection.java:220)
at okhttp3.internal.connection.RealConnection.connect (RealConnection.java:146)
at okhttp3.internal.connection.StreamAllocation.findConnection (StreamAllocation.java:186)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection (StreamAllocation.java:121)
at okhttp3.internal.connection.StreamAllocation.newStream (StreamAllocation.java:100)
at okhttp3.internal.connection.ConnectInterceptor.intercept (ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept (CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept (BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept (RetryAndFollowUpInterceptor.java:120)
at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain (RealCall.java:179)
at okhttp3.RealCall$AsyncCall.execute (RealCall.java:129)
at okhttp3.internal.NamedRunnable.run (NamedRunnable.java: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)

Читайте также:  Чем создать иконку для android

Reproducible Demo

Bug is not app specific. Its library bug

The text was updated successfully, but these errors were encountered:

Источник

help!help. android.system.ErrnoException #1

Comments

qp910 commented Mar 7, 2017

Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory) at libcore.io.Posix.open(Native Method) at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186) at libcore.io.IoBridge.open(IoBridge.java:438) at java.io.FileInputStream.(FileInputStream.java:76) at java.io.FileInputStream.(FileInputStream.java:103) at java.io.FileReader.(FileReader.java:66) at erik.android.vision.visiontest.Parameters.initPurpose(Parameters.java:88) at erik.android.vision.visiontest.Communications.initNetworkTables(Communications.java:53) at erik.android.vision.visiontest.Camera2Activity.onCreate(Camera2Activity.java:279) at android.app.Activity.performCreate(Activity.java:6323) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2385) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2492) at android.app.ActivityThread.access$900(ActivityThread.java:153) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5458) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)

The text was updated successfully, but these errors were encountered:

erikuhlmann commented Mar 7, 2017

I’m pleasantly surprised that someone is actually interested in what we’re doing. If your team is seriously planning on using our vision app for this competition season, we’d love to hear about it! You can contact us using the email listed on our github page (https://github.com/ligerbots)

To address the issue: There are three required files that you should copy to /storage/emulated/0 (excuse the bad naming for the moment). I realized I hadn’t checked them in before. They should now be in the root folder of the repository

  • cameraparameters.json: The camera matrix and distortion vector required to generate 3D coordinates. Currently contains parameters for the Nexus 5 camera
  • camerasettings.json: Camera exposure time and sensitivity. Currently contains arbitrary values that work in our shop but will need to be tuned on the field
  • purpose.txt: What the phone is supposed to do. Enter boiler for boiler vision (currently not working well) and gearlift for gear lift vision (works pretty well).

Note: If you try to connect two stock Nexus 5s to the roboRIO, USB tethering will not work! We are running a custom-built AOSP ROM to get two phones to connect and I have not published the necessary source changes yet. However, if you only plan on one phone, it will work fine.

Читайте также:  Эндоскоп для андроид автомобильный

Note 2: I assume you’ve figured out how to speak the UDP-based data and camera stream protocols (camera stream is essentially WPILib format except in separate UDP packets, data is all the variables as 64-bit floats packed into a packet with a byte to tell the robot what type of data it is — boiler or gear. It’s all in Communications.java). If not, or you have any more questions, feel free to ask 😄

qp910 commented Mar 9, 2017

I use xiaomi mobile phone ,copy three files to /storage/emulated/0 , it still doesn’t work and the same problem,but now I’m interested in heart rate monitoring through opencv, do you know the principle,I don’t have anything on GitHub

erikuhlmann commented Mar 9, 2017

You also need to explicitly give the app storage and camera permissions — I haven’t gotten around to making it ask. I don’t know anything about heart rate monitoring. Are you associated with an FRC team?

Источник

Library not working on Android Q (API 29) #33

Comments

akrezic1 commented Jun 6, 2019

There is an issue with permissions because of Scoped Storage and it’s giving this stacktrace:

java.io.FileNotFoundException: /storage/emulated/0/DCIM/Camera/IMG_20190606_105527.jpg: open failed: EACCES (Permission denied) at libcore.io.IoBridge.open(IoBridge.java:496) at java.io.RandomAccessFile. (RandomAccessFile.java:289) at com.bumptech.glide.util.ByteBufferUtil.fromFile(ByteBufferUtil.java:43) at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:65) at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62) at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302) at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:272) at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446) Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied) at libcore.io.Linux.open(Native Method) at libcore.io.ForwardingOs.open(ForwardingOs.java:167) at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252) at libcore.io.ForwardingOs.open(ForwardingOs.java:167) at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7218) at libcore.io.IoBridge.open(IoBridge.java:482) at java.io.RandomAccessFile. (RandomAccessFile.java:289) at com.bumptech.glide.util.ByteBufferUtil.fromFile(ByteBufferUtil.java:43) at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:65) at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62) at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302) at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:272) at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)

Tested on Android Studio 3.5 Beta 3 with Pixel 3 API 29 emulator. To test it you need to set compileSdkVersion and targetSdkVersion to 29.

The text was updated successfully, but these errors were encountered:

siralam commented Jun 7, 2019

Guess for now you would have to lower the target SDK version, but I will make it in the future version. Thanks for the report!

Читайте также:  Пропала строка уведомлений android

barnhill commented Aug 30, 2019

Ran into this myself. You can get around this by feeding glide the Uri instead of the path

sjd753 commented Oct 3, 2019

Having the same issue here. when are you going to fix it for Q api 29?
what else can be done to get around it?

Ran into this myself. You can get around this by feeding glide the Uri instead of the path

barnhill commented Oct 3, 2019 •

It’s one of the overloaded methods . Can’t remember off the top of my head. Make sure you use the latest glide too.

yesidlazaro commented Dec 6, 2019

hi, any progress here?

engr-erum commented Jan 10, 2020

Hi , Any progress for Android Q ?

siralam commented Jan 16, 2020

Sorry guys I have been quite busy recently, but I will try to get this done this month. If not this month may be in Februaray then.

Источник

Not receiving message after internet Re-connect #120

Comments

amitkumaroae commented Nov 4, 2015

All messages sent during disconnect lost.

Case: A & B are on Chat screen > B Switchoff I/N> A sends message to B > B Switch On I/N

I got the following logs when I turn the wifi off.

at java.net.PlainSocketImpl.write(PlainSocketImpl.java:504)
at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:37)
at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:266)
at java.io.OutputStreamWriter.flushBytes(OutputStreamWriter.java:167)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:158)
at java.io.BufferedWriter.flush(BufferedWriter.java:124)
at org.jivesoftware.smack.util.ObservableWriter.flush(ObservableWriter.java:44)
at org.jivesoftware.smack.tcp.PacketWriter.writePackets(PacketWriter.java:190)
at org.jivesoftware.smack.tcp.PacketWriter.access$000(PacketWriter.java:40)
at org.jivesoftware.smack.tcp.PacketWriter$1.run(PacketWriter.java:77)
11-04 17:16:15.572 7023-32251/com.entermixx W/XMPPConnection﹕ Connection closed with error
java.net.SocketException: recvfrom failed: ETIMEDOUT (Connection timed out)
at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:592)
at libcore.io.IoBridge.recvfrom(IoBridge.java:556)
at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)
at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
at java.io.InputStreamReader.read(InputStreamReader.java:231)
at java.io.BufferedReader.read(BufferedReader.java:325)
at org.jivesoftware.smack.util.ObservableReader.read(ObservableReader.java:38)
at org.kxml2.io.KXmlParser.fillBuffer(KXmlParser.java:1515)
at org.kxml2.io.KXmlParser.peekType(KXmlParser.java:992)
at org.kxml2.io.KXmlParser.next(KXmlParser.java:349)
at org.kxml2.io.KXmlParser.next(KXmlParser.java:313)
at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:293)
at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:49)
at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:83)
Caused by: android.system.ErrnoException: recvfrom failed: ETIMEDOUT (Connection timed out)
at libcore.io.Posix.recvfromBytes(Native Method)
at libcore.io.Posix.recvfrom(Posix.java:161)
at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:250)
at libcore.io.IoBridge.recvfrom(IoBridge.java:553)
at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)
at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
at java.io.InputStreamReader.read(InputStreamReader.java:231)
at java.io.BufferedReader.read(BufferedReader.java:325)
at org.jivesoftware.smack.util.ObservableReader.read(ObservableReader.java:38)
at org.kxml2.io.KXmlParser.fillBuffer(KXmlParser.java:1515)
at org.kxml2.io.KXmlParser.peekType(KXmlParser.java:992)
at org.kxml2.io.KXmlParser.next(KXmlParser.java:349)
at org.kxml2.io.KXmlParser.next(KXmlParser.java:313)
at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:293)
at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:49)
at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:83)

The text was updated successfully, but these errors were encountered:

Источник

Оцените статью