andresth / Kandroid

Android App for http://kanboard.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to login over HTTP

supportreq opened this issue · comments

Unable to login to the kandroid app using the android app

Receiving the following error:
02-28 15:12:50.496: W/System.err(27686): java.lang.ClassCastException: com.android.okhttp.internal.huc.HttpURLConnectionImpl cannot be cast to javax.net.ssl.HttpsURLConnection
02-28 15:12:50.496: W/System.err(27686): at in.andres.kandroid.ui.LoginActivity$UserLoginTask.doInBackground(LoginActivity.java:263)
02-28 15:12:50.496: W/System.err(27686): at in.andres.kandroid.ui.LoginActivity$UserLoginTask.doInBackground(LoginActivity.java:230)
02-28 15:12:50.496: W/System.err(27686): at android.os.AsyncTask$2.call(AsyncTask.java:305)
02-28 15:12:50.496: W/System.err(27686): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
02-28 15:12:50.497: W/System.err(27686): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
02-28 15:12:50.497: W/System.err(27686): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
02-28 15:12:50.498: W/System.err(27686): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
02-28 15:12:50.498: W/System.err(27686): at java.lang.Thread.run(Thread.java:761)

Configuration

  • Kandroid version: 0.4.3
  • Android/Mod version: 7.1.1
  • Device type, name and manufacturer: OnePlus One
  • Kanboard version: 1.0.40

Are you trying to connect over HTTP?
Currently only HTTPS connections are supported.

tried both.. didnt work.. i am connecting via IP Address and certificate is a self generated one..

As far as i know Android does not accept self signed certificates unless you manually add them to the system certificate storage.
Did you do that? If not, could you please try?
The app CAdroid can help you with that.

sadly the certificate has some other hostname which my synology device gives.. can we workaround in the code to accept http request?

Yes, I think i only have to change the typecast.
I will look into it.

I just uploaded a version that should fix the problem

started working thanks!!

commented

will https still work also or should we change our URL to http for the next update?

HTTPS is still functional, no need to switch to HTTP