I'm using the YouTube Data API to search YouTube's database so i can get the VideoID of the first video that turns up on the result list. That's all I want to do but I keep getting this "There was an IO error: null : No enabled protocols; SSLv3 is no longer supported and was filtered from the list" error.
How do I get rid of this error please?
P.S: You guys are my last option else I'd have to spend a really long time trying to fix this error. Thanks.
I have gone through most of the stackoverflow and github codes for YouTube API search to see if I might be missing something on the code but they have all produced same error message. I have also tried using the first solution provided here but it gives another type of error Disable SSL as a protocol in HttpsURLConnection I am curious as to why i haven't found any one who is using the YouTube api and has encountered this same error. Thanks
public class Searchh extends AsyncTask<Void, Void, Void> {
HttpTransport transport = AndroidHttp.newCompatibleTransport();
JsonFactory jsonFactory = new GsonFactory();
public static String urlaa;
private static YouTube youtube;
private static final long NUMBER_OF_VIDEOS_RETURNED = 2;
@Override
protected Void doInBackground(Void... params){
try {
youtube = new YouTube.Builder(transport, jsonFactory, new HttpRequestInitializer(){
@Override
public void initialize(HttpRequest request) {}
}).setApplicationName("YT").build();
YouTube.Search.List search = youtube.search().list("id,snippet");
search.setKey(API_KEY);
search.setQ(query);
search.setType("video");
search.setFields("items(id/kind,id/videoId,snippet/title,snippet/thumbnails/default/url)");
search.setMaxResults(NUMBER_OF_VIDEOS_RETURNED);
SearchListResponse searchResponse = search.execute();
List<SearchResult> searchResultList = searchResponse.getItems();
if (searchResultList != null) {
String Search_list_see = searchResultList.toString();
SearchResult singleVideo = searchResultList.get(1);
ResourceId rId = singleVideo.getId();
urlaa = rId.getVideoId();
}
} catch (GoogleJsonResponseException e) {
System.err.println("There was a service error: " + e.getDetails().getCode() + " : "
+ e.getDetails().getMessage());
} catch (IOException e) {
System.err.println("There was an IO error: " + e.getCause() + " : " + e.getMessage());
}
catch (Throwable t) {
t.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void aVoid){
url = urlaa;
super.onPostExecute(aVoid);
}
V/NativeCrypto: SSL handshake terminated: ssl=0xafe74dd8: I/O error during system call, Try again I/System.out: (HTTPLog)-Static: isSBSettingEnabled false I/System.out: KnoxVpnUidStorageknoxVpnSupported API value returned is false W/System.err: There was an IO error: null : No enabled protocols; SSLv3 is no longer supported and was filtered from the list V/NativeCrypto: Read error: ssl=0xafe73408: Failure in SSL library, usually a protocol error error:100000d7:SSL routines:OPENSSL_internal:SSL_HANDSHAKE_FAILURE (third_party/openssl/boringssl/src/ssl/ssl_lib.cc:1024 0xa16eafe4:0x00000000)
User contributions licensed under CC BY-SA 3.0