Skip to content

connection properties parsing provocates crash in 8.3.x! (TypeError [ERR_INVALID_ARG_TYPE]) #2290

Closed
@Apollon77

Description

@Apollon77

We see a crash that happens in pg 8.3.x without changing anything. I was able to dig it down to 8.2.2 working fine 8.3.0 breaks.

TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type object
    at Function.byteLength (buffer.js:515:11)
    at Writer.addCString (C:\projects\ioBroker.sql\tmp\node_modules\iobroker.sql\node_modules\pg-protocol\dist\buffer-writer.js:41:30)
    at Object.startup (C:\projects\ioBroker.sql\tmp\node_modules\iobroker.sql\node_modules\pg-protocol\dist\serializer.js:9:32)
    at Connection.startup (C:\projects\ioBroker.sql\tmp\node_modules\iobroker.sql\node_modules\pg\lib\connection.js:118:31)
    at Connection.<anonymous> (C:\projects\ioBroker.sql\tmp\node_modules\iobroker.sql\node_modules\pg\lib\client.js:118:11)
    at Connection.emit (events.js:198:13)
    at Socket.<anonymous> (C:\projects\ioBroker.sql\tmp\node_modules\iobroker.sql\node_modules\pg\lib\connection.js:49:10)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:203:15)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1093:10)

This also happens in Travis/Appveyor.
Connection properties are:
{"server":"localhost","host":"localhost","user":"postgres","password":"Password12!","max_idle":2,"max_active":100,"max_wait":10000,"when_exhausted":"block","options":{"encrypt":false}}

Failing build with 8.3: https://travis-ci.org/github/ioBroker/ioBroker.sql/builds/709730547
Working build with 8.2 (no other changes): https://travis-ci.org/github/ioBroker/ioBroker.sql/builds/709722736

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions