Skip to content

exception in xhr-multipart.js (in 0.6.17) when client.send() is called #189

Closed
@gkostov

Description

@gkostov

Yesterday we updated to 0.6.17 and those exceptions started to pop:
TypeError: Cannot call method 'write' of null
at [object Object]._write (/root/root/.npm/socket.io/0.6.17/package/lib/socket.io/transports/xhr-multipart.js:64:19)
at [object Object].send (/root/root/.npm/socket.io/0.6.17/package/lib/socket.io/client.js:32:8)
at ....
The code that throws it is:
63: this.response.write("Content-Type: text/plain" + (message.length === 1 && message.charCodeAt(0) === 6 ? "; charset=us-ascii" : "") + "\n\n");
64: this.response.write(message + "\n"); // this throws the exception because this.response is null !?!?

so appears that somehow the "response" property is null on line 64 but has been still there on line 63.
I'm trying to figure out when exactly it happens and if this may be due to a fault on our other code but so far it does not seem so. On the next fail I'll have a print of the "message" to check if that may have gone terribly wrong (a simple object is passed to .send() so should be nothing unusual).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions