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

TypeError: Cannot set property 'flowing' of undefined #27

Open
pedrost opened this issue Sep 18, 2019 · 1 comment
Open

TypeError: Cannot set property 'flowing' of undefined #27

pedrost opened this issue Sep 18, 2019 · 1 comment

Comments

@pedrost
Copy link

pedrost commented Sep 18, 2019

Trying to connect to a web socket with a proxy agent (tor)
Using ubuntu 18
Node v8.16.1

The message is sent to the endpoit at ngrok.io, but the application crashes right after.

Code:

const Agent = require("socks5-http-client/lib/Agent"); // Constructor 

let agent = new Agent({
    socksHost: 'localhost', // Defaults to 'localhost'.
    socksPort: 9050 // Defaults to 1080.
});

var socket = require('socket.io-client').connect('http://38d7b774.ngrok.io', { agent: agent });

socket.on('connect', function() {
    socket.emit('send', 'random');
});

Error:

_http_client.js:486
     socket._readableState.flowing = null;
                                   ^
TypeError: Cannot set property 'flowing' of undefined
   at Socks5ClientSocket.socketOnData (_http_client.js:486:37)
   at emitOne (events.js:116:13)
   at Socks5ClientSocket.emit (events.js:211:7)
   at Socket.<anonymous> (/home/caramori/Documents/Jera/Node/trk-core/node_modules/socks5-client/lib/Socket.js:150:8)
   at emitOne (events.js:116:13)
   at Socket.emit (events.js:211:7)
   at addChunk (_stream_readable.js:263:12)
   at readableAddChunk (_stream_readable.js:250:11)
   at Socket.Readable.push (_stream_readable.js:208:10)
   at TCP.onread (net.js:601:20)

@dayves
Copy link

dayves commented Sep 24, 2019

same on ubuntu 16.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants