[TIMOB-17161] Android: HttpResponseException "No Response" from Analytics when app name contains á, é, í, ó, or ú
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-07-09T23:25:54.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.3.0, Release 3.4.0 |
Components | Android |
Labels | module_analytics, pm2, qe-testadded |
Reporter | Shuo Liang |
Assignee | Allen Yeung |
Created | 2014-06-03T07:35:08.000+0000 |
Updated | 2014-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
File | Date | Size |
---|---|---|
tiapp.xml | 2014-06-03T07:35:08.000+0000 | 6125 |
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?
This issue also only appears to affect their android device.
[~stoda] i'll take a look now...
Okay thanks [~vasil]!
[~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?
[~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.
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
[~vasil] is the logs the old mobile-track logs?
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
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
Attached their tiapp.xml
[~stoda] I think this is not a STREAM project issue, as it's happening client side. Sounds like a malformed event or URL.
[~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.
[~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.
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.
Hey [~ingo] can you add this to triage?
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"
UPDATE:
[~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.
I did a bunch of tests with different combinations of id/guid/name and found that the error occurs when the
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.
This is likely to be a client issue, those characters are fine via curl.
Moving to TIMOB until we can prove it's not client-side.
Any update about this case? Suggested customer to take the character out of the
To test: 1. Create a titanium project 2. Inside tiapp.xml change the app name to: "
Actual Result: You will see an error in the logs.
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
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
[~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.
[~ngupta] The ticket was opened on Thursday: TIMOB-17270. Not Studio-related, it's actually the CLI.
Thanks.
We will check the fix using a workaround for TIMOB-17270, and comment.
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.
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