Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17161] Android: HttpResponseException "No Response" from Analytics when app name contains á, é, í, ó, or ú

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-07-09T23:25:54.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.3.0, Release 3.4.0
ComponentsAndroid
Labelsmodule_analytics, pm2, qe-testadded
ReporterShuo Liang
AssigneeAllen Yeung
Created2014-06-03T07:35:08.000+0000
Updated2014-08-20T18:22:11.000+0000

Description

Customer keeps get the following error. Currently, analytics module is failing to post events to the appcelerator backend when running on android devices. Here is relevant part of the log:
[INFO] : TiAnalyticsSvc: (Thread-17) [79011,146418] Analytics Service Started 
[ERROR] : TiAnalyticsSvc: (Thread-17) [4548,150966] Error posting 
events: No Response 
[ERROR] : TiAnalyticsSvc: 
org.apache.http.client.HttpResponseException: No Response 
[ERROR] : TiAnalyticsSvc: at 
org.apache.http.impl.client.BasicResponseHandler.handleResponse(BasicResponseHandler.java:71) 
[ERROR] : TiAnalyticsSvc: at 
org.apache.http.impl.client.BasicResponseHandler.handleResponse(BasicResponseHandler.java:59) 
[ERROR] : TiAnalyticsSvc: at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:657) 
[ERROR] : TiAnalyticsSvc: at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:627) 
[ERROR] : TiAnalyticsSvc: at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:616) 
[ERROR] : TiAnalyticsSvc: at 
org.appcelerator.titanium.analytics.TiAnalyticsService$1.run(TiAnalyticsService.java:143) 
[ERROR] : TiAnalyticsSvc: at java.lang.Thread.run(Thread.java:1019) 
[INFO] : TiAnalyticsSvc: (Thread-17) [0,150966] Stopping Analytics Service
This error occurs always on said applications and no event is registered in Analytics when the app runs on Android, but it works ok on iOS. If customer change the ID of it(anything but real one), the analytics module works good. However, They can't change the Id because is the id of the app in the markets. TiApp.xml in attachment.

Attachments

FileDateSize
tiapp.xml2014-06-03T07:35:08.000+00006125

Comments

  1. Seth Toda 2014-06-04

    This issue appears to independent of their applications code. Using analytics with their production GUID (2ad0bf34-6dd8-45cd-b15f-97aa15666404) is failing. If they manually change the GUID, the analytics appears to work. Can someone look at their backend data to see if there is anything anomalous there?
  2. Seth Toda 2014-06-04

    This issue also only appears to affect their android device.
  3. Vasil Daskalopoulos 2014-06-04

    [~stoda] i'll take a look now...
  4. Seth Toda 2014-06-04

    Okay thanks [~vasil]!
  5. Seth Toda 2014-06-10

    [~vasil], I'm able to replicate the customer's error output in studio by using their GUID with my sample application. Using a different GUID fixes the issue, but isn't a valid solution for the customer. The output in the description seems to indicate that the Android device is getting "No Response." Are there logs associated with the analytics that might help?
  6. Vasil Daskalopoulos 2014-06-12

    [~stoda] has anyone tried the suggestion "4b" from Ingo's comment above? that would narrow down the issue and validate the claim that the actual GUID value seems to be causing the error. in any case, we can tail the apache error.log on the mobile-track servers while they try with the 2ad0bf34-6dd8-45cd-b15f-97aa15666404 GUID. [~tdipentino] can you think of a way to grep out the logs for that one app? there's going to be hundreds of events per second hitting that endpoint.
  7. Vasil Daskalopoulos 2014-06-12

    another alternative is to have them configure the app to hit the staging server so we can reproduce it there and get logs in a much less noisy environment
  8. Tony DiPentino 2014-06-12

    [~vasil] is the logs the old mobile-track logs?
  9. Vasil Daskalopoulos 2014-06-12

    i guess we'd have to look in access.log, error.log and yeah the /event_store and/or /local_storage files for mobile-track to see if anything either shows up ok or logs an error in the first two
  10. Seth Toda 2014-06-12

    I can recreate this output with the following steps. 1. Add self to org 2. Create new app within org via Appc Studio 3. Swap out ACS keys, GUID, name, id with theirs. 4. Run on android
  11. Seth Toda 2014-06-12

    Attached their tiapp.xml
  12. Mark Griffin 2014-06-13

    [~stoda] I think this is not a STREAM project issue, as it's happening client side. Sounds like a malformed event or URL.
  13. Seth Toda 2014-06-13

    [~mgriffin] can you recommend which project I should consult with? This issue seems to occur regardless of the client or project code. I can reproduce this issue with a blank project on my machine using their GUID.
  14. Isaac Whitfield 2014-06-13

    [~stoda] I would say probably TIMOB. It likely isn't an issue in PEM due to the fact that one platform works and another doesn't - PEM doesn't treat their events any differently.
  15. Ingo Muschenetz 2014-06-13

    Seth, can you make the same analytics call from the command line (using cURL)? It may be a client side issue, but it makes no sense that it works with one ID and not the other.
  16. Seth Toda 2014-06-13

    Hey [~ingo] can you add this to triage?
  17. Seth Toda 2014-06-13

    Attached a test case. tiapp.xml is their guid/id/name tiapp 2.xml is my guid/id/name Run tiapp 2.xml to establish control case. Run tiapp.xml to see error occur after "Analytics Service Started"
  18. Seth Toda 2014-06-13

    UPDATE: cl.bci.bancamovil.personas fails com.seth.pushy succeeds Too many periods. Not sure if we are failing client side or server side . [Link](http://docs.appcelerator.com/titanium/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference-section-29004921_tiapp.xmlandtimodule.xmlReference-id) to our docs.
  19. Isaac Whitfield 2014-06-13

    [~stoda] If that's what determines if it works or not, it is likely to be a client bug. App ID is not used anywhere inside PEM and is just stored as-is. Just to be sure, I ran an event with 3 "."'s in via curl and it worked just fine.
  20. Seth Toda 2014-06-13

    I did a bunch of tests with different combinations of id/guid/name and found that the error occurs when the has this character in it: ó
  21. Shuo Liang 2014-06-16

    Tested with different languages (Chinese, Japanese, English, Latin, Arabic), all work well. However, no matter which language, as long as include letters "á、é、í、ó、ú" in app name, the problem occurs.
  22. Isaac Whitfield 2014-06-16

    This is likely to be a client issue, those characters are fine via curl.
        IWhitfieldMBP:nodeable iwhitfield$ curl -s -i -X POST -d '[
        >     {
        >         "type": "ti.enroll",
        >         "event": "ti.enroll",
        >         "aguid": "1b04ca74-4fcd-4cd1-bf6b-2b81a44a7355",
        >         "seq": 0,
        >         "deploytype": "development",
        >         "sid": "9499b066-4eab-4b66-b6d2-8d2b44104be5",
        >         "ts": "2014-06-16T04:43:00.725+0000",
        >         "id": "46b2d36e-92c6-46f9-af6d-925c742a374b:62dd3fd8-b3ce-4110-bfac-9bd29e7ddfd3",
        >         "mid": "62dd3fd8-b3ce-4110-bfac-9bd29e7ddfd3",
        >         "ver": "2",
        >         "rdu": null,
        >         "latitude": "37.389288",
        >         "longitude": "-122.050236",
        >         "country_code": "US",
        >         "country_name": "United States",
        >         "data": {
        >             "app_name": "Testápp",
        >             "app_id": "com.appcelerator.testapp",
        >             "oscpu": 1,
        >             "osarch": "arm",
        >             "platform": "android",
        >             "ostype": "32bit",
        >             "model": "Samsung Galaxy S3",
        >             "mac_addr": "a9d58ecd546ecebf80f4a50bdf18797be6733a04"
        >         }
        >     }
        > ]' "http://api.appcelerator.net:80/p/v3/mobile-track/1b04ca74-4fcd-4cd1-bf6b-2b81a44a7355"
        HTTP/1.1 204 No Content
        Date: Mon, 16 Jun 2014 04:41:20 GMT
        Server: Apache/2.2.22 (Ubuntu)
        X-Powered-By: PHP/5.3.10-1ubuntu3.11
        Access-Control-Allow-Origin: *
        Vary: Accept-Encoding
        Access-Control-Allow-Methods: POST, GET, OPTIONS
        Content-Length: 0
        Connection: close
        Content-Type: text/html
        
  23. Ingo Muschenetz 2014-06-16

    Moving to TIMOB until we can prove it's not client-side.
  24. Shuo Liang 2014-06-25

    Any update about this case? Suggested customer to take the character out of the & tags, but only work when delete and reinstall the app, but not work when update the app. So customer still want to know the time line of final fix.
  25. Allen Yeung 2014-07-02

    To test: 1. Create a titanium project 2. Inside tiapp.xml change the app name to: "Bci Móviél" 3. Build and run the app and look at logcat Expected result: You should see following inside logcat
        I/APSAnalyticsService( 3584): Analytics Service Started
        I/APSAnalyticsService( 3584): Stopping Analytics Service
        
    Actual Result: You will see an error in the logs.
  26. Allen Yeung 2014-07-02

    Master: https://github.com/appcelerator/titanium_mobile/pull/5882 3_3_X: https://github.com/appcelerator/titanium_mobile/pull/5883 Change in native sdk: timob-3_3_X: https://github.com/appcelerator/aps_sdk/pull/192 master: https://github.com/appcelerator/aps_sdk/pull/198
  27. Samuel Dowse 2014-07-07

    Tested on: Mac OSX 10.9.4 Appcelerator Studio, build: 3.3.0.201407031747 Titanium SDK, build: 3.3.0.v20140707105712 Titanium CLI, build: 3.3.0-rc4 Alloy: 1.4.0-rc4 Creating an app through Studio using the project creation wizard using a special character (á, é, í, ó, ú) in the app name will fail on build. Creating a project with a standard character name and editing the tiapp.xml tag with special characters will allow the project to build.
  28. Neeraj Gupta 2014-07-07

    [~sdowse] Please make sure that we have a Studio ticket (there may be few already) to capture the project creation wizard issue with special characters.
  29. Eric Merriman 2014-07-07

    [~ngupta] The ticket was opened on Thursday: TIMOB-17270. Not Studio-related, it's actually the CLI.
  30. Neeraj Gupta 2014-07-08

    Thanks.
  31. Eric Merriman 2014-07-09

    We will check the fix using a workaround for TIMOB-17270, and comment.
  32. Ingo Muschenetz 2014-07-10

    A reminder that (for now), you CAN NOT have UTF-8 characters in your file path (either in the folder names or in the file names). This is a restriction based on some of the Android tooling we rely on. If you need to have UTF-8 characters in your application name, create the project without it, and then change the name after the fact. We do plan on fixing this in 3.3.1, but the fix will be to strip out/replace the UTF-8 characters with Android-friendly ones.
  33. Lokesh Choudhary 2014-07-11

    Followed the workaround mentioned by [~ingo]. Created an app and after creation changed the name in the tiapp.xml to have accented characters. The analytics events are sent successfully. Closing. Environment: Appc Studio : 3.3.0.201407101409 Ti SDK : 3.3.0.v20140711123603 Mac OSX : 10.8.5 Alloy : 1.4.0-rc5 CLI - 3.3.0-rc4 Code Processor: 1.1.1 Nexus 5 - android 4.4

JSON Source