Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27313] IOS:Regression-Console.log does not concatenate and log if it has multiple arguments with space

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2019-08-19T09:17:12.000+0000
Affected Version/sRelease 8.1.0
Fix Version/sRelease 8.1.0
ComponentsiOS
Labelsconsole, engSchedule, regression
ReporterKeerthi Mahalingam
AssigneeVijay Singh
Created2019-08-07T04:19:21.000+0000
Updated2019-08-19T09:17:12.000+0000

Description

Steps to Reproduce: 1.Create a classic app 2.Run on IOS *Expected:* should log movie size *Actual:* displays only the first argument notes: if using concatenation like "console.log(e.type + ' e.naturalSize ' + JSON.stringify(e.naturalSize))" then logging correctly. console.log is working fine on 8.0.2 GA and below.not working on 8.1.0 App.js:
const win = Ti.UI.createWindow({
    backgroundColor: '#fff'
});
 
const player = Ti.Media.createVideoPlayer({
    url: 'http://techslides.com/demos/sample-videos/small.mp4', // 560x320
    showsControls: false,
    autoplay: true,
    height: 200
});
win.add(player);
 
function onNaturalSizeAvailable(e) {
    console.log(e.type, 'e.naturalSize', JSON.stringify(e.naturalSize));
    console.log('player.naturalSize', e.source.naturalSize);

//comment out the above 2 lines and uncomment the below 2 lines
//console.log(e.type + ' e.naturalSize ' + JSON.stringify(e.naturalSize));
  //  console.log('player.naturalSize ' + JSON.stringify(e.source.naturalSize));
}
player.addEventListener('naturalsizeavailable', onNaturalSizeAvailable);
 
win.open();

Comments

  1. Vijay Singh 2019-08-07

    PR (8_1_X) - https://github.com/appcelerator/titanium_mobile/pull/11125 PR (master) - https://github.com/appcelerator/titanium_mobile/pull/11124 Test Case -
       
       const win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       const button = Ti.UI.createButton({
         title: 'Log'
       });
       
       button.addEventListener('click', function(e){
        console.log(1, ' test', true);
       });
       
       win.add(button);
       win.open();
       
  2. Samir Mohammed 2019-08-12

    FR Passed on Master and 8_1_X, waiting on Jenkins builds. [~vijaysingh] Also looks like we need a PR for 8_3_X ?
  3. Vijay Singh 2019-08-12

    PR(8_3_X) - https://github.com/appcelerator/titanium_mobile/pull/11138
  4. Samir Mohammed 2019-08-13

    FR Passed for 8_3_X as well waiting on Jenkins build.
  5. Samir Mohammed 2019-08-19

    Closing ticket fix verified in SDK version 8.2.0.v20190816144236, 8.3.0.v20190816105756 and 8.1.0.GA. Test and other information can be found at: PR (8_1_X) - https://github.com/appcelerator/titanium_mobile/pull/11125 PR (master) - https://github.com/appcelerator/titanium_mobile/pull/11124 PR(8_3_X) - https://github.com/appcelerator/titanium_mobile/pull/11138

JSON Source