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

ERR_INTERNAL_ASSERTION with Strapi CLI #51354

Closed
nooritaki opened this issue Jan 3, 2024 · 24 comments
Closed

ERR_INTERNAL_ASSERTION with Strapi CLI #51354

nooritaki opened this issue Jan 3, 2024 · 24 comments
Labels
net Issues and PRs related to the net subsystem.

Comments

@nooritaki
Copy link

nooritaki commented Jan 3, 2024

Version

Node.js v20.10.0

Platform

VSCode PowerShell Terminal

Subsystem

No response

What steps will reproduce the bug?

No response

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior? Why is that the expected behavior?

No response

What do you see instead?

Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

    at assert (node:internal/assert:14:11)
    at internalConnectMultiple (node:net:1118:3)
    at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
    at listOnTimeout (node:internal/timers:575:11)
    at process.processTimers (node:internal/timers:514:7) {
  code: 'ERR_INTERNAL_ASSERTION'
}

Additional information

I am reaching out to seek assistance regarding an issue I encountered after installing the Strapi CLI within the VSCode terminal and accessing the Strapi admin dashboard via http://localhost:1337/admin.

Issue Overview:
After successful installation of the Strapi CLI, I launched the Strapi admin dashboard on my local server at http://localhost:1337/admin. While navigating through the dashboard, I observed inconsistent behavior. I was able to create an account and occasionally create content titles. However, I faced recurring difficulties when attempting to upload image items. Upon refreshing the browser, the following error message was consistently displayed:

"This site can’t be reached - localhost refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED"
Moreover, the VSCode terminal generated an error message (as enclosed below) which I believe is associated with the issue:

Error Message in VSCode Terminal:

Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

at assert (node:internal/assert:14:11)
at internalConnectMultiple (node:net:1118:3)
at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
at listOnTimeout (node:internal/timers:575:11)
at process.processTimers (node:internal/timers:514:7) {
  code: 'ERR_INTERNAL_ASSERTION'
}

Request for Assistance:
I have attempted troubleshooting steps, including reinstalling the Strapi CLI and checking for potential firewall or connectivity issues, but the problem persists. I am uncertain whether this issue is related to a bug in Node.js or if it pertains to incorrect usage of Node.js internals.

Could you kindly provide guidance or assistance to rectify this issue? Any insights, suggestions, or steps to further diagnose and resolve this matter would be greatly appreciated.

Thank you for your time and support. Please let me know if any additional information or logs are required to assist in troubleshooting this issue.

@aduh95 aduh95 pinned this issue Jan 4, 2024
@aduh95 aduh95 changed the title Issue Encountered with Strapi CLI and Admin Dashboard on Localhost ERR_INTERNAL_ASSERTION with Strapi CLI Jan 4, 2024
@aduh95
Copy link
Contributor

aduh95 commented Jan 4, 2024

There are a lot of similar looking reports at strapi/strapi#18084. It seems a workaround for Strapi users is to downgrade to Node.js 18.x or upgrade to 21.x until the fix is backported to 20.x.

@aduh95
Copy link
Contributor

aduh95 commented Jan 4, 2024

@Klaitos
Copy link

Klaitos commented Jan 10, 2024

We encounter the same issue on every fastify servers we have on our side. The stack trace is exactly the same, happening on node 20.10 (not using Strapi CLI)

@aduh95
Copy link
Contributor

aduh95 commented Jan 10, 2024

Hopefully it's been fixed by #51045 already (which is on the 21.x release line, and should be in the next 20.x release).

@Klaitos
Copy link

Klaitos commented Jan 10, 2024

I did not found it in 20.11 changelog, waiting for 20.12 I guess, thanks for pointing me the potential fix.

@tniessen tniessen added the net Issues and PRs related to the net subsystem. label Jan 11, 2024
@tniessen
Copy link
Member

Probably a duplicate of #51285.

@rrraj
Copy link

rrraj commented Jan 22, 2024

I'm using Node.js v21.2.0, and still encountering this issue. Please suggest what can I do to resolve this issue. Thanks :)

#51487

@ShogunPanda
Copy link
Contributor

It should have been fixed in Node 21.6.0.

@rrraj
Copy link

rrraj commented Jan 22, 2024

@ShogunPanda I'll check now, Thanks for your response !👍

@avinashmaurya86
Copy link

node:internal/assert:14
throw new ERR_INTERNAL_ASSERTION(message);
^

Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

at assert (node:internal/assert:14:11)
at internalConnectMultiple (node:net:1118:3)
at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
at listOnTimeout (node:internal/timers:575:11)
at process.processTimers (node:internal/timers:514:7) {

code: 'ERR_INTERNAL_ASSERTION'
}

This error occurs while uploading images in strapi admin dashboard.
and the Strapi localhost shutdown automatically

@ShogunPanda
Copy link
Contributor

@avinashmaurya86 This should be fixed in 21.6.0, can you please check?

@malditogeek
Copy link

@ShogunPanda do you know if this will be backported to 20.x and if so, when 20.12.0 will be released?

@avinashmaurya86
Copy link

avinashmaurya86 commented Feb 26, 2024 via email

@avinashmaurya86
Copy link

avinashmaurya86 commented Feb 26, 2024 via email

@ShogunPanda
Copy link
Contributor

@malditogeek Yes, it will be included in 20.12.0. Not sure about the release date tho.

@avinashmaurya86
Copy link

avinashmaurya86 commented Feb 26, 2024 via email

@avinashmaurya86
Copy link

avinashmaurya86 commented Feb 26, 2024 via email

@ShogunPanda
Copy link
Contributor

@avinashmaurya86 Because network family autoselection is disabled by default in 18. It was turned on by default in 20.

@avinashmaurya86
Copy link

avinashmaurya86 commented Feb 26, 2024 via email

@randomhash
Copy link

could you please backport it somehow into the 20.10.10? As lambda version affected also

@ShogunPanda
Copy link
Contributor

There is no 20.10.10 version. Are you sure it's the right number?

@aduh95
Copy link
Contributor

aduh95 commented Mar 28, 2024

I think the fix has been backported to 20.12.0, we can probably close this now. If you're still experiencing this on Node.js 20.12.0 or later, please open a new issue.

@aduh95 aduh95 closed this as completed Mar 28, 2024
@randomhash
Copy link

@ShogunPanda
Sorry, the version is 20.11.1
Still getting errors in it

@ShogunPanda
Copy link
Contributor

I see.
I think Lambda will update the runtime in couple of months at most.
For the time being, you can set the NODE_OPTIONS environment variables to to include --no-network-family-autoselection to disable the offending behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Issues and PRs related to the net subsystem.
Projects
None yet
Development

No branches or pull requests

9 participants