-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
Crawl doesn't work with basic/auth #1506
Comments
Thanks for opening this for me @soulgalore, appreciated |
A shot in the dark: Maybe |
Hi @papandreou yes you are right, from latest release we can do request headers in Chrome (we wait on next Selenium release for Firefox, @tobli has fix there that needs to be released). For the crawler I see that I missed adding support for request header, let me do that tonight so it's there for next release. Best |
Ooops I never fixed that. If someone else has time that would be great :) |
Is this still in unresolved state.? Currently, I am using url as follows, And failing. Is there any work around.? Note: here abcuser@xyzcompany.com is the username and passwordtest is the password |
It should be implemented in the crawler https://github.com/sitespeedio/sitespeed.io/blob/master/lib/plugins/crawler/index.js - and I think Simplecrawler, do you have time to have a go @fayazmd ? I can help out test it? |
Hey, I have tried to analysis the index.js file started with question, how are we passing creds..?? and found the lines.. (line no 46 - line no 51),
we are basically splitting based on '@' for the input value, https://u:p@domain.com, doesn't it end up at like, https://u:p in index 0th position and domain.com at index 1st position.? My query is,
Please correct me, if I am wrong. Sorry for my limited knowledge Note: the above code doesn't bother existence of '@' either in username or password. In other words, if my code is good to consider, then we can have '@' in username and password as well. |
Hey @fayazmd you are right, there is an implementation but maybe then not working, sorry I forgot about it and didn't check the code :( No it should work like this: You supply the basicAuth on the side so you add the URL and the --basicAuth userName@password or --browsertime.basicAuth (we got a shorthand for that) and then we take that option from browsertime and use it in the crawler: https://github.com/sitespeedio/sitespeed.io/blob/master/lib/plugins/crawler/index.js#L17 So according to the code this should work: But it doesn't or? I don't have a site behind basic auth at the moment. |
Could someone help us test if this work or not? |
Hi @soulgalore - I was looking for something else and decided to get distracted with this. When tested against The Internet - browsertime did throw an error. I'm using windows/ docker/ latest sitespeed as of time of writing. Cmd:
"{ "browsertime": "Error" }" From the log:
When run with video enabled, the Docker cmd window came up with the following... Docker window:
The report gives me metrics, a screen grab of a successful login and a video which shows the successful bit, I guess it has a hard time rendering/ capturing the auth part. I can perhaps pull more info out if you're able to point me in the right direction, but hope that helps nonetheless. |
Hi @jholsgrove thanks for trying it out! First about the video: It fails when we try to find the first frame that isn't orange ... Think something goes wrong with the URL (I can see it is orange and then only one frame that changes). If you have time you can add
It's not so obvoius but we have both video and visual metrics on by default so to disable fully recording a video you need Best |
Thanks @soulgalore - seems to have cleared that part up! The video just gave me a white screen/ no visuals with With regard to the original bug it doesn't seem to crawl the additional links to elemental selenium and the github fork using the Creds for the basicAuth test site are |
Thanks @jholsgrove hmm ok, but that URL, does it have any URLS to crawl? It will only crawl on the same host if I remember correctly. Best |
Ah yes, a slight oversight on my part there. I rigged up my own basic auth site and added a link and it crawled just fine. I think you can safely close this particular issue @soulgalore :) If you would like to see yourself: |
Closing, please re-open if you have any issues :) |
Hi @soulgalore - I don't know if I should open a new issue for this, but when i use the ugly fix (http://u:p@domain.com) on a crawl, sitespeed.io doesn't crawl, just gives me the result for the first page. Is there something I am doing wrong?
Command running is
sitespeed.io http://user:pass@sub.domain.com/ -d 2
and I get the outputIs there any way to make a crawl work with this method?
Reported by @joebeaver89
The text was updated successfully, but these errors were encountered: