Skip to content

nodejs - Maximum call stack size exceeded #66

@donl

Description

@donl

Newer versions of nodejs tend to crash when an acebase-client attempts to connect to a server that is returning an error.

I assume this is more of an issue with nodejs -- however I wanted to bring it to your attention.

import { AceBaseClient } from "acebase-client";

let settings = {
    host: 'httpstat.us/500',
    port: 443,
    https: true,
};

let db = new AceBaseClient(settings);

db.ready().then(() => { console.log("ready"); });

results in the following crash:

node:internal/event_target:1090
  process.nextTick(() => { throw err; });
                           ^

RangeError: Maximum call stack size exceeded
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:824:9)
    at WebSocket.dispatchEvent (node:internal/event_target:751:26)
    at fireEvent (node:internal/deps/undici/undici:11334:14)
    at failWebsocketConnection (node:internal/deps/undici/undici:11415:9)
    at closeWebSocketConnection (node:internal/deps/undici/undici:11686:9)
    at WebSocket.close (node:internal/deps/undici/undici:12346:9)
    at WS.doClose (C:\Users\user\projects\acebase-client-stack\node_modules\engine.io-client\lib\transports\websocket.js:248:13)
    at Transport.close (C:\Users\user\projects\acebase-client-stack\node_modules\engine.io-client\lib\transport.js:98:10)
    at Socket.onClose (C:\Users\user\projects\acebase-client-stack\node_modules\engine.io-client\lib\socket.js:713:20)
    at Socket.onError (C:\Users\user\projects\acebase-client-stack\node_modules\engine.io-client\lib\socket.js:691:8)

Node.js v22.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions