-
-
Notifications
You must be signed in to change notification settings - Fork 610
Error generating url/summary/index #4124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @ryanyango thank you for creating the issue! Can you share how you run and what URL you test so I can recreate it? Thanks |
Hi @soulgalore i run the following command: docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:latest -b chrome --multi <internal_url> ssio_workflow.mjs -n 1 --video |
It looks like no coach data is collected from one page. I would watch the browser and check if the script do what's its supposed to do: https://www.sitespeed.io/documentation/sitespeed.io/scripting/tutorial-07-Debugging-Scripts.html#watch-what's-going-on - maybe there's one step that do not work? |
I am also facing a similar issue:
This is also preceded by another interesting error message: For context, I am using Onlinetest all installed locally for the time being as well as a local (non-Dockerized) sitespeed.io to run my tests. The test case is run for 1 iteration and when I observe the browser, it is correctly reaching the final page of the test case via a script I have written. Also unable to share URL's as it is an internal test environment that we are testing against. Any suggestions for this? |
Hi @yashgarde cool, can you please share the script so I can reproduce it? It's really hard just to guess. Thank you! |
Sorry for the delayed response, been trying to figure out the problem myself. I am unable to provide the exact script I am using that encounters the issue as it accesses internal webpages that we are targeting for performance testing. I will include the details of the nature of the tests and the details of what I have found so far below. Here are some additional findings:
Interestingly, not all click through based tests fail due to the Hopefully that gives you an idea of the nature of the testing, I am providing a sample version of the script I am using (with the URLs redacted) to give you an idea as well:
Additionally, when viewing the browser to see if the correct pages are loaded, all the right clicks and page loads are visible in the browser when running this setup locally. |
Ok, hmm. Do you use Chrome or Firefox?
That means that in the HAR file, the URL for the page does not match the URL of the browser window. In this case it does not have a URL in the HAR. The HAR is generated differently depending if its Chrome or Firefox, could you try if it works in the other browser? Maybe I could add some better logging so it's easier to see what's going on. Is the HAR file created, then you could drag/drop it into http://www.softwareishard.com/har/viewer/ and see what it looks like (is a page missing etc). If you do not add |
I am only testing on Chrome at the moment, I will have a look tomorrow and see whether the HAR file is generated in the error case. I will try it out with Firefox as well and get back to you here. To answer your second question, without the |
When I looked at the code, there's some logic to go through the HAR file and find the pages of each request and there something is broken because you get a URL that is undefined. Even though the HTML result is generated correctly, I think the HAR file is broken somehow. Can you share it or if you inspect it yourself? I would check for requests that do not match any page or a HAR that do not validate (drag/dropping the HAR into the HAR viewer will validate it). |
Also another way to see what's wrong would to be to collect the trace log for Chrome (that file is used for creating the HAR file). If you add |
Back with an update:
|
Another update: |
That seems to be a bug for Firefox, I created #4233 for that. |
And the HAR files looks correct for you? By correct I mean all pages you test is included and requests looks ok? When I looked in the HARviewer the result looked identical for me but maybe I missed something? I will look a the perflog later. |
Ok, there's a bug in the code, where I simplified getting a URL for each page in the HAR that do not always work. I'll fix that but it will take a day or two. The second page in the HAR, that is a page that you navigate to (https://XXX/api/now/session/notification)? |
Sorry for the delayed response, the HAR files look good to me. I do not actually navigate to the URL you mentioned ( Cheers for finding the bug, let me know if there's a way I can help at all. |
Update: the Additionally, I noticed that there is a difference between the HAR file I pulled from the |
Ok, so that notification-URL is that in an iframe or can you see how that request is happening? I guess it can be a bug in chrome-har then, I haven't had time yet to check trace file yet, I hope to do that later this week. |
I had a quick look today but I wasn't able to fix it. I need to check the documentation for the Chrome events, we have many tests but some of them are using a really old version of the events and when I've done my changes, the tests broke. But I wonder if it's not the Chrome implementation that changed over time and that I should recreate all the test cases. I'll hope to be able to work on it this weekend. |
Don't know if this is related to this issue at all, but one of my user journey tests (where I am only measuring the final page load) is currently throwing this error:
This is followed by the following error:
which is an error we have seen before. These tests were not run with the Let me know if you need more info or if this is even related? |
Hi @yashgarde can you please create another issue of that error. It looks like https://github.com/sitespeedio/chrome-har gets a timestamp from Chrome trace that is not correct. I can catch that but if you can share the trace I can make sure that its really work. Thanks! |
Created a new issue #4243 as requested. |
Hi, is this issue still open? I've had similiar findings below, my script also uses
|
@ryanyango-alt can you please share a example so I can test it and try to fix it? Thanks! |
I cant give you all the details of the script, but the part that is erroring out is:
Note at this point of the script, its already at 3 nested iframes deep. im running with the command:
|
Having the same issue here. For some reason, while creating a HAR file from the list of messages in chrome-har, an additional page is added. Hotfix:
|
Hello @soulgalore Is there an update on this issue? I am seeing the same issue where I am trying to run sitespeedio tests against a list of URLs against a dev environment which sits behind a login. I use the --preScript option which works fine where it logs in and then navigates to each of the URLs mentioned. But when the test runs the first URL of the list, can see below ERROR log
And the test continues for other URLs which do not show this ERROR log in the tests. But when all the tests against the URLs in the list finish and when the summary HTML is rendered is when the error happens and the test breaks, stopping the results from uploaded to the s3 bucket. Logs below:
Thank you for your help. |
Hi @CharlsChacko , I can have a look at your issue later today. The thing with the "issue" is that even though the logs says the same in some cases, it is still different issues depending on what kind of script and test you run. I'm still looking for someone that could actually share a reproducible case. But I'll have a look at your case and see if I can understand what's going on. |
Hi @CharlsChacko I didn't see which browser you are using (the HAR is handled differently in Chrome vs Firefox).
Do you get a HAR file for the page that failed that you can share? |
Hi @CharlsChacko as a first step I released 37.4.1 with a fix that at least fixes the problem of that the test totally fail in the end. For the root cause, need your input about browser and if you have the HAR file. |
Thank you @soulgalore. Will upgrade to this and see how this resolves the test failures. Regarding the details you had asked:
Please let me know any other information is needed from my side. Thank you for your help. |
Hi @CharlsChacko thank you I will see what I can do this weekend. When I checked the HAR I could see that all requests is attached to page number two (you can see that when you drag/drop it into http://www.softwareishard.com/har/viewer/), that is wrong/broken, they should all be attached to the first page. Is it easy for you to run the test/reproduce it? Then if you could add Thank you! |
Hello @soulgalore I was able to reproduce the issue with the |
I had a go on Sunday but didn't get it to work 100%. There's those iframes that breaks generation and we need some smarter way to handle that. Will have another go soon. |
Hello @soulgalore |
Your question
Hi,
Im getting this error at the end of my run when i generate the report:
`ERROR: Could not generate url/summary/index, /usr/src/app/lib/plugins/html/templates/url/thirdparty/index.pug:24
22| h2 Third party
23|
Cannot read properties of undefined (reading 'run')
[2024-03-28 00:36:43] ERROR: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
at writeFile (node:fs:2241:5)
at node:internal/util:442:7
at new Promise ()
at writeFile (node:internal/util:428:12)
at write (file:///usr/src/app/lib/core/resultsStorage/storageManager.js:26:10)
at file:///usr/src/app/lib/core/resultsStorage/storageManager.js:113:9
at async HTMLBuilder.render (file:///usr/src/app/lib/plugins/html/htmlBuilder.js:340:7)
Errors while running:
Rejected {
"uuid": "64dd553c-2196-4a86-9831-dc607c4c639f",
"type": "sitespeedio.render",
"timestamp": "2024-03-28T00:36:41+00:00",
"source": "queueHandler",
"data": "{...}"
} for plugin: html
{"code":"ERR_INVALID_ARG_TYPE"}
Error: Errors while running:
Rejected {
"uuid": "64dd553c-2196-4a86-9831-dc607c4c639f",
"type": "sitespeedio.render",
"timestamp": "2024-03-28T00:36:41+00:00",
"source": "queueHandler",
"data": "{...}"
} for plugin: html
{"code":"ERR_INVALID_ARG_TYPE"}
at start (file:///usr/src/app/bin/sitespeed.js:178:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///usr/src/app/bin/sitespeed.js:189:1`
What does the error generally indicate and how would i got about troubleshooting this? This occurs in the sitespeedio/sitespeed.io:33.4.0 and sitespeedio/sitespeed.io:latest images.
The text was updated successfully, but these errors were encountered: