Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24907] Windows: Investigate Ti.Blob mimetype failures on jenkins

GitHub Issuen/a
TypeStory
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-06-30T06:13:42.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2017-06-28T19:19:26.000+0000
Updated2017-07-27T13:43:38.000+0000

Description

A high number of jenkins runs have recently failed due to the same test, across both 8.1 and 10 - Investigate the failures (try and find out when it started if possible) - Isolate the cause - Fix if an SDK problem, revisit the test if a test problem (as this seems to be new probably the former) *Do not skip the test* https://github.com/appcelerator/titanium_mobile_windows/blob/9009ed6467bbba7098d8efceb57ff45ad2e14a03/Examples/NMocha/src/Assets/ti.blob.test.js#L68 https://jenkins.appcelerator.org/blue/organizations/jenkins/titanium-sdk%2Ftitanium_mobile_windows/detail/PR-1008/15/tests

Comments

  1. Ewan Harris 2017-06-29

    Test code
       var blob = Ti.Filesystem.getFile('app.js').read();
       console.log(blob.mimeType)
       console.log(blob.mimeType.length)
       console.log(blob.mimeType)
       console.log(blob);
       
    On Windows 10 emulator (same on device just minfiied JS)
       [INFO]  text/javascript
       [INFO]  15
       [INFO]  text/javascript
       [INFO]  var blob = Ti.Filesystem.getFile('app.js').read();
       [INFO]  console.log(blob.mimeType)
       [INFO]  console.log(blob.mimeType.length)
       [INFO]  console.log(blob.mimeType)
       [INFO]  console.log(blob);
       
    On Windows 10 local
       [INFO]
       [INFO]  0
       [INFO]
       [INFO]  var blob = Ti.Filesystem.getFile('app.js').read();
       [INFO]  console.log(blob.mimeType)
       [INFO]  console.log(blob.mimeType.length)
       [INFO]  console.log(blob.mimeType)
       [INFO]  console.log(blob);
       
    Debugging through VS shows that ContentType here https://github.com/appcelerator/titanium_mobile_windows/blob/9009ed6467bbba7098d8efceb57ff45ad2e14a03/Source/Titanium/src/Blob.cpp#L66 is returning null
  2. Ewan Harris 2017-06-29

    If I use an image I get the mimetype as expected, I propose that we do this rather than using app.js
       blob = Ti.Filesystem.getFile('Logo.png').read();
       console.log(blob.mimeType)
       console.log(blob.mimeType.length)
       console.log(blob.mimeType)
       [INFO] image/png
       [INFO] 9
       [INFO] image/png
       [INFO] 
       
  3. Ewan Harris 2017-06-29

    Master https://github.com/appcelerator/titanium_mobile_windows/pull/1029
  4. Kota Iguchi 2017-07-11

    6.1.2 backport: https://github.com/appcelerator/titanium_mobile_windows/pull/1038

JSON Source