sitespeedio / sitespeed.io

sitespeed.io is an open-source tool for comprehensive web performance analysis, enabling you to test, monitor, and optimize your website’s speed using real browsers in various environments.
https://www.sitespeed.io/
MIT License
4.75k stars 603 forks source link

Error: ENOENT: no such file or directory - This issue is observing while executing await commands.measure.stop() command for second time #4192

Open pjayaweera opened 4 months ago

pjayaweera commented 4 months ago

I have site speed script to run through Jenkins pipeline and while its running i'm getting following error. This issue is getting while trying to execute the await commands.measure.stop(); command for second time (line 50).

Error: ENOENT: no such file or directory,

Login transaction is successfully completed (line 34 - line 41). During the login transaction await commands.measure.stop();(line 39) executed without any errors for the 1st time.

i have uploaded the java script file i'm running as an attachment(Test.js) Test.txt

i have attached the pipeline script which is currently running pipeline.txt

image image

p.s - This script is working fine in local environment.(no issues)

soulgalore commented 4 months ago

Hi @pjayaweera in your cleanupTempFiles function don't you cleanup up data directories before the tests has ended? I think that's why the chrome driver log is removed before browsertime tries to gzip the file.

pjayaweera commented 4 months ago

Hi @soulgalore, I didn't use this clean-up function initially. But faced to same issue. Then i added this clean-up function(line 43). But same result. Could you please tell me where should i call await cleanupTempFiles(); function? (just tell me the line number)

and please note error is coming while executing the line 50. So, its not reaching end of the test case.

In the attached Test.txt file you can see the full code

soulgalore commented 4 months ago

I didn't fully get why you need to cleanup the directory inside of the script? I would move some of that functionality that do not belong to scripting (running users journey tests) to a start script that starts of the test and cleanup when the test finished.

pjayaweera commented 4 months ago

I used this clean-up function as a solution given by Chat-gpt for observed issue. (Error: ENOENT: no such file or directory,)

Now i have removed the clean-up function. Below is the result.

image image

Same error is getting while coming to second transaction....

soulgalore commented 4 months ago

Try without enabling the chrome driver log and see if it works?

pjayaweera commented 4 months ago

disabled logs, but same error can see.

image image
soulgalore commented 4 months ago

You still have --browsertime.chrome.enableChromeDriverLog in your example?

pjayaweera commented 4 months ago

I was misunderstood initially. Your solution is worked(removing --browsertime.chrome.enableChromeDriverLog). You are genius. Thank you so much

image