protractor-video-reporter icon indicating copy to clipboard operation
protractor-video-reporter copied to clipboard

["ffmpegArgs" must not be a sparse array]

Open santhosh12992 opened this issue 8 years ago • 12 comments

Hi dude..,

I have trying this video recorder but i got error message as below. video

santhosh12992 avatar Nov 16 '16 12:11 santhosh12992

it means there is an undefined value in the ffmpegArgs array do a console.log to find out which one is it

On Wed, Nov 16, 2016 at 2:56 PM, santhosh12992 [email protected] wrote:

Hi dude..,

I have trying this video recorder but i got error message as below. [image: video] https://cloud.githubusercontent.com/assets/23401123/20348153/23de6200-ac2a-11e6-962b-a739ee51cdfe.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tepez/protractor-video-reporter/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/ADHUcRv_jpTuIoA6JvCv2ANPeHtsbhMlks5q-v1sgaJpZM4Kz0ob .

tomyam1 avatar Nov 16 '16 14:11 tomyam1

Since, ffmpegArgs is optional i didnt used those in my config file. var VideoReporter = require('protractor-video-reporter'); onPrepare: function() {

jasmine.getEnv().addReporter(new VideoReporter({ baseDirectory: path.join(__dirname, 'reports/videos/'),

})); }

still i am facing the same issue.

santhosh12992 avatar Nov 16 '16 17:11 santhosh12992

You probably don't have the DISPLAY env variable defined

tomyam1 avatar Nov 17 '16 07:11 tomyam1

Hi tepez,

I am using windows. I am not able to troubleshoot this err. If required i will share you more details.

Thx.

santhosh12992 avatar Nov 17 '16 11:11 santhosh12992

Sorry, I've never run this on Windows, can't help with that

tomyam1 avatar Nov 17 '16 14:11 tomyam1

Thanks for your replay tepez.

Kindly let me know this as been made compatable with windows also. thanks again.

santhosh12992 avatar Nov 22 '16 11:11 santhosh12992

@tomyam1 hey, getting this even on a mac.

protractor.conf

var ffmpeg = require('ffmpeg');
var VideoReporter = require('protractor-video-reporter');

jasmine.getEnv().addReporter(new VideoReporter({
                baseDirectory: 'videos/'
            }));

both ffmpeg & protractor-video-reporter are installed.

[15:48:27] E/launcher - Error: ValidationError: child "ffmpegArgs" fails because ["ffmpegArgs" must not be a sparse array]

Any ideas?

irtiza avatar Mar 02 '17 20:03 irtiza

Also experienced this if I setup my reporter like so:

let videoReporter = new VideoReporter({
  baseDirectory: path.join(__dirname, reportDirs.video),
  //singleVideo: false,
});

I did not include ffmpegArgs. The error report is misleading (there is no array at all, not even a sparse array).

Thanks!

benjaminapetersen avatar Oct 17 '17 14:10 benjaminapetersen

+1 same issue on OSX

jbwyme avatar Jan 22 '18 19:01 jbwyme

This post helped: https://stackoverflow.com/questions/38860261/recording-videos-of-protractor-e2e-tests

jbwyme avatar Jan 22 '18 20:01 jbwyme

Hello i'm also experiencing the same issue on OSX i installed the ffmpeg library, i could detect that the process.env.DISPLAY is undefined, please is there anyway to solve the problem?

trusta1 avatar Aug 14 '18 10:08 trusta1

I was able to have it run on both mac and windows to record protactor tests running. Sample code can be found here https://stackoverflow.com/a/45803583/4425525

The order of parameters in the array matters, as they are sent to ffmpeg command line in that order.

jsgervais avatar Aug 24 '18 19:08 jsgervais