From 81e8b7982b1e8e1886656239b9569568d65acf2a Mon Sep 17 00:00:00 2001 From: John Knox Date: Tue, 19 Feb 2019 10:23:54 -0800 Subject: [PATCH] Add date and time reminder to diagnostic screen Summary: I got tripped up again with a physical iOS device that had the wrong date and time. SSL certs won't be valid. Adds a reminder to the diagnostic screen for anyone running into this in future. Reviewed By: passy Differential Revision: D14132411 fbshipit-source-id: 623120ef5252eae3e2fe0f6f653074f586f17e0e --- xplat/Flipper/FlipperConnectionManagerImpl.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xplat/Flipper/FlipperConnectionManagerImpl.cpp b/xplat/Flipper/FlipperConnectionManagerImpl.cpp index 44520d588..31f7032b7 100644 --- a/xplat/Flipper/FlipperConnectionManagerImpl.cpp +++ b/xplat/Flipper/FlipperConnectionManagerImpl.cpp @@ -134,9 +134,16 @@ void FlipperConnectionManagerImpl::startSync() { step->fail( "No route to flipper found. Is flipper desktop running? Retrying..."); } else { - log(e.what()); + if (e.getType() == folly::AsyncSocketException::SSL_ERROR) { + auto message = std::string(e.what()) + + "\nMake sure the date and time of your device is up to date."; + log(message); + step->fail(message); + } else { + log(e.what()); + step->fail(e.what()); + } failedConnectionAttempts_++; - step->fail(e.what()); } reconnect(); } catch (const std::exception& e) {