We have comet server which we receive updates. iOS version works but Android version responseText is empty which must not be the case. In iOS version ondatastream method receives ping items but Android does not receive.
How to reproduce issue:
There are two version app.js (long version)
app_simplified.js (short version/ no need to send news to test it)
use app.js code as attached.
Use iOS simulator then test the service by using following url:
[send news update](
http://destekmenkul.com/mobil/insertcommenttest.php)
fill pass field:
pass: murat123
result is shown in the terminal : "its working" means ondatastream works. We sended a news and it cought in ondatastream method but Android gives runtime error because responseText is empty.
[INFO] : TypeId:TestType
[INFO] : notification:{"py/object":"NewsLib.DefaultNewsItem.DefaultNewsItem","readCount":0,"uid":"20150930141554","source":"TestSource","symbol":"EURUSD","dateTime":{"py/repr":"datetime/datetime.datetime(2015, 9, 30, 14, 15, 54, 430528)"},"thumbnailID":"
http://www.forexsirketleri.org/uploads/destekfx-inceleme.png","header":"My Header","typeId":"TestType","keywords":["","usd","abd","eurusd","eur","euro b??lgesi"],"pretext":"pretext","isRefresh":false,"isDelete":false,"stocks":"","timestamp":1446207300000}
[INFO] : its working!!!
Now try same step with Android simulator there is no info print! ondatastream responseText is empty!
I attached our comet service document for further explanation of comet service.
app_simplified.js:
Just run the code and see the response.
Do you have any update for this issue?
Hello, we really waiting for a feedback. Could you at least respond whether this issue fixable or not? Thank you.
Hello, Can you try Running the below code in SDK 4.1.1.GA. It's working for me in Android. remember "ondatastream" must be called before "open".
Hi Amimul, I have used the same method with similar way but Android version did not worked. I have send my sample code to your email address. It has sensitive login credentials so I can not share here. We are really waiting whether it can fixable or not. Thank you. Edit: I attached the source code and documents
Hi, Are there any progress so far?
Hello, we are waiting response. Thank you.
Is it possible to assign High or Medium priority to this issue?
We really need someone to look this issue. Thank you.
Can someone assign this issue to another developer? We have not received any update yet. Thank you.
I have added source code, comet server documentation and how to reproduce the issue. Please inform us about this issue as soon as possible we really waited too long without any response.
I have simplified the app.js code, you need to get following response when you send fake news but Android gets runtime error instead of response: [INFO] : TypeId:TestType [INFO] : notification:{"py/object":"NewsLib.DefaultNewsItem.DefaultNewsItem","readCount":0,"uid":"20150930141554","source":"TestSource","symbol":"EURUSD","dateTime":{"py/repr":"datetime/datetime.datetime(2015, 9, 30, 14, 15, 54, 430528)"},"thumbnailID":"http://www.forexsirketleri.org/uploads/destekfx-inceleme.png","header":"My Header","typeId":"TestType","keywords":["","usd","abd","eurusd","eur","euro bölgesi"],"pretext":"pretext","isRefresh":false,"isDelete":false,"stocks":"","timestamp":1446207300000} [INFO] : its working!!!
Hello, it is because news is not received by Android, but iOS works smoothly you will not get runtime error with iOS
It's because opensession.responseText only filled in iOS but not on Android
I even more simplified the code. You do not need to send news. ResponseText is empty for Android but iOS is not empty. Code is not complicated and issue is really clear.
Hello Amimul, Thank you for response. Because our customer waiting for Android version and we are already late could you make this ticket high-priority? Thank you.
Hello Amimul, any update so far? Thank you.
Hello, any update from engineering team? Thank you.
Hello, any update from engineering team? Thank you.
Hello, we reallly need a feedback. I have created the issue 1th of September. Thank you.
Hello, any advance so far?
Hi [~ceyhun], We moved this issue to our Engineering queue. Waiting for engineering to schedule this.
Thank you @Shak Hossain. When will 2015 Sprint 24 SDK start?
[~ceyhun] Is there a way to show the example by using "curl" in terminal?
hello, no curl example. But the there had been some change after I have created the issue (login password api url etc..). So I updated the code as below. Could you try this simplified version? [app.js](https://www.dropbox.com/s/lfwayfcl2pyua5e/app.js?dl=0)
Running example first iOS then Android reveals the problem clearly.
[~ceyhun] thanks for the fast response. I'll try the new simplified version.
PR merged for Release 5.2.0.
Thank you for fixing this issue. Could you delete attachments app_simplified, app.js and COMET_ENG.pdf? These are about private services that our customer have prefer not to be disclosed. I can see that there are other ways to replicate this issue. Thank you.