Countly / countly-server

Countly is a product analytics platform that helps teams track, analyze and act-on their user actions and behaviour on mobile, web and desktop applications.
https://countly.com
Other
5.58k stars 972 forks source link

can't download the export in non-english way #314

Closed liangjie18430 closed 7 years ago

liangjie18430 commented 7 years ago

select non-english env.select management-->system logs-->download in csv. Get 502 .

ar2rsawseen commented 7 years ago

I see, 502 is server error, is there any error under error logs? Manegement -> Errors. Under both api log, most probably. Also is it for 17.05.1? Because there were some fixes related to exporting in 17.05.1

liangjie18430 commented 7 years ago

error log like this:

2017-07-13T09:12:12.968Z: INFO [jobs:scanner] Checking plugins ["mobile","web","desktop","plugins","density","locale","browser","sources","views","enterpriseinfo","logger","systemlogs","errorlogs","populator","reports","crashes","push","star-rating","slipping-away-users","compare","server-stats","dbviewer","assistant"] Caught exception: {} TypeError: The header content contains invalid characters at storeHeader (_http_outgoing.js:319:11) at ServerResponse.OutgoingMessage._storeHeader (_http_outgoing.js:228:9) at ServerResponse.writeHead (_http_server.js:221:8) at Object.exports.output (/root/countly/api/parts/data/exports.js:105:20) at Object.options.output (/root/countly/api/parts/data/exports.js:244:68) at Object.exports.fromData (/root/countly/api/parts/data/exports.js:250:21) at /root/countly/api/api.js:1143:65 at /root/countly/api/api.js:645:13 at /root/countly/plugins/pluginManager.js:770:25 at handleCallback (/root/countly/node_modules/mongodb/lib/utils.js:120:56) at /root/countly/node_modules/mongodb/lib/collection.js:1417:5 at handleCallback (/root/countly/node_modules/mongodb/lib/utils.js:120:56) at /root/countly/node_modules/mongodb/lib/cursor.js:682:5 at handleCallback (/root/countly/node_modules/mongodb-core/lib/cursor.js:171:5) at nextFunction (/root/countly/node_modules/mongodb-core/lib/cursor.js:682:5) at /root/countly/node_modules/mongodb-core/lib/cursor.js:593:7 2017-07-13T09:18:56.609Z: ERROR [api] Logging caught exception 2017-07-13T09:18:56.881Z: INFO [jobs:handle] Starting job handle in 10455

i can't upgrade to 17.05.1, my version is 17.05

ar2rsawseen commented 7 years ago

Yes, this issue was fixed in 17.05.1

Don't know why you can't upgrade to new release, but best I can do is to point you to commits made to fix this. Please try applying these commits:

https://github.com/Countly/countly-server/commit/91e9f6f2f3a19097e39bad8e87c5e302dc5f0725 https://github.com/Countly/countly-server/commit/cce19bee8091aad38836252a4c0e16562db15382

And feel free to reopen the issue if you still have problems

liangjie18430 commented 7 years ago

thank you very much!the upgrade method i just type"countly upgrade",i tried the commit to the file,the 502 problem has fixed yet.but the new problem was characters(non-english) in .csv file were not displayed properly.

ar2rsawseen commented 7 years ago

Are charactes unicode? Countly only support UTF-8

liangjie18430 commented 7 years ago

I tested with Chinese characters, my operations like this: management-->events log-->export-->export as csv. The chinese characters displayed not properly. but management-->events log-->export-->export as xls, the characters was correct.

ar2rsawseen commented 7 years ago

Ok, I see, will recheck

ar2rsawseen commented 7 years ago

So I switch language to Chinese and try to export something in CSV and it seem to work correctly: image

Any tips on how to reproduce it?

liangjie18430 commented 7 years ago

thank you, i will check my environment or try it in other machines.

liangjie18430 commented 7 years ago

while i opened with excel ,then the problem emerged ,with sublime,it's okay.thanks.my problem has solved.