[XWALK-2101] The type of AudioSystemContext.streams[0] is undefined when running the "WebAPI/IVI/AudioSystem" on IVI Created: 14/Jul/14 Updated: 16/Nov/14 Resolved: 28/Aug/14 Status: Project: Component/s: Affects Version/s: Fix Version/s: Closed Crosswalk Project Crosswalk Project for IVI, Tizen device API Crosswalk 8, Crosswalk 9 Type: Reporter: Resolution: Labels: Remaining Estimate: Time Spent: Original Estimate: Environment: Bug Cao Can Invalid new29 Not Specified Attachments: audiosystem.png webapi-audiosystem-xwalk-tests6.35.1.2.xpk.zip Tizen IVI Normal Belem Zhang, jenny cao, liudeyi, tinazhao, Wang Lei (Inactive) intel.com (Find related issues) OS: Platform/s: Severity: CC: Reporter Domain: None Priority: Assignee: Votes: P2 Amarnath Valluri (Inactive) 0 Not Specified Not Specified Device: VTC1010 Tizen IVI image: tizen_20140704.2_ivi-efi-i586 Crosswalk: Tizen Canary crosswalk-8.36.170.0-0.i686.rpm T-E-C: Tizen Canary 0.79-0.i686.rpm Description IMPACTED CASES: ========================================================================= AudioSystemContext_streams_basic REPRODUCE TEST STEPS: ========================================================================= 1. Install crosswalk package to the device,the crosswalk link is as below: https://download.01.org/crosswalk/releases/crosswalk/tizen-ivi/canary/8.36.170.0/crosswalk8.36.170.0-0.i686.rpm Install tizen-extensions-crosswalk package to the device,the crosswalk link is as below: https://download.01.org/crosswalk/releases/tizen-extensions-crosswalk/tizen-ivi/canary/0.79/tizenextensions-crosswalk-0.79-0.i686.rpm 2. Install "webapi-audiosystem-ivi-tests" package to the device (package link ,please refer to the comment info) (root user)unzip webapi-audiosystem-ivi-tests-***.zip -d /home/app/content/ (app user)xwalkctl -i /home/app/content/opt/webapi-audiosystem-ivi-tests/webapi-audiosystem-ivitests.xpk 3. Got pkgid by the command as below: xwalkctl |grep webapi-audiosystem-ivi-tests 4.Launch the component,the command is as below: xwalk-launcher pkgid 5.Select the "AudioSystemContext_streams_basic" test case. 6.Click Run button EXPECTED OUTCOME: ========================================================================= The type of AudioSystemContext.streams[0] is an object. ACTUAL OUTCOME: ========================================================================= The type of AudioSystemContext.streams[0] is undefined. Test Case Sources Code: ========================================================================= Type URL Source https://github.com/crosswalk-project/crosswalk-test-suite/blob/master/webapi/webapiCode audiosystem-ivi-tests/audiosystem/AudioSystemContext_streams_attribute.html TEST BUILDS: ========================================================================= Version Test Date Test Device Result Canary 8.36.170.0 2014.07.14 IVI Fail Canary 9.37.190.0 2014.08.14 IVI Fail ISSUE ANALYSIS: ========================================================================= 1.The type of AudioSystemContext.streams[0] is undefined. 2.Error Message: assert_equals: unit of context.streams should be a object. expected "object" but got "undefined" 3.The related code is as below: if (context.streams) { assert_type(context.streams, "array", "context.streams should be an array"); assert_type(context.streams[0], "object", "unit of context.streams should be a object."); Comments Comment by Amarnath Valluri (Inactive) [ 17/Jul/14 ] I doubt if the test case is correct?. AudioSystemContext.streams refer to currently active audio streams that are being played, So i don't think it make sense checking all the time if atleast one valid stream exits(i.e, streams[0]), unless if you start a audio playback before running these tests. Cao Can Can you please confirm this. Comment by Cao Can [ 17/Jul/14 ] hi,Li Haox, Based on developer's comments, could you please check is it a case issue? thanks. Comment by Li Haox [ 03/Aug/14 ] @xujianfeng Please check the issue. Comment by xujianfeng (Inactive) [ 03/Aug/14 ] I have modified the case, add a audio tag and play audio before run connect method. But in my side, when ran connect method, the error callback was invoked and the terminal showed error information 'Failed to create secure directory (/run/user/0/pulse): Permission denied', so I do not know if my update is correct. Cao Can Please help me verify the case by package in the attachments list. Thanks. Comment by Cao Can [ 03/Aug/14 ] According to the xujianfeng comments,I verify it on IVI. The test result is "FAIL". This issue still exist.More detail please refer to the attachments "audiosystem.png" . Comment by xujianfeng (Inactive) [ 03/Aug/14 ] hi Amarnath Valluri, I have added audio tag to play audio, but can not get audiostream. <audio id="MediaPlayback" autoplay loop controls="controls"> <source src="sound_5.oga" type="audio/ogg"> Not Support ... </audio> You mean that start a audio playback before running these tests, can you tell me how to start a audio, then get audiostream object. Comment by Amarnath Valluri (Inactive) [ 04/Aug/14 ] xujianfeng as per your earlier comment('Failed to create secure directory (/run/user/0/pulse): Permission denied'), It seems like pulseaudio is trying to connect from 'root' user, i.e, audio was trying to play by root user. PA should be used by non-root users. Can you please check if that is the case. Comment by xujianfeng (Inactive) [ 04/Aug/14 ] hi Amarnath Valluri, Thanks for you help, I have resolved this issue ('Failed to create secure directory (/run/user/0/pulse): Permission denied') . But when I run the connect method after start a audio by audio tag, the stream Is still undefined. I want to know how to start a audio , then can get audiostream object. Comment by Amarnath Valluri (Inactive) [ 04/Aug/14 ] xujianfeng If i open the testcase html file using xwalk as below, then the case is passed, but the same fails when i use xwalk-launcher : $ xwalk /home/app/.config/xwalkservice/applications/lbdhhnldofiaalfiienndbdejmhilieb/opt/webapi-audiosystem-xwalktests/audiosystem/AudioSystemContext_streams_attribute.html Its not reaching pulseaudio at all, when launching from xwalk-launcher, so that is the reason no streams are created. But I have no idea why its not playing using pulseaudio by launching from xwalk-launcher. Comment by xujianfeng (Inactive) [ 19/Aug/14 ] hi Amarnath Valluri, the tests are updated in https://github.com/crosswalk-project/crosswalktest-suite/pull/721/. If they are tested PASS by xwalk, but FAIL by xwalk-launcher, I think it should not be feature or case issue, there must be some different between xwalk and xwalklauncher, and xwalk has been removed form crosswalk. Could you help to sync this problem with xwalk-lanucher developer ? Comment by Amarnath Valluri (Inactive) [ 28/Aug/14 ] Some how master volume is mute by default in ivi images, Here are the steps to unmute and run the tests: $ amixer sset Maser unmute # amixer is part of 'alsa-utils' package $ killall xwalk # or reboot $ xwalk-launcher <<test_app_id>> But I would suggest to raise a separate issue on right component related to this. By the way there was one test failure : AudioSystemContext_streams_basic, where the test case is wrong, it is expecting existence of atleast one stream without playing any audio. Comment by Zhan Lei (Inactive) [ 16/Nov/14 ] AudioSystemContext_streams_basic is tested pass on below environment, so close it. Device: VTC1010 Tizen IVI image: tizen-ivi_20141111.3_ivi-efi-i586 Crosswalk: Tizen Canary crosswalk-10.38.222.0-19.16.i686 T-E-C: Tizen Canary 0.107-18.4.i686 Generated at Tue Feb 09 08:56:40 PST 2016 using JIRA 6.3.14#6345sha1:47b2bb0a76c6e60bffb16fa45719b26a7e5e0c78.