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

Zombie Headless Browser challenges #54036

Open
lasjorg opened this issue Mar 9, 2024 · 2 comments
Open

Zombie Headless Browser challenges #54036

lasjorg opened this issue Mar 9, 2024 · 2 comments
Labels
scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.

Comments

@lasjorg
Copy link
Contributor

lasjorg commented Mar 9, 2024

Describe the Issue

Setting Browser.site = "http://localhost:3000"; causes the error TypeError: bind EINVAL 0.0.0.0

Using Browser.site = "http://0.0.0.0:3000";

Or forcing the DNS result order (setDefaultResultOrder)

// add before the test code
const dns = require('dns');
dns.setDefaultResultOrder('ipv4first');

fixes it.


The best I can tell, in newer versions of Node the DNS result order has changed (might have been in v17). We had to fix a different challenge at one point to allow IPv6 IPs. I think this issue is related.

Not sure what the best solution is but we might have to update the boilerplate or the challenge text. We can force the result order in the boilerplate if needed.

Edit: My best guess why we haven't seen this issue more is because we (at least at one point) forced the engine in package.json and possibly Replit running older versions of Node for a long time. I believe most people will see it locally with new versions of Node and I see it on Gitpod running Node 20.

Affected Page

https://www.freecodecamp.org/learn/quality-assurance/quality-assurance-and-testing-with-chai/simulate-actions-using-a-headless-browser

Your code




Expected behavior

Not to get an error with the code the challenge tells you to use.

Screenshots

No response

System

  • Device: [e.g. iPhone 6, Laptop]
  • OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
  • Browser: [e.g. Chrome, Safari]
  • Version: [e.g. 22]

Additional context

Forum: https://forum.freecodecamp.org/t/qa-testing-w-chai-were-the-last-2-tests-ever-fixed/678150

@lasjorg lasjorg added type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. labels Mar 9, 2024
@fuelmessenger

This comment was marked as spam.

@naomi-lgbt
Copy link
Member

I think updating the challenge text to expect Using Browser.site = "http://0.0.0.0:3000"; is good.

@naomi-lgbt naomi-lgbt added status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. and removed status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. labels Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Projects
None yet
Development

No branches or pull requests

3 participants