Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17877] Android 5.0: No maps visible on android 5.0 just a blank grid

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-10-24T22:34:17.000+0000
Affected Version/sRelease 3.4.0, Release 3.4.1
Fix Version/sRelease 3.4.1, Release 3.4.2, Release 3.5.0, Release 4.0.0
ComponentsAndroid
Labelsmodule_androidmapv2, qe-3.4.1, qe-testadded
ReporterLokesh Choudhary
AssigneeHieu Pham
Created2014-10-20T20:54:23.000+0000
Updated2015-03-22T11:19:42.000+0000

Description

Description:

1. Create a basic map app for android. 2. Build it for android 5.0 device/emulator.

Actual Result:

1. We do not see any maps just the grid. 2. We also get the errors below in the console:
[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)

Expected Results:

1. Maps should be displayed properly & we should not get any errors in the console.

Attachments

FileDateSize
Nexus_5_Map_Tiles_Not_Loading_With_PR_6256.txt2014-10-23T16:28:46.000+000071949

Comments

  1. Hieu Pham 2014-10-23

    ti.map module PR: https://github.com/appcelerator-modules/ti.map/pull/67 master PR: https://github.com/appcelerator/titanium_mobile/pull/6256 3_4_X PR: https://github.com/appcelerator/titanium_mobile/pull/6274 3_4_1 PR: https://github.com/appcelerator/titanium_mobile/pull/6273
  2. Travis Crist 2014-10-23

  3. Travis Crist 2014-10-24

    The PR https://github.com/appcelerator/titanium_mobile/pull/6256 resolves this issue. Building the new SDK with the new module allows the map to load on my Nexus 5 running Android 5.0. I agree with jonalter that the module work need to be versioned as a new module and checked into the modules directory. Due to the dependency on this new TiSDK I would also recommend we up the minimum required TiSDK in the modules manifest file.
  4. Lokesh Choudhary 2014-10-27

    Verified the fix. Maps are visible as expected on device running android 5.0 preview. Closing. Environment: Appc Studio : 3.4.1.201410191611 Ti SDK : 3.4.1.v20141024151719, 3.4.2.v20141027085717, 3.5.0.v20141027104915 Mac OSX : 10.9.4 Alloy : 1.5.1 CLI - 3.4.0 Code Processor: 1.1.1 Nexus 5 - android 5.0 preview Map Module : 2.2.1
  5. Adam 2014-11-20

    Hey guys, I'm working on finishing up a pull request that will add drawing support (circles, polygons, and polylines) to the map. https://github.com/Sitata/ti.map/tree/drawing Through my testing, I'm still hitting the same errors that Travis has posted in his log file. That's how I stumbled into this issue. I have recently updated to 3.4.1.GA, and I'm still receiving this issue on my nexus5 with android 5.0. To be clear, map tiles ARE Loading, but I'm still receiving the nasty: "java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)" This is making it next to impossible to test the drawing stuff we implemented because map events (such as adding a route or a polygon) become unresponsive. Any ideas? Thanks!
  6. Yuri Goldfeld 2014-12-01

    I can confirm that I was able to manually apply the patch from PR 6256 to Ti SDK 3.2.0. I then cleaned the build for the application and built it with the custom Ti SDK; cleared any installed app's data/cache; and uninstalled any installed app; and installed the built app. The problem disappeared (map showed up). Just to make sure, I went back and forth between Ti SDK with and without the patch, and the latter failed, while the former succeeded, in displaying the map each time. Note that it was not necessary to rebuild any ti.map module. (We are using a separately downloaded ti.map 2.1.2 module.) Of course, if it is possible I would always recommend using the newest Ti SDK (and the modules that come with it) available. However, this is not always practical, as in reality Ti SDK upgrades introduce lots of regressions. So I figured the above info would be helpful.
  7. grebulon 2015-03-22

JSON Source