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

Error: Uncaught ConnectionError due to TLSSocket._start not set in deno_std/node #16681

Closed
jerebtw opened this issue Nov 17, 2022 · 1 comment · Fixed by #20120
Closed

Error: Uncaught ConnectionError due to TLSSocket._start not set in deno_std/node #16681

jerebtw opened this issue Nov 17, 2022 · 1 comment · Fixed by #20120
Assignees
Labels
bug Something isn't working correctly node compat

Comments

@jerebtw
Copy link

jerebtw commented Nov 17, 2022

I tried to use npm:mssql and go this problem:

(With node this works without a problem)

error: Uncaught ConnectionError: Failed to connect to SQLServer:undefined - tlssock._start is not a function
    at file:https:///C:/Users/jerebtw/AppData/Local/deno/npm/registry.npmjs.org/mssql/9.0.1/lib/tedious/connection-pool.js:70:17
    at Connection.onConnect (file:https:///C:/Users/jerebtw/AppData/Local/deno/npm/registry.npmjs.org/tedious/15.1.2/lib/connection.js:1012:9)
    at Object.onceWrapper (https://deno.land/[email protected]/node/_events.mjs:504:26)
    at Connection.emit (https://deno.land/[email protected]/node/_events.mjs:379:28)
    at Connection.emit (file:https:///C:/Users/jerebtw/AppData/Local/deno/npm/registry.npmjs.org/tedious/15.1.2/lib/connection.js:1040:18)
    at Connection.socketError (file:https:///C:/Users/jerebtw/AppData/Local/deno/npm/registry.npmjs.org/tedious/15.1.2/lib/connection.js:1395:12)
    at file:https:///C:/Users/jerebtw/AppData/Local/deno/npm/registry.npmjs.org/tedious/15.1.2/lib/connection.js:2402:25
    at Object.runMicrotasks (deno:core/01_core.js:377:30)
    at processTicksAndRejections (https://deno.land/[email protected]/node/_next_tick.ts:62:10)
import sql from "npm:mssql";

const connectionPool = new sql.ConnectionPool({
  server: "SQLServer\\Test",
  database: "Test",
  user: "user",
  password: "password",
  options: {
    trustedConnection: true,
    trustServerCertificate: true,
  },
});

const connection = await connectionPool.connect();
console.log("Connected");
@dsherret dsherret added bug Something isn't working correctly node compat labels Nov 17, 2022
@dsherret
Copy link
Member

Investigated and this error occurs here:

TypeError: tlssock._start is not a function
    at Object.connect (https://deno.land/[email protected]/node/_tls_wrap.ts:373:13)
    at file:https:///C:/Users/david/AppData/Local/deno/npm/registry.npmjs.org/tedious/15.1.2/lib/message-io.js:74:24
    at new Promise (<anonymous>)
    at MessageIO.startTls (file:https:///C:/Users/david/AppData/Local/deno/npm/registry.npmjs.org/tedious/15.1.2/lib/message-io.js:71:12)
    at file:https:///C:/Users/david/AppData/Local/deno/npm/registry.npmjs.org/tedious/15.1.2/lib/connection.js:2401:34
    at Object.runMicrotasks (deno:core/01_core.js:377:30)
    at processTicksAndRejections (https://deno.land/[email protected]/node/_next_tick.ts:62:10)

It seems that _start function is never set in deno_std. I opened #18303

@dsherret dsherret changed the title Error: Uncaught ConnectionError Error: Uncaught ConnectionError due to TLSSocket._start not set in deno_std/node Nov 17, 2022
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