java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference

pushwoosh.com | 3 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Cordova Plugin error on Android 5 - Pushwoosh Community

    pushwoosh.com | 3 months ago
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference
  2. 0

    h5.Description: 1. Create a basic map app for android. 2. Build it for android 5.0 device/emulator. h5.Actual Result: 1. We do not see any maps just the grid. 2. We also get the errors below in the console: {code} [DEBUG] : REQUEST: Connection opened to:https://clients4.google.com/glm/mmap/api [DEBUG] : REQUEST: Open Connection [DEBUG] : REQUEST: DRD(462): 62|15|7|108 [DEBUG] : REQUEST: Close [DEBUG] : REQUEST: Error processing: com.google.maps.api.android.lib6.b.d@2454d051 not retrying [DEBUG] : REQUEST: Retrying: com.google.maps.api.android.lib6.b.j@1beb77e [DEBUG] : REQUEST: Retrying: com.google.maps.api.android.lib6.b.v@390b4df [DEBUG] : REQUEST: Retrying: com.google.maps.api.android.lib6.gmm6.m.af@32c684fc [ERROR] : REQUEST: ERROR [ERROR] : REQUEST: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference [ERROR] : REQUEST: at com.android.okhttp.internal.http.StatusLine.<init>(StatusLine.java:24) [ERROR] : REQUEST: at com.android.okhttp.Response$Builder.statusLine(Response.java:419) [ERROR] : REQUEST: at com.android.okhttp.internal.http.JavaApiConverter.createOkResponse(JavaApiConverter.java:116) [ERROR] : REQUEST: at com.android.okhttp.internal.http.ResponseCacheAdapter.get(ResponseCacheAdapter.java:53) [ERROR] : REQUEST: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:190) [ERROR] : REQUEST: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373) [ERROR] : REQUEST: at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106) [ERROR] : REQUEST: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:208) [ERROR] : REQUEST: at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218) [ERROR] : REQUEST: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25) [ERROR] : REQUEST: at com.google.maps.api.android.lib6.b.l.run(Unknown Source) [ERROR] : REQUEST: at java.lang.Thread.run(Thread.java:818) {code} h5.Expected Results: 1. Maps should be displayed properly & we should not get any errors in the console.

    Appcelerator JIRA | 3 years ago | Lokesh Choudhary
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference
  3. 0

    I was getting occasional crashes in my titanium module when downloading files using HttpUrlConnection on a Lollipop device. Tracing this to okhttp (the http client used in android 5), I posted a bug report (see: https://code.google.com/p/android/issues/detail?id=160522) There is a bug in okhttp where they don't handle null pointer correctly, which is returned from TiCacheResponse.getHeaders() or its null key's value, but the fact is that it shouldn't return null in the first place. This all comes from the way the cached header's multimap assumes that the status is in the null key at position 0 (see: http://developer.android.com/reference/java/net/URLConnection.html#getHeaderFields%28%29) For a full explanation of the cause see: https://code.google.com/p/android/issues/detail?id=160522#c5 Partial stack dump of the problem: {quote} Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference at com.android.okhttp.internal.http.StatusLine.<init>(StatusLine.java:24) at com.android.okhttp.Response$Builder.statusLine(Response.java:419) at com.android.okhttp.internal.http.JavaApiConverter.createOkResponse(JavaApiConverter.java:116) at com.android.okhttp.internal.http.ResponseCacheAdapter.get(ResponseCacheAdapter.java:53) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:269) at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373) at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323) at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:491) at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105) at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25) {quote}

    Appcelerator JIRA | 2 years ago | grebulon
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h5.Description: 1. Create a basic map app for android. 2. Build it for android 5.0 device/emulator. h5.Actual Result: 1. We do not see any maps just the grid. 2. We also get the errors below in the console: {code} [DEBUG] : REQUEST: Connection opened to:https://clients4.google.com/glm/mmap/api [DEBUG] : REQUEST: Open Connection [DEBUG] : REQUEST: DRD(462): 62|15|7|108 [DEBUG] : REQUEST: Close [DEBUG] : REQUEST: Error processing: com.google.maps.api.android.lib6.b.d@2454d051 not retrying [DEBUG] : REQUEST: Retrying: com.google.maps.api.android.lib6.b.j@1beb77e [DEBUG] : REQUEST: Retrying: com.google.maps.api.android.lib6.b.v@390b4df [DEBUG] : REQUEST: Retrying: com.google.maps.api.android.lib6.gmm6.m.af@32c684fc [ERROR] : REQUEST: ERROR [ERROR] : REQUEST: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference [ERROR] : REQUEST: at com.android.okhttp.internal.http.StatusLine.<init>(StatusLine.java:24) [ERROR] : REQUEST: at com.android.okhttp.Response$Builder.statusLine(Response.java:419) [ERROR] : REQUEST: at com.android.okhttp.internal.http.JavaApiConverter.createOkResponse(JavaApiConverter.java:116) [ERROR] : REQUEST: at com.android.okhttp.internal.http.ResponseCacheAdapter.get(ResponseCacheAdapter.java:53) [ERROR] : REQUEST: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:190) [ERROR] : REQUEST: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373) [ERROR] : REQUEST: at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106) [ERROR] : REQUEST: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:208) [ERROR] : REQUEST: at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218) [ERROR] : REQUEST: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25) [ERROR] : REQUEST: at com.google.maps.api.android.lib6.b.l.run(Unknown Source) [ERROR] : REQUEST: at java.lang.Thread.run(Thread.java:818) {code} h5.Expected Results: 1. Maps should be displayed properly & we should not get any errors in the console.

    Appcelerator JIRA | 3 years ago | Lokesh Choudhary
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference
  6. 0

    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.

    Appcelerator JIRA | 2 years ago | Matteo Landi
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference

      at com.android.okhttp.internal.http.StatusLine.<init>()
    2. Android
      HttpURLConnectionImpl.connect
      1. com.android.okhttp.internal.http.StatusLine.<init>(StatusLine.java:24)[ERROR]
      2. com.android.okhttp.Response$Builder.statusLine(Response.java:419)[ERROR]
      3. com.android.okhttp.internal.http.JavaApiConverter.createOkResponse(JavaApiConverter.java:116)[ERROR]
      4. com.android.okhttp.internal.http.ResponseCacheAdapter.get(ResponseCacheAdapter.java:53)[ERROR]
      5. com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:190)[ERROR]
      6. com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)[ERROR]
      7. com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
      7 frames