mozilla / FoxPuppet

Other
17 stars 14 forks source link

Fix(project): Fix Failing tests #317

Open Temidayo32 opened 2 days ago

Temidayo32 commented 2 days ago

fix(project): Fix Failing tests

Because

This commit

Fixes #308

b4handjr commented 2 days ago

Can you fix the name of this PR as well as check the output from the checks.

Temidayo32 commented 2 days ago

Can you fix the name of this PR as well as check the output from the checks.

Thanks @b4handjr. The tests are now passing here.

b4handjr commented 2 days ago

When you would like a review, please request one. Thanks.

Temidayo32 commented 2 days ago

@b4handjr I would like to request a review for my PR. Could you please review my PR? I would appreciate it.

Temidayo32 commented 2 days ago

This is a good start, but I am trying to run this locally and I can't. I am having some DNS resolution errors. Could you provide a fix for this?

Here is the error

E       selenium.common.exceptions.WebDriverException: Message: Reached error page: about:neterror?e=connectionFailure&u=http%3A//0.0.0.0%3A8000/&c=UTF-8&d=Firefox%20can%E2%80%99t%20establish%20a%20connection%20to%20the%20server%20at%200.0.0.0%3A8000.
E       Stacktrace:
E       RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
E       WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5
E       UnknownError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:832:5
E       checkReadyState@chrome://remote/content/marionette/navigate.sys.mjs:58:24
E       onNavigation@chrome://remote/content/marionette/navigate.sys.mjs:344:39
E       emit@resource://gre/modules/EventEmitter.sys.mjs:148:20
E       receiveMessage@chrome://remote/content/marionette/actors/MarionetteEventsParent.sys.mjs:33:25

Thanks for pointing it out. I will review promptly.

cashall-0 commented 1 day ago

is this issue fixed? seems like a blocker to successfully fix other issues.

Temidayo32 commented 1 day ago

This is a good start, but I am trying to run this locally and I can't. I am having some DNS resolution errors. Could you provide a fix for this?

Here is the error

E       selenium.common.exceptions.WebDriverException: Message: Reached error page: about:neterror?e=connectionFailure&u=http%3A//0.0.0.0%3A8000/&c=UTF-8&d=Firefox%20can%E2%80%99t%20establish%20a%20connection%20to%20the%20server%20at%200.0.0.0%3A8000.
E       Stacktrace:
E       RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
E       WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5
E       UnknownError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:832:5
E       checkReadyState@chrome://remote/content/marionette/navigate.sys.mjs:58:24
E       onNavigation@chrome://remote/content/marionette/navigate.sys.mjs:344:39
E       emit@resource://gre/modules/EventEmitter.sys.mjs:148:20
E       receiveMessage@chrome://remote/content/marionette/actors/MarionetteEventsParent.sys.mjs:33:25

Hi @b4handjr Here is my approach to fixing the problem.

The error shows there is a DNS resolution issue when trying to access http://0.0.0.0:8000/. And this is because0.0.0.0 is being used as the host, which can cause issues in some environments. To solve this problem, I explicitly assigned 127.0.0.1 as the host in the conftest.py. Secondly, I also intoduced a new helper method get_free_port to dynamically assign any free port so as to avoid port conflicts too.

b4handjr commented 1 day ago

is this issue fixed? seems like a blocker to successfully fix other issues.

You can try solving this as well, if you have an idea of how you think it should be done.

b4handjr commented 1 day ago

This is a good start, but I am trying to run this locally and I can't. I am having some DNS resolution errors. Could you provide a fix for this? Here is the error

E       selenium.common.exceptions.WebDriverException: Message: Reached error page: about:neterror?e=connectionFailure&u=http%3A//0.0.0.0%3A8000/&c=UTF-8&d=Firefox%20can%E2%80%99t%20establish%20a%20connection%20to%20the%20server%20at%200.0.0.0%3A8000.
E       Stacktrace:
E       RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
E       WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5
E       UnknownError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:832:5
E       checkReadyState@chrome://remote/content/marionette/navigate.sys.mjs:58:24
E       onNavigation@chrome://remote/content/marionette/navigate.sys.mjs:344:39
E       emit@resource://gre/modules/EventEmitter.sys.mjs:148:20
E       receiveMessage@chrome://remote/content/marionette/actors/MarionetteEventsParent.sys.mjs:33:25

Hi @b4handjr Here is my approach to fixing the problem.

The error shows there is a DNS resolution issue when trying to access http://0.0.0.0:8000/. And this is because0.0.0.0 is being used as the host, which can cause issues in some environments. To solve this problem, I explicitly assigned 127.0.0.1 as the host in the conftest.py. Secondly, I also intoduced a new helper method get_free_port to dynamically assign any free port so as to avoid port conflicts too.

Thanks, I will take a look. Also, your follow up commits don't need to be in the commit format for the PR, you can just leave a short message using git commit -m "message here" outlining what the specific commit did.