Skip to content
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

Provide more details about http failures #270

Open
mernst opened this issue Apr 27, 2019 · 7 comments
Open

Provide more details about http failures #270

mernst opened this issue Apr 27, 2019 · 7 comments
Assignees
Labels

Comments

@mernst
Copy link
Contributor

mernst commented Apr 27, 2019

In a message like this one:

44 anchor href attribute checked, 1 broken external link found.
Unknown host with href=https://douglascayers.com/2015/05/30/how-to-set-custom-java-path-after-installing-jdk-8/

it would be helpful to give more details about the failure, such as the exact error code.
I am able to browse to that URL, and a HEAD request also seems works for me using curl, so I don't know exactly to diagnose the problem that htmlSanityCheck is suffering.

@gernotstarke gernotstarke self-assigned this Apr 27, 2019
@gernotstarke
Copy link
Member

right u are. Will look into it asap (might take a few days, as II'm currently on holiday)

@gernotstarke
Copy link
Member

(and I feel deeply honored that you care for my little library... although it by no means matches your high software quality standards...)

@gernotstarke
Copy link
Member

@mernst - could you please provide the context of the error message (at best the complete report)?

In the corresponding Checker subclass, the http status code is included in the output:

problem += """ ${href} returned statuscode ${responseCode}."""
checkingResults.addFinding(new Finding(problem))

And I verified that the URL you mentioned above returns status code 200...

Therefore, I need some additional info for debugging...
(alternatively, you can point me to the github repo where these checks cause problems).

regards, Gernot

@mernst
Copy link
Contributor Author

mernst commented Apr 28, 2019

Thanks for the quick response! To reproduce the error, please run:

git clone https://github.com/randoop/randoop.git
cd randoop
./gradlew htmlSanityCheck

There is just one error -- the one I quoted above.

Please let me know if you need any more information or if I can do anything to help.

Thanks for your help!

@gernotstarke
Copy link
Member

had to remove the html5Validator requirement - as the (normal) build requires that prerequisite...

actually there are two distinct problems here:

  1. overly short and ineffective error reporting, which does not help in identifying underlying problem.

  2. the URL https://douglascayers.com/2015/05/30/how-to-set-custom-java-path-after-installing-jdk-8/ leads to an unknown-host-exception, which is definitely wrong. I'll open a new issue for that (valid URL yields "unknown host with href" message #272)

I'm investigating...

@mernst
Copy link
Contributor Author

mernst commented Apr 28, 2019

had to remove the html5Validator requirement - as the (normal) build requires that prerequisite...

Currently, the Randoop build requires installation of html5validator. Sorry I didn't mention that.

I'm investigating replacing that by htmlSanityCheck.

@gernotstarke
Copy link
Member

Thanx to the hint from @double16 I'll try to come up with a more relaxed HttpsUrlConnection class, that does not try to validate the certificates...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants