Skip to content

JSStream ReadStream Assertion Failure #3970

Closed
@Havvy

Description

Minimal test case:

"use strict";

const NetSocket = require("net").Socket;
const tls = require("tls");
const netSocket = new NetSocket();
netSocket.setEncoding("utf-8");
const tlsSocket = tls.connect({socket: netSocket, rejectUnauthorized: false, isServer: false});
netSocket.connect({port: 6697, host: "irc.freenode.net"});

Results in:

node: ../src/js_stream.cc:180: static void node::JSStream::ReadBuffer(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `Buffer::HasInstance(args[0])' failed.

Note that the setEncoding call is the crucial bit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    c++Issues and PRs that require attention from people who are familiar with C++.tlsIssues and PRs related to the tls subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions