GithubHelp home page GithubHelp logo

Comments (8)

ujjwalgoyal avatar ujjwalgoyal commented on September 6, 2024

Could you please check this issue?

from certificate-transparency-android.

mattmook avatar mattmook commented on September 6, 2024

Hi there, I've tried to take a look but haven't been able to replicate 😞

The log list is hosted by Google at https://www.gstatic.com/ct/log_list/v2/log_list.json which we have no control over, but should have incredibly good uptime.

The most likely scenario, however, is that the users network failed on retrieving this file.

At the moment we don't retry loading the file, instead we are failing fast.

It is possible to provide the library with a disk cache to reduce the times the phone needs to update this from the server as the current implementation only holds it in memory. Basically, when creating the certificateTransparencyInterceptor you can add in diskCache = AndroidDiskCache(getApplication())

from certificate-transparency-android.

ujjwalgoyal avatar ujjwalgoyal commented on September 6, 2024

@mattmook
Disk cache is enabled for the library yet post a couple of success we are receiving above mentioned failure.
Also, I can see the log list expires after 24 hours. Can we increase the expiry time?

from certificate-transparency-android.

ujjwalgoyal avatar ujjwalgoyal commented on September 6, 2024

I am also getting the following error
Failure: Unable to load log servers with log-list.json failed to load with java.net.SocketTimeoutException: failed to connect to www.gstatic.com/172.217.19.99 (port 443) from /100.115.231.33 (port 35030) after 10000ms
at libcore.io.IoBridge.connectErrno(IoBridge.java:185)
at libcore.io.IoBridge.connect(IoBridge.java:130)
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:357)
at java.net.Socket.connect(Socket.java:626)
at okhttp3.internal.platform.AndroidPlatform.connectSocket(:58)
at okhttp3.internal.connection.RealConnection.connectSocket(:268)
at okhttp3.internal.connection.RealConnection.connect(:176)
at okhttp3.internal.connection.ExchangeFinder.findConnection(:236)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(:109)
at okhttp3.internal.connection.ExchangeFinder.find(:77)
at okhttp3.internal.connection.Transmitter.newExchange$okhttp(:162)
at okhttp3.internal.connection.ConnectInterceptor.intercept(:35)
at okhttp3.internal.http.RealInterceptorChain.proceed(:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(:87)
at okhttp3.internal.cache.CacheInterceptor.intercept(:82)
at okhttp3.internal.http.RealInterceptorChain.proceed(:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(:87)
at okhttp3.internal.http.BridgeInterceptor.intercept(:84)
at okhttp3.internal.http.RealInterceptorChain.proceed(:112)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(:71)
at okhttp3.internal.http.RealInterceptorChain.proceed(:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(:87)
at o.ьι.intercept(:28)
at okhttp3.internal.http.RealInterceptorChain.proceed(:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(:87)
at okhttp3.RealCall.getResponseWithInterceptorChain(:184)
at okhttp3.RealCall$AsyncCall.run(:136)
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)

from certificate-transparency-android.

ujjwalgoyal avatar ujjwalgoyal commented on September 6, 2024

Also, I am getting the following error for production users
Failure: Unable to load log servers with log-list.json failed to load with java.net.UnknownHostException: Unable to resolve host "www.gstatic.com": No address associated with hostname
at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:157)
at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:105)
at java.net.InetAddress.getAllByName(InetAddress.java:1154)
at okhttp3.Dns$Companion$SYSTEM$1.lookup(:48)
at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(:160)
at okhttp3.internal.connection.RouteSelector.nextProxy(:125)
at okhttp3.internal.connection.RouteSelector.next(:71)
at okhttp3.internal.connection.ExchangeFinder.findConnection(:199)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(:109)
at okhttp3.internal.connection.ExchangeFinder.find(:77)
at okhttp3.internal.connection.Transmitter.newExchange$okhttp(:162)
at okhttp3.internal.connection.ConnectInterceptor.intercept(:35)
at okhttp3.internal.http.RealInterceptorChain.proceed(:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(:87)
at okhttp3.internal.cache.CacheInterceptor.intercept(:82)
at okhttp3.internal.http.RealInterceptorChain.proceed(:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(:87)
at okhttp3.internal.http.BridgeInterceptor.intercept(:84)
at okhttp3.internal.http.RealInterceptorChain.proceed(:112)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(:71)
at okhttp3.internal.http.RealInterceptorChain.proceed(:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(:87)
at o.ьι.intercept(:28)
at okhttp3.internal.http.RealInterceptorChain.proceed(:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(:87)
at okhttp3.RealCall.getResponseWithInterceptorChain(:184)
at okhttp3.RealCall$AsyncCall.run(:136)
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:764)
Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
at libcore.io.Linux.android_getaddrinfo(Native Method)
at libcore.io.BlockGuardOs.android_getaddrinfo(BlockGuardOs.java:172)
at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:137)

from certificate-transparency-android.

mattmook avatar mattmook commented on September 6, 2024

java.net.UnknownHostException exception looks like the user has no network connectivity.

With java.net.SocketTimeoutException are you able to easily replicate this. I might be good for us to experiment to see what sort of maximum timeout would make sense.

from certificate-transparency-android.

ujjwalgoyal avatar ujjwalgoyal commented on September 6, 2024

@mattmook
We are not able to replicate this on our end but we can see a lot of users facing this issue.

from certificate-transparency-android.

mattmook avatar mattmook commented on September 6, 2024

As every user of the library may have different requirements we make no attempt to recover from a network failure, such as UnknownHostException or SocketTimeoutException. As a user of this library, what this means is if the result you get back is a Failure you have the same choice to make as you would with any network call, give the user the option to retry the connection through a button or retry automatically in the background.

That being said to try and alleviate some of the timeouts you are seeing I have increased the network timeout to 30 seconds which will go out in the next release of the library. This can be further overridden by configuring a custom LogListService when creating the interceptor.

from certificate-transparency-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.