java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • TiDownloadManager doesn't seem to properly handle redirects on Android Lollipop. This is the exception I get: {code} ERROR] TiDownloadManager: (pool-4-thread-1) [916,916] Exception downloading https://graph.facebook.com/100008778152788/picture?width=200&height=200 [ERROR] TiDownloadManager: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.StatusLine.<init>(StatusLine.java:24) [ERROR] TiDownloadManager: at com.android.okhttp.Response$Builder.statusLine(Response.java:419) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.JavaApiConverter.createOkResponse(JavaApiConverter.java:116) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.ResponseCacheAdapter.get(ResponseCacheAdapter.java:53) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:190) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:190) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25) [ERROR] TiDownloadManager: at java.net.URL.openStream(URL.java:470) [ERROR] TiDownloadManager: at org.appcelerator.titanium.util.TiDownloadManager$DownloadJob.run(TiDownloadManager.java:135) [ERROR] TiDownloadManager: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) [ERROR] TiDownloadManager: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) [ERROR] TiDownloadManager: at java.lang.Thread.run(Thread.java:818) {code} Attached you can find a single window application in which two image views are used to display remote images. The second of the two uses some facebook redirect to get the actual image url, and TiDownloadManager crashes while fetching the data.
    via by Matteo Landi,
  • TiDownloadManager doesn't seem to properly handle redirects on Android Lollipop. This is the exception I get: {code} ERROR] TiDownloadManager: (pool-4-thread-1) [916,916] Exception downloading https://graph.facebook.com/100008778152788/picture?width=200&height=200 [ERROR] TiDownloadManager: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.StatusLine.<init>(StatusLine.java:24) [ERROR] TiDownloadManager: at com.android.okhttp.Response$Builder.statusLine(Response.java:419) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.JavaApiConverter.createOkResponse(JavaApiConverter.java:116) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.ResponseCacheAdapter.get(ResponseCacheAdapter.java:53) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:190) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:190) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25) [ERROR] TiDownloadManager: at java.net.URL.openStream(URL.java:470) [ERROR] TiDownloadManager: at org.appcelerator.titanium.util.TiDownloadManager$DownloadJob.run(TiDownloadManager.java:135) [ERROR] TiDownloadManager: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) [ERROR] TiDownloadManager: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) [ERROR] TiDownloadManager: at java.lang.Thread.run(Thread.java:818) {code} Attached you can find a single window application in which two image views are used to display remote images. The second of the two uses some facebook redirect to get the actual image url, and TiDownloadManager crashes while fetching the data.
    via by Matteo Landi,
    • java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference at com.android.okhttp.internal.http.SBServiceAPI.getService(SBServiceAPI.java:641) at com.android.okhttp.internal.http.HttpEngine.<init>(HttpEngine.java:211) at com.android.okhttp.internal.http.HttpURLConnectionImpl.newHttpEngine(HttpURLConnectionImpl.java:332) at com.android.okhttp.internal.http.HttpURLConnectionImpl.initHttpEngine(HttpURLConnectionImpl.java:283) at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:342) at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:203) at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210) at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25) at com.example.schadtj.portalapp.Dialogs.UpdateUtilitiesDialogFragment$UpdateUtilities.doInBackground(UpdateUtilitiesDialogFragment.java:119) at com.example.schadtj.portalapp.Dialogs.UpdateUtilitiesDialogFragment$UpdateUtilities.doInBackground(UpdateUtilitiesDialogFragment.java:105) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,