tomyam1 / protractor-video-reporter

Jasmine reporter that captures a screencast of Protractor specs running on a headless browser, e.g. in CI server
MIT License
21 stars 21 forks source link

["ffmpegArgs" must not be a sparse array] #10

Open santhosh12992 opened 7 years ago

santhosh12992 commented 7 years ago

Hi dude..,

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

tomyam1 commented 7 years ago

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 notifications@github.com 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 .

santhosh12992 commented 7 years ago

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.

tomyam1 commented 7 years ago

You probably don't have the DISPLAY env variable defined

santhosh12992 commented 7 years ago

Hi tepez,

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

Thx.

tomyam1 commented 7 years ago

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

santhosh12992 commented 7 years ago

Thanks for your replay tepez.

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

irtiza commented 7 years ago

@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?

benjaminapetersen commented 6 years ago

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!

jbwyme commented 6 years ago

+1 same issue on OSX

jbwyme commented 6 years ago

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

trusta1 commented 6 years ago

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?

jsgervais commented 6 years ago

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.