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

Fix for localhost vs IP cypress testing issue #12

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

krachwal
Copy link
Collaborator

Well this was an odd one... The React frontend could interact with the Python backend using localhost when the Analyze button was click. Cypress performing the same button click did not trigger a call to the Python API. My initial fix was changing the url invoked by the button click to 127.0.0.1 instead of localhost, but the IP didn't sit right with me. I tried several other fixes, but enabling ipv4first is the only one that worked. This is due to a fairly recent change to NodeJS documented here and further explained here as setting verbatim to false in dns lookup, which prioritized ipv4 addresses over ipv6:

verbatim When true, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When false, IPv4 addresses are placed before IPv6 addresses. Default: true (addresses are not reordered).

@krachwal krachwal merged commit e9e3fe1 into main Jan 2, 2024
7 checks passed
@krachwal krachwal deleted the kate/resolve_dns_issue branch January 2, 2024 15:36
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

Successfully merging this pull request may close these issues.

None yet

2 participants