Accenture / EcoSonar

EcoSonar, the ecodesign audit tool
https://ecosonar.org/
GNU Affero General Public License v3.0
54 stars 19 forks source link

W3C score not displayed #11

Closed dedece35 closed 1 year ago

dedece35 commented 1 year ago

Hi @alicehaupais,

I launched an analysis but I have no W3C metrics on left column. Could you tell me why, please ?

Capture d’écran 2023-03-01 à 10 48 26

alicehaupais commented 1 year ago

Hello,

Yes W3C Validator audit is by default disabled because the library used makes an external API call to provide to perform the audit. We chose to disable it to let the choice to the team to use it or not. For W3C configuration, you can enable it through environment configuration, please follow instructions here

dedece35 commented 1 year ago

@alicehaupais, ok thank you. I will test it and I will come back.

dedece35 commented 1 year ago

Hi @alicehaupais

My first test isn't OK. sorry :( (I can't reopen the issue)

here is the result after activation of environment variable.

Capture d’écran 2023-03-01 à 23 15 45

Here are logs in EcoSonar API :

ecosonar_api    | Lighthouse Analysis ended for url https://www.pagesjaunes.fr/annuaire/chercherlespros?quoiqui=resto&ou=Rennes+%2835000%29&univers=pagesjaunes&idOu=L03523800
ecosonar_api    | W3C ANALYSIS : launching analyse for https://www.pagesjaunes.fr/annuaire/chercherlespros?quoiqui=resto&ou=Rennes+%2835000%29&univers=pagesjaunes&idOu=L03523800
ecosonar_api    | W3C ANALYSIS : https://www.pagesjaunes.fr/annuaire/chercherlespros?quoiqui=resto&ou=Rennes+%2835000%29&univers=pagesjaunes&idOu=L03523800 has been removed from result 
ecosonar_api    | W3C ANALYSIS : URL https://www.pagesjaunes.fr/annuaire/chercherlespros?quoiqui=resto&ou=Rennes+%2835000%29&univers=pagesjaunes&idOu=L03523800 cannot be found
ecosonar_api    | W3C - None of the urls analysed could be inserted
ecosonar_api    | W3C INSERT - w3c insertion failed
ecosonar_api    | LIGHTHOUSE INSERT - analysis has been insert
ecosonar_api    | GREENIT INSERT - analysis has been insert
ecosonar_api    | BEST PRACTICES INSERT - best practices have been inserted

other test with same error in logs :


ecosonar_api    | Lighthouse Analysis ended for url https://www.pagesjaunes.fr/
ecosonar_api    | W3C ANALYSIS : launching analyse for https://www.pagesjaunes.fr/ 
ecosonar_api    | W3C ANALYSIS : https://www.pagesjaunes.fr/ has been removed from result 
ecosonar_api    | W3C ANALYSIS : URL https://www.pagesjaunes.fr/ cannot be found
ecosonar_api    | W3C - None of the urls analysed could be inserted
ecosonar_api    | W3C INSERT - w3c insertion failed
ecosonar_api    | LIGHTHOUSE INSERT - analysis has been insert
ecosonar_api    | GREENIT INSERT - analysis has been insert
ecosonar_api    | BEST PRACTICES INSERT - best practices have been inserted
Capture d’écran 2023-03-01 à 23 21 53

W3C seems to not find my URL exposed on the web https://www.pagesjaunes.fr/ Why ?

thank you.

alicehaupais commented 1 year ago

Hello @dedece35

It seems like the website https://www.pagesjaunes.fr/ is blocking the W3C Validator Audit to run. If you want to run this audit outside of EcoSonar, you can use the following link : https://validator.w3.org/. When I tried to run an audit on your page, I received a 403 status code : image.

Currently EcoSonar only supports the use of the W3C Validator API to perform the audits. However we added into our roadmap to remove that dependencies (retrieving directly the HTML code to run the audit) and that should resolve the bug you encountered. I will let you know in this issue when it's resolved.

dedece35 commented 1 year ago

hi @alicehaupais,

thank you for analysis. after internal discussion, I agree with you, we have some blocking systems to avoid some attacks. We should open W3C input to get this metric.

It's ok for me.