Skip to content

Fix:resolve cannot open electron window automatically after update node version to v18 - #2538

Merged
Keith-CY merged 2 commits into
nervosnetwork:developfrom
alexsupa597:fix/resolve-neuron-client-cannot-be-opened-automatically
Dec 5, 2022
Merged

Fix:resolve cannot open electron window automatically after update node version to v18#2538
Keith-CY merged 2 commits into
nervosnetwork:developfrom
alexsupa597:fix/resolve-neuron-client-cannot-be-opened-automatically

Conversation

@alexsupa597

@alexsupa597 alexsupa597 commented Dec 1, 2022

Copy link
Copy Markdown

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

Comment thread package.json
@Keith-CY

Keith-CY commented Dec 1, 2022

Copy link
Copy Markdown
Contributor

Please add a brief explanation if possible

@alexsupa597

Copy link
Copy Markdown
Author

Please add a brief explanation if possible

sure.

@alexsupa597

alexsupa597 commented Dec 1, 2022

Copy link
Copy Markdown
Author

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

alexsupa597 commented Dec 1, 2022

Copy link
Copy Markdown
Author

@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

@Cedar67 Cedar67 left a comment

Copy link
Copy Markdown
Contributor

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.

4 participants