Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27350] iOS: httpClient returning image response as undefined.

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2020-01-06T16:00:31.000+0000
Affected Version/sRelease 8.1.0
Fix Version/sRelease 8.3.1
ComponentsiOS
LabelsengSchedule, escalation
ReporterMotiur Rahman
AssigneeUnknown
Created2019-08-23T15:09:27.000+0000
Updated2020-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

FileDateSize
app.js2019-08-23T15:07:02.000+0000885

Comments

  1. Motiur Rahman 2019-08-23

    [~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.
  2. Alan Hutton 2019-08-26

    Reproducible with 8.1.0.GA SDK. [INFO] : Received Data: undefined. 8.0.2.GA SDK returns: [INFO] : Received Data: [object TiBlob]
  3. Vijay Singh 2019-09-25

    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+ .
  4. Vijay Singh 2019-11-20

    PR - https://github.com/appcelerator/titanium_mobile/pull/11354
  5. Christopher Williams 2019-11-21

    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.
  6. Samir Mohammed 2019-12-12

    FR Passed, waiting on Jenkins build.
  7. Christopher Williams 2019-12-16

    merged to master for 9.0.0
  8. Samir Mohammed 2020-01-06

    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/11354
  9. Vijay Singh 2020-01-09

    PR (8_3_X) - https://github.com/appcelerator/titanium_mobile/pull/11421
  10. Samir Mohammed 2020-01-09

    FR Passed for 8_3_X.
  11. Christopher Williams 2020-01-09

    merged to 8_3_X for 8.3.1
  12. Samir Mohammed 2020-01-10

    Verified fix in SDK version 8.3.1.v20200110021712
  13. Ewan Harris 2020-02-26

    Removing from fixVersion 9.0.0 as this shipped in 8.3.1.GA

JSON Source