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

Lighthouse audits not working, #12

Closed
bikker opened this issue Jul 23, 2020 · 20 comments
Closed

Lighthouse audits not working, #12

bikker opened this issue Jul 23, 2020 · 20 comments

Comments

@bikker
Copy link

bikker commented Jul 23, 2020

Lighthouse audits not working, i tested both in docker and normal installation it just wont save the url when we submit the url. Google api is added to env

@StanGirard
Copy link
Owner

StanGirard commented Jul 23, 2020

Could you please provide some logs?
What is the URL you tried? Can you try with https://primates.dev ?

The request takes some time. If you have refreshed the page after sending the request please keep refreshing.

Lighthouse audits can sometimes take a long time. I've implemented on the celery branch a new functionality that should help with the waiting.

Here a sneak pic:
Capture d’écran 2020-07-23 à 22 47 05

@StanGirard
Copy link
Owner

Please try the new release and let me know if the issue is still here.

Please note that you need to install Redis for this new version to work.

@StanGirard
Copy link
Owner

Closing issue. If the problem still exists please reopen it

@bikker
Copy link
Author

bikker commented Aug 7, 2020

just did a fresh new install same issue ,this is my env file
SQLALCHEMY_DATABASE_URI=sqlite:///database.db
GOOGLE_API_KEYS= MY KEY ADDED HERE

and installed redis-server and its up , installed as per requirements using pip3

http://lh.scalingweb.com/ < u can test here its live here

@StanGirard
Copy link
Owner

Hello, what are the logs of the celery worker ?

Have you started it with: celery worker -A celery_worker.celery --loglevel=info ?

@bikker
Copy link
Author

bikker commented Aug 7, 2020

yes i did, whats the defualt path for log file for celery in ubuntu?

@StanGirard
Copy link
Owner

Well you need to keep the script running.

In order to run the SEO toolkit you need to open three terminals. In each run:

  • python3 run.py
  • redis-server
  • celery worker -A celery_worker.celery --loglevel=info

And keep the scripts running.

@StanGirard StanGirard reopened this Aug 7, 2020
@StanGirard
Copy link
Owner

After looking at your website. It seems that none of the tools are working. It is probably because the celery worker is not running.

@bikker
Copy link
Author

bikker commented Aug 7, 2020

[2020-08-07 20:49:07,257: ERROR/ForkPoolWorker-3] Task Lighthouse[cfbb104e-07d0-4d0a-bffe-a9ee1be7ac29] raised unexpected: KeyError('lighthouseResult',)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/celery/app/trace.py", line 412, in trace_task
R = retval = fun(*args, **kwargs)
File "/SEOToolkit/toolkit/celery_utils.py", line 7, in call
return TaskBase.call(self, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/celery/app/trace.py", line 704, in protected_call
return self.run(*args, **kwargs)
File "/SEOToolkit/toolkit/celeryapp/tasks.py", line 35, in LighthouseAudit
accessibility = int(math.floor(value["lighthouseResult"]["categories"]["accessibility"]["score"] * 100))
KeyError: 'lighthouseResult'

@StanGirard
Copy link
Owner

After trying with my own project. It seems like you have an error with your google apikey

@bikker
Copy link
Author

bikker commented Aug 7, 2020

Thank you ! its working now ! , last question how can i secure this with a login ?

@StanGirard
Copy link
Owner

You are welcome !

Well there aren't any login option right now but you can implement an Http basic authentication on the nginx/apache side:
https://developer.mozilla.org/docs/Web/HTTP/Authentication

@bikker
Copy link
Author

bikker commented Aug 7, 2020

where can i switch the lighthouse to change the scores from desktop to mobile !

@StanGirard
Copy link
Owner

I have not yet implemented it. There is going to be a big update in a month or so that should add many features

@bikker
Copy link
Author

bikker commented Aug 7, 2020

i understand that but
https://googlechrome.github.io/lighthouse/viewer/?psiurl=https%3A%2F%2Fintodns.com%2F&strategy=mobile&category=performance&category=accessibility&category=best-practices&category=seo

like this url fetches the json for lighthouse if u change strategy=mobile or strtegy=desktop that gives those , in which file have you added the url in the code which i can go edit, i looked and didnt find in any yet

@StanGirard
Copy link
Owner

@bikker
Copy link
Author

bikker commented Aug 7, 2020

THANK YOU !

@StanGirard
Copy link
Owner

Please bare with me. I'm doing this as a side project and I don't have a lot of free time. New functionalities should be arriving each month.

End goal is to build a free toolkit to audit websites in depth.

@StanGirard
Copy link
Owner

And feel free to give me any feedback or even make some pull requests :)

@bikker
Copy link
Author

bikker commented Aug 7, 2020

sure ! will help as much as i can by testing ! :) thank you

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

No branches or pull requests

2 participants