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

Call to undefined function #19983

Closed
rojvv opened this issue Jul 30, 2023 · 0 comments · Fixed by #20120
Closed

Call to undefined function #19983

rojvv opened this issue Jul 30, 2023 · 0 comments · Fixed by #20120
Assignees
Labels
bug Something isn't working correctly node compat

Comments

@rojvv
Copy link
Contributor

rojvv commented Jul 30, 2023

tlssock._start();

Stack trace
Unable to connect to the database SequelizeConnectionError: tlssock._start is not a function
    at Client._connectionCallback (file:///home/roj/.cache/deno/npm/registry.npmjs.org/sequelize/6.32.1/lib/dialects/postgres/connection-manager.js:147:20)
    at Client._handleErrorWhileConnecting (file:///home/roj/.cache/deno/npm/registry.npmjs.org/pg/8.11.1/lib/client.js:327:19)
    at Client._handleErrorEvent (file:///home/roj/.cache/deno/npm/registry.npmjs.org/pg/8.11.1/lib/client.js:337:19)
    at Connection.emit (ext:deno_node/_events.mjs:382:28)
    at Socket.<anonymous> (file:///home/roj/.cache/deno/npm/registry.npmjs.org/pg/8.11.1/lib/connection.js:102:21)
    at Object.onceWrapper (ext:deno_node/_stream.mjs:1929:30)
    at Socket.emit (ext:deno_node/_stream.mjs:1852:9)
    at addChunk (ext:deno_node/_stream.mjs:2874:16)
    at readableAddChunk (ext:deno_node/_stream.mjs:2853:13)
    at Socket.Readable.push (ext:deno_node/_stream.mjs:2792:14) {
  name: "SequelizeConnectionError",
  parent: TypeError: tlssock._start is not a function
    at Object.connect (ext:deno_node/_tls_wrap.ts:334:17)
    at getSecureStream (file:///home/roj/.cache/deno/npm/registry.npmjs.org/pg/8.11.1/lib/stream.js:23:16)
    at Socket.<anonymous> (file:///home/roj/.cache/deno/npm/registry.npmjs.org/pg/8.11.1/lib/connection.js:100:23)
    at Object.onceWrapper (ext:deno_node/_stream.mjs:1929:30)
    at Socket.emit (ext:deno_node/_stream.mjs:1852:9)
    at addChunk (ext:deno_node/_stream.mjs:2874:16)
    at readableAddChunk (ext:deno_node/_stream.mjs:2853:13)
    at Socket.Readable.push (ext:deno_node/_stream.mjs:2792:14)
    at TCP.onStreamRead [as onread] (ext:deno_node/internal/stream_base_commons.ts:190:29)
    at TCP.#read (ext:deno_node/internal_binding/stream_wrap.ts:245:18),
  original: TypeError: tlssock._start is not a function
    at Object.connect (ext:deno_node/_tls_wrap.ts:334:17)
    at getSecureStream (file:///home/roj/.cache/deno/npm/registry.npmjs.org/pg/8.11.1/lib/stream.js:23:16)
    at Socket.<anonymous> (file:///home/roj/.cache/deno/npm/registry.npmjs.org/pg/8.11.1/lib/connection.js:100:23)
    at Object.onceWrapper (ext:deno_node/_stream.mjs:1929:30)
    at Socket.emit (ext:deno_node/_stream.mjs:1852:9)
    at addChunk (ext:deno_node/_stream.mjs:2874:16)
    at readableAddChunk (ext:deno_node/_stream.mjs:2853:13)
    at Socket.Readable.push (ext:deno_node/_stream.mjs:2792:14)
    at TCP.onStreamRead [as onread] (ext:deno_node/internal/stream_base_commons.ts:190:29)
    at TCP.#read (ext:deno_node/internal_binding/stream_wrap.ts:245:18)
}
Reproduction
import { Sequelize } from "npm:[email protected]";
// deno-types="npm:@types/[email protected]"
import _pg from "npm:[email protected]";

const sequelize = new Sequelize(
  "postgres:https://jcelrjot:[email protected]/jcelrjot",
  {
    dialectOptions: {
      ssl: { require: true, rejectUnauthorized: false },
    },
  },
);

await sequelize.authenticate();

https://stackoverflow.com/questions/76795350/sequelize-can-not-connect-to-postgressql-in-deno

@bartlomieju bartlomieju added bug Something isn't working correctly node compat labels Jul 31, 2023
littledivy added a commit that referenced this issue Aug 11, 2023
littledivy added a commit to littledivy/deno that referenced this issue Aug 21, 2023
littledivy added a commit that referenced this issue Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat
Projects
None yet
3 participants