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:resolve cannot open electron window automatically after update node version to v18 #2538

Conversation

alexsupa597
Copy link
Contributor

@alexsupa597 alexsupa597 commented Dec 1, 2022

What problem does this PR solve?

After updating our node version to v18, we got a problem that the neuron client cannot be opened automatically.

Ref: Magickbase/neuron-public-issues#80

before:
image

after:
image

Check List

Test

e2e Test

Task

none

package.json Show resolved Hide resolved
@Keith-CY
Copy link
Collaborator

Keith-CY commented Dec 1, 2022

Please add a brief explanation if possible

@alexsupa597
Copy link
Contributor Author

Please add a brief explanation if possible

sure.

@alexsupa597
Copy link
Contributor Author

alexsupa597 commented Dec 1, 2022

react-scripts start launches a dev server on IPv4 (because https://github.com/facebook/create-react-app/blob/d960b9e38c062584ff6cfb1a70e1512509a966e7/packages/react-scripts/scripts/start.js#L56 specifies that it listens on "0.0.0.0", an IPv4 address). wait-on http://localhost:3000 tries to connect over IPv6 and fails. By changing the command to wait-on http://127.0.0.1:3000, wait-on will make an IPv4 request and succeed, allowing electron to open.

Here's a related thread about other people running into this issue with wait-on and working around it similarly: jeffbski/wait-on#109

@alexsupa597
Copy link
Contributor Author

alexsupa597 commented Dec 1, 2022

@Cedar67 Could you please verify it on Linux and Windows also?

@alexsupa597 alexsupa597 changed the title Fix:resolve cannot open electron window automatically after update node version upon v18 Fix:resolve cannot open electron window automatically after update node version to v18 Dec 2, 2022
Copy link
Contributor

@Cedar67 Cedar67 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on Windows and Mac OS.

@Keith-CY Keith-CY merged commit d3a576b into nervosnetwork:develop Dec 5, 2022
@alexsupa597 alexsupa597 deleted the fix/resolve-neuron-client-cannot-be-opened-automatically branch December 6, 2022 08:48
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

4 participants