Skip to content

ERR_INTERNAL_ASSERTION with Strapi CLI #51354

Description

@nooritaki

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.

Activity

  1. pinned this issue on Jan 4, 2024
  2. changed the title [-]Issue Encountered with Strapi CLI and Admin Dashboard on Localhost[/-] [+]`ERR_INTERNAL_ASSERTION` with Strapi CLI[/+] on Jan 4, 2024
  3. aduh95 commented on Jan 4, 2024

    @aduh95
    Contributor

    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.

  4. Klaitos commented on Jan 10, 2024

    @Klaitos

    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)

  5. aduh95 commented on Jan 10, 2024

    @aduh95
    Contributor

    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).

  6. Klaitos commented on Jan 10, 2024

    @Klaitos

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

  7. added
    netIssues and PRs related to the net subsystem.
    on Jan 11, 2024
  8. tniessen commented on Jan 11, 2024

    @tniessen
    Member

    Probably a duplicate of #51285.

  9. rrraj commented on Jan 22, 2024

    @rrraj

    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

  10. ShogunPanda commented on Jan 22, 2024

    @ShogunPanda
    Contributor

    It should have been fixed in Node 21.6.0.

  11. rrraj commented on Jan 22, 2024

    @rrraj

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

  12. avinashmaurya86 commented on Jan 28, 2024

    @avinashmaurya86

    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

  13. ShogunPanda commented on Jan 28, 2024

    @ShogunPanda
    Contributor

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

  14. unpinned this issue on Jan 29, 2024
  15. 1 remaining item

  16. avinashmaurya86 commented on Feb 26, 2024

    @avinashmaurya86
  17. avinashmaurya86 commented on Feb 26, 2024

    @avinashmaurya86
  18. ShogunPanda commented on Feb 26, 2024

    @ShogunPanda
    Contributor

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

  19. avinashmaurya86 commented on Feb 26, 2024

    @avinashmaurya86
  20. avinashmaurya86 commented on Feb 26, 2024

    @avinashmaurya86
  21. ShogunPanda commented on Feb 26, 2024

    @ShogunPanda
    Contributor

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

  22. avinashmaurya86 commented on Feb 26, 2024

    @avinashmaurya86
  23. randomhash commented on Mar 28, 2024

    @randomhash

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

  24. ShogunPanda commented on Mar 28, 2024

    @ShogunPanda
    Contributor

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

  25. aduh95 commented on Mar 28, 2024

    @aduh95
    Contributor

    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.

  26. randomhash commented on Mar 28, 2024

    @randomhash

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

  27. ShogunPanda commented on Mar 28, 2024

    @ShogunPanda
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    netIssues and PRs related to the net subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions