[TIMOB-27350] iOS: httpClient returning image response as undefined.
GitHub Issue | n/a |
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-01-06T16:00:31.000+0000 |
Affected Version/s | Release 8.1.0 |
Fix Version/s | Release 8.3.1 |
Components | iOS |
Labels | engSchedule, escalation |
Reporter | Motiur Rahman |
Assignee | Unknown |
Created | 2019-08-23T15:09:27.000+0000 |
Updated | 2020-07-03T08:41:25.000+0000 |
Description
*Customer issue:* As part of Titanium SDK migration from 7.5.2.GA to 8.1.0.GA titanium SDK, we are encountering an issue when we are fetching image from server and checking if the response is Blob or not by converting to .toString().
It is returning “undefined” with 8.1.0.GA but returning blob object with 8.0.2.GA, 7.5.2.GA.
Steps to reproduce:
1. Create a classic mobile app with 8.1.0 SDK.
2. Replace app.js file content with attached app.js.
3. Run on iOS device.
4. check the info in the console.
Thanks
Attachments
File | Date | Size |
app.js | 2019-08-23T15:07:02.000+0000 | 885 |
[~vijaysingh] Could you please investigate it? I am getting the same with the Ti SDK 8.1.0.GA. But it works on the lower SDK version.
Reproducible with 8.1.0.GA SDK. [INFO] : Received Data: undefined. 8.0.2.GA SDK returns: [INFO] : Received Data: [object TiBlob]
I can see that from SDK 8.1.0.GA, toString() API is broken for TiBlob. I'll look in this. But if concern is logging, then please use - Ti.API.info("Received Data: ", this.responseData); instead of Ti.API.info("Received Data: " +this.responseData); and use SDK 8.1.1.GA+ .
PR - https://github.com/appcelerator/titanium_mobile/pull/11354
This is something we can easily add unit tests for, and there's some old code that got migrated over for TiBlob that no longer is used and should be removed. See PR comments.
FR Passed, waiting on Jenkins build.
merged to master for 9.0.0
Closing ticket, fix verified in SDK version
9.0.0.v20200103081513
. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/11354PR (8_3_X) - https://github.com/appcelerator/titanium_mobile/pull/11421
FR Passed for 8_3_X.
merged to 8_3_X for 8.3.1
Verified fix in SDK version 8.3.1.v20200110021712
Removing from fixVersion 9.0.0 as this shipped in 8.3.1.GA