When I try to connect to a URL I am getting the below log trace
2017-03-18 00:11:54.519 ERROR: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateNotYetValidException: NotBefore: Tue Mar 14 13:53:28 PDT 2017
The Server's certificate is valid from Mar 14 2017 and I am trying to connect on Mar 18 2017 still why this error occurs? Is there any other cause for this exception?
Most of the answers for similar question suggest to check the systems time but in this case the logger is added with system time, so it is not the case.
In my case, the emulator date wasn't correct, it was set to 8 days earlier then the actual date.
Edit: As a tip, i would recommend to use Cold Boot for the emulator. Because the date and time only get updated on Cold boot, but not on Quick boot.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With