Comments (8)
Could you please check this issue?
from certificate-transparency-android.
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.
@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.
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.
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.
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.
@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.
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)
- Traffic Interception In Certificate Transparency HOT 3
- Does the lib support IP address ? HOT 1
- Unknown dependency - kotlinx-coroutines-core-jvm HOT 1
- How to create one separate βjarβ or βaarβ by this CTL project ? HOT 1
- Enable explicitApi mode for android module
- SerializationException while getting ParsedLogEntry using HttpLogClient for CTlog url -> http://ct.googleapis.com/logs/argon2021/ct/v1/ HOT 2
- NullPointerException in LogListJsonParserV2.parseJson HOT 2
- Using includeHost() could be error prone HOT 1
- java.security.NoSuchAlgorithmException: SHA-256 MessageDigest not available HOT 4
- Format of Trusted.toString() is slightly confusing
- Use LogClientService in external Java Project? HOT 2
- ClassNotFoundException when trying to use the builder or DSL funtion to build the interceptor
- ClassNotFoundException when trying to use the builder or DSL funtion to build the interceptor HOT 1
- CertificateTransparency: Failure: No certificates
- Migrating away from JCenter HOT 5
- JCenter deprecation HOT 1
- jcenter is being shutdown HOT 1
- Sun setting on JCenter HOT 1
- Could not resolve com.babylon.certificatetransparency:certificatetransparency-android:0.3.0. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from certificate-transparency-android.