{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/5301","repository_url":"https://api.github.com/repos/realm/realm-java","labels_url":"https://api.github.com/repos/realm/realm-java/issues/5301/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/5301/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/5301/events","html_url":"https://github.com/realm/realm-java/issues/5301","id":259401846,"number":5301,"title":"GeoTrust Global CA: SSL handshake failed: certificate verify failed","user":{"login":"lmdic","id":303539,"avatar_url":"https://avatars3.githubusercontent.com/u/303539?v=4","gravatar_id":"","url":"https://api.github.com/users/lmdic","html_url":"https://github.com/lmdic","followers_url":"https://api.github.com/users/lmdic/followers","following_url":"https://api.github.com/users/lmdic/following{/other_user}","gists_url":"https://api.github.com/users/lmdic/gists{/gist_id}","starred_url":"https://api.github.com/users/lmdic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmdic/subscriptions","organizations_url":"https://api.github.com/users/lmdic/orgs","repos_url":"https://api.github.com/users/lmdic/repos","events_url":"https://api.github.com/users/lmdic/events{/privacy}","received_events_url":"https://api.github.com/users/lmdic/received_events","type":"User","site_admin":false},"labels":[{"id":3545600,"url":"https://api.github.com/repos/realm/realm-java/labels/T:Help","name":"T:Help","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-09-21T07:31:14Z","updated_at":"2017-09-21T09:56:22Z","closed_at":null,"author_association":"NONE","body":"Realm 3.7.2.\r\nCertificate:  **GeoTrust Global CA** (expire 10 May 2022 )\r\n\r\nAndroid client.\r\nSteps:\r\n1. Login to Realm Object Server (ROS)\r\n2. Download data from ROS\r\n\r\nFirst steps always success. But on second step:\r\n\r\nIf I try to get data from ROS that deploy on \"http\" all is work fine. Data success downloaded.\r\nBut f I try to get data from ROS that deploy on \"https\" I get the next error:\r\n\r\n\r\n```\r\n I/REALM_SYNC(10435): Opening Realm file: /data/data/com.myproject/files/realm-object-server/1234567890/1234567890/myproject\r\n D/REALM_SYNC(10435): Connection[1]: WebSocket::Websocket()\r\n D/REALM_SYNC(10435): Connection[1]: Reconnecting in 0 milliseconds\r\n D/OpenGLRenderer(10435): Enabling debug mode 0\r\n I/REALM_SYNC(10435): Connection[1]: Session[1]: Starting session for '/data/data/com.myproject/files/realm-object-server/1234567890/1234567890/myproject'\r\n D/REALM_SYNC(10435): Connection[1]: Session[1]: last_version_available\t = 0\r\n D/REALM_SYNC(10435): Connection[1]: Session[1]: progress_server_version = 0\r\n D/REALM_SYNC(10435): Connection[1]: Session[1]: progress_client_version = 0\r\n D/REALM_SYNC(10435): Using already open Realm file: /data/data/com.myproject/files/realm-object-server/1234567890/1234567890/myproject\r\n D/REALM_SYNC(10435): Connection[1]: Session[1]: Progress handler called, downloaded = 0, downloadable = 0, uploaded = 0, uploadable = 0, progress version = 0, snapshot version = 1\r\n I/REALM_SYNC(10435): Connection[1]: Resolving 'object-server.mycompany.com:443'\r\n I/REALM_SYNC(10435): Connection[1]: Connecting to endpoint 'xx.xx.xxx.68:443' (1/1)\r\n I/REALM_SYNC(10435): Connection[1]: Connected to endpoint 'xx.xx.xxx.68:443' (from '112.1x.xxx.15:42191')\r\n E/REALM_SYNC(10435): Connection[1]: SSL handshake failed: certificate verify failed\r\n I/REALM_SYNC(10435): Connection[1]: Connection closed due to error\r\n D/REALM_JNI(10435): error_handler lambda invoked\r\n I/ActivityManager(  372): Displayed com.myproject/com.myproject.android.activity.RegistrationActivity: +1s130ms (total +4s494ms)\r\n E/REALM_JAVA(10435): java.lang.IllegalArgumentException: Unknown error code: 117\r\n E/REALM_JAVA(10435):\tat io.realm.ErrorCode.fromInt(ErrorCode.java:190)\r\n E/REALM_JAVA(10435):\tat io.realm.SyncSession.notifySessionError(SyncSession.java:162)\r\n E/REALM_JAVA(10435):\tat io.realm.SyncManager.notifyErrorHandler(SyncManager.java:299)\r\n E/REALM_JAVA(10435):\tat dalvik.system.NativeStart.run(Native Method)\r\n D/REALM_SYNC(10435): Connection[1]: Reconnecting in 582 milliseconds\r\n I/REALM_SYNC(10435): Closing Realm file: /data/data/com.myproject/files/realm-object-server/1234567890/1234567890/myproject\r\n V/REALM_JNI(10435):  --> Java_io_realm_internal_SharedRealm_nativeCloseSharedRealm 1469283808\r\n E/REALM_JAVA(10435): UNKNOWN(-1)\r\n E/REALM_JAVA(10435): Internal error (125): Operation Canceled\r\n E/REALM_JAVA(10435):\tat io.realm.SyncSession$WaitForSessionWrapper.throwExceptionIfNeeded(SyncSession.java:695)\r\n E/REALM_JAVA(10435):\tat io.realm.SyncSession.waitForChanges(SyncSession.java:399)\r\n E/REALM_JAVA(10435):\tat io.realm.SyncSession.downloadAllServerChanges(SyncSession.java:336)\r\n E/REALM_JAVA(10435):\tat io.realm.internal.SyncObjectServerFacade.downloadRemoteChanges(SyncObjectServerFacade.java:164)\r\n E/REALM_JAVA(10435):\tat io.realm.RealmCache.doCreateRealmOrGetFromCache(RealmCache.java:302)\r\n E/REALM_JAVA(10435):\tat io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:281)\r\n E/REALM_JAVA(10435):\tat io.realm.RealmCache$CreateRealmRunnable.run(RealmCache.java:115)\r\n E/REALM_JAVA(10435):\tat io.realm.internal.async.BgPriorityRunnable.run(BgPriorityRunnable.java:34)\r\n E/REALM_JAVA(10435):\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)\r\n E/REALM_JAVA(10435):\tat java.util.concurrent.FutureTask.run(FutureTask.java:234)\r\n E/REALM_JAVA(10435):\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)\r\n E/REALM_JAVA(10435):\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)\r\n E/REALM_JAVA(10435):\tat java.lang.Thread.run(Thread.java:841)\r\n E/REALM_JAVA(10435): \r\n E/REALM_JAVA(10435): `CreateRealmRunnable` failed.\r\n D/com.myproject.MainApp(10435): setLoadingOrganizaions: set flag = false\r\n E/com.myproject.MainApp(10435): loadOrganization: new Callback: onError: Finish! NOT success loaded (sync) organizations\r\n E/com.myproject.MainApp(10435): UNKNOWN(-1)\r\n E/com.myproject.MainApp(10435): Internal error (125): Operation Canceled\r\n E/com.myproject.MainApp(10435):\tat io.realm.SyncSession$WaitForSessionWrapper.throwExceptionIfNeeded(SyncSession.java:695)\r\n E/com.myproject.MainApp(10435):\tat io.realm.SyncSession.waitForChanges(SyncSession.java:399)\r\n E/com.myproject.MainApp(10435):\tat io.realm.SyncSession.downloadAllServerChanges(SyncSession.java:336)\r\n E/com.myproject.MainApp(10435):\tat io.realm.internal.SyncObjectServerFacade.downloadRemoteChanges(SyncObjectServerFacade.java:164)\r\n E/com.myproject.MainApp(10435):\tat io.realm.RealmCache.doCreateRealmOrGetFromCache(RealmCache.java:302)\r\n E/com.myproject.MainApp(10435):\tat io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:281)\r\n E/com.myproject.MainApp(10435):\tat io.realm.RealmCache$CreateRealmRunnable.run(RealmCache.java:115)\r\n E/com.myproject.MainApp(10435):\tat io.realm.internal.async.BgPriorityRunnable.run(BgPriorityRunnable.java:34)\r\n E/com.myproject.MainApp(10435):\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)\r\n E/com.myproject.MainApp(10435):\tat java.util.concurrent.FutureTask.run(FutureTask.java:234)\r\n E/com.myproject.MainApp(10435):\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)\r\n E/com.myproject.MainApp(10435):\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)\r\n E/com.myproject.MainApp(10435):\tat java.lang.Thread.run(Thread.java:841)\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/331110182","html_url":"https://github.com/realm/realm-java/issues/5301#issuecomment-331110182","issue_url":"https://api.github.com/repos/realm/realm-java/issues/5301","id":331110182,"user":{"login":"cmelchior","id":406066,"avatar_url":"https://avatars3.githubusercontent.com/u/406066?v=4","gravatar_id":"","url":"https://api.github.com/users/cmelchior","html_url":"https://github.com/cmelchior","followers_url":"https://api.github.com/users/cmelchior/followers","following_url":"https://api.github.com/users/cmelchior/following{/other_user}","gists_url":"https://api.github.com/users/cmelchior/gists{/gist_id}","starred_url":"https://api.github.com/users/cmelchior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmelchior/subscriptions","organizations_url":"https://api.github.com/users/cmelchior/orgs","repos_url":"https://api.github.com/users/cmelchior/repos","events_url":"https://api.github.com/users/cmelchior/events{/privacy}","received_events_url":"https://api.github.com/users/cmelchior/received_events","type":"User","site_admin":false},"created_at":"2017-09-21T09:56:22Z","updated_at":"2017-09-21T09:56:22Z","author_association":"CONTRIBUTOR","body":"It needs to be manually added, see https://realm.io/docs/java/latest/#ssl-tls\r\n\r\nThe underlying reason is that C++ code do not have access to the Android keystore. It works for login because that uses OkHttp, but the sync protocol itself runs entirely in C++. We have a potential solution for that, but until we can release that you need to manually add the CA.\r\n\r\nWe also have a bug in our `ErrorCode` though. As @Zhuinden points out we are not handling the 117 code correctly."}}
{"actor":{"display_login":"cmelchior"}}