-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.net.SocketException: sendto failed: ENETUNREACH (Network is unreachable) #69
Comments
|
i got few crashes and non fatal exceptions from it. there is network permission and its working in most of devices. but i got some errors and i want to be sure its not related to the library |
@kaushikgopal If it helps, this is the stacktrace from fabric - http://crashes.to/s/0a4e6816d6c . Quick qn, how do we conclude this is a non-fatal error ? I haven't been able to reproduce this so far, but apparently a lot of devices seems to be reporting this error as can be seen from the Crashlytics report. (No user has also come back to us reporting any peculiar crashes yet). |
@kaushikgopal I'm seeing the same error in a live deployment on ~17% of devices but I have not been able to replicate. Are there any code changes that I can make so that the True Time library passes the error to my code instead of it being thrown as a Fatal Exception? My code:
Error:
|
I'm getting the same exception when I am not connected to a wifi network (of course). But my problem is that I cannot stop the app from crashing when it happens, even when I catch the onError. |
sorry for being AWOL on this. I've carved some more time for myself to maintain TT better. @ccsam278 : I guess the part i don't completely understand is that the Are you saying this is not currently happening? If it's not, then that's most definitely something i should/can fix (though i'll need more guidance on reproducing the issue). An easy way to try this would be with the sample app attached in this library. @MyNameIsAnti - are you seeing this behavior with the sample app in the repository as well? i.e. when not connected to a network, is the app crashing? i don't see this behavior which makes me think maybe it has to do with the way you're calling TrueTime. If you can paste a snippet of how you're calling TrueTime.init and potentially trying it out with the sample app, that'll help resolve the issue faster. |
@kaushikgopal I am saying that the Fatal Exception is not seen in my I haven't been able to replicate the issue on a test device. There have been hundreds of reports from Crashlytics on multiple apps though. I have also seen a second error (that I can't replicate) which might aid in you finding the issue:
|
@ccsam278 so that last exception you posted could very well be fixed with #70. More detailed discussion on that here. Can you try upgrading to |
tl;dr - |
I can't replicate the issue so I can't be sure that the update will fix the it. Previously the issue was only seen when released to a large group of app users. I started using the basic version of TrueTime to avoid the issue a while ago. Thanks for your help @kaushikgopal |
👍 i'm about 90% confident this should now be taken care of with the latest changes. closing this out now. feel free to reopen if you're seeing this again (with the latest update) |
I'm getting this exception in 3.4:
I using a list of NTP hosts:
|
I got the same issue in version 3.4 Caused by java.net.SocketException: sendto failed: ENETUNREACH (Network is unreachable) |
Got the same crash running on version 3.4 also. |
I would suggest that anyone facing this issue on 3.4/3.5 uses |
I'm getting crashes due to this exceptions.
this is the full stacktrace :
Fatal Exception: io.reactivex.exceptions.UndeliverableException: java.net.SocketException: sendto failed: ENETUNREACH (Network is unreachable)
at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:349)
at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.innerError(FlowableFlatMap.java:604)
at io.reactivex.internal.operators.flowable.FlowableFlatMap$InnerSubscriber.onError(FlowableFlatMap.java:665)
at io.reactivex.internal.operators.flowable.FlowableRetryPredicate$RepeatSubscriber.onError(FlowableRetryPredicate.java:81)
at io.reactivex.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onError(FlowableDoOnEach.java:110)
at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.onError(FlowableSubscribeOn.java:102)
at io.reactivex.internal.operators.flowable.FlowableCreate$BaseEmitter.onError(FlowableCreate.java:268)
at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.drain(FlowableCreate.java:510)
at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.onError(FlowableCreate.java:461)
at com.instacart.library.truetime.TrueTimeRx$4$1$2.subscribe(TrueTimeRx.java:201)
at io.reactivex.internal.operators.flowable.FlowableCreate.subscribeActual(FlowableCreate.java:72)
at io.reactivex.Flowable.subscribe(Flowable.java:12986)
at io.reactivex.Flowable.subscribe(Flowable.java:12932)
at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.run(FlowableSubscribeOn.java:82)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
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)
Caused by java.net.SocketException: sendto failed: ENETUNREACH (Network is unreachable)
at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:542)
at libcore.io.IoBridge.sendto(IoBridge.java:511)
at java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:184)
at java.net.DatagramSocket.send(DatagramSocket.java:305)
at com.instacart.library.truetime.SntpClient.requestTime(SntpClient.java:114)
at com.instacart.library.truetime.TrueTime.requestTime(TrueTime.java:122)
at com.instacart.library.truetime.TrueTimeRx$4$1$2.subscribe(TrueTimeRx.java:197)
at io.reactivex.internal.operators.flowable.FlowableCreate.subscribeActual(FlowableCreate.java:72)
at io.reactivex.Flowable.subscribe(Flowable.java:12986)
at io.reactivex.Flowable.subscribe(Flowable.java:12932)
at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.run(FlowableSubscribeOn.java:82)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
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)
Caused by android.system.ErrnoException: sendto failed: ENETUNREACH (Network is unreachable)
at libcore.io.Posix.sendtoBytes(Posix.java)
at libcore.io.Posix.sendto(Posix.java:211)
at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:278)
at libcore.io.IoBridge.sendto(IoBridge.java:509)
at java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:184)
at java.net.DatagramSocket.send(DatagramSocket.java:305)
at com.instacart.library.truetime.SntpClient.requestTime(SntpClient.java:114)
at com.instacart.library.truetime.TrueTime.requestTime(TrueTime.java:122)
at com.instacart.library.truetime.TrueTimeRx$4$1$2.subscribe(TrueTimeRx.java:197)
at io.reactivex.internal.operators.flowable.FlowableCreate.subscribeActual(FlowableCreate.java:72)
at io.reactivex.Flowable.subscribe(Flowable.java:12986)
at io.reactivex.Flowable.subscribe(Flowable.java:12932)
at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.run(FlowableSubscribeOn.java:82)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
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)
why is it happening ?
The text was updated successfully, but these errors were encountered: