parse.com - Android Parse implementation cannot verify custom server hostname -


when initializing parse on android, able connect parse server when:
1) don't specify server url, or
2) set server url parse server.

because intend migrate our data parse different host, connect different server url. however, when try specify different server url (https://api.ourhostname.com/1/) redirects (serves proxy) parse server, app fails connect server altogether. when implemented ios project, server url works fine. however, when implemented on android equivalent:

parse.initialize(new parse.configuration.builder(this)         .applicationid(app_id)         .clientkey(client_key)         .server("https://api.ourhostname.com/1/")         .build()     ); 

i receive i/o failure:

05-24 21:46:55.319 7140-7140/com.ourapp w/system.err: com.parse.parserequest$parserequestexception: i/o failure 05-24 21:46:55.324 7140-7140/com.ourapp w/system.err:     @ com.parse.parserequest.newtemporaryexception(parserequest.java:290) 05-24 21:46:55.324 7140-7140/com.ourapp w/system.err:     @ com.parse.parserequest$2.then(parserequest.java:145) 05-24 21:46:55.324 7140-7140/com.ourapp w/system.err:     @ com.parse.parserequest$2.then(parserequest.java:139) 05-24 21:46:55.324 7140-7140/com.ourapp w/system.err:     @ bolts.task$15.run(task.java:917) 05-24 21:46:55.324 7140-7140/com.ourapp w/system.err:     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1112) 05-24 21:46:55.324 7140-7140/com.ourapp w/system.err:     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:587) 05-24 21:46:55.324 7140-7140/com.ourapp w/system.err:     @ java.lang.thread.run(thread.java:818) 05-24 21:46:55.324 7140-7140/com.ourapp w/system.err: caused by: javax.net.ssl.sslpeerunverifiedexception: cannot verify hostname: api.ourhostname.com 05-24 21:46:55.329 7140-7140/com.ourapp w/system.err:     @ android.net.sslcertificatesocketfactory.verifyhostname(sslcertificatesocketfactory.java:242) 05-24 21:46:55.329 7140-7140/com.ourapp w/system.err:     @ android.net.sslcertificatesocketfactory.createsocket(sslcertificatesocketfactory.java:486) 05-24 21:46:55.329 7140-7140/com.ourapp w/system.err:     @ com.android.okhttp.connection.upgradetotls(connection.java:1226) 05-24 21:46:55.329 7140-7140/com.ourapp w/system.err:     @ com.android.okhttp.connection.connect(connection.java:1183) ... 

from web browser, able visit our custom server url, trusted , valid browser, meaning not self-signed.

has else encountered problem android project, , suggestions on how parse sdk connect custom server url?

update: able fix problem via:
1) adding this solution on android side.
2) adjusting how our custom server serves public keys (which crucial in enabling marshmallow connect server).

we able fix problem via:
1) adding this solution on android side.
2) adjusting how our custom server serves public keys (which crucial in enabling marshmallow connect server).


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -