neumino / rethinkdbdash

An advanced Node.js driver for RethinkDB with a connection pool, support for streams etc.
MIT License
848 stars 108 forks source link

Unhandled rejection TypeError: Cannot create property 'value' on string '1' #313

Closed ghost closed 8 years ago

ghost commented 8 years ago

I get this error when selecting data from a table. It works but the error keeps printing in my console.

Unhandled rejection TypeError: Cannot create property 'value' on string '1' at Object.getCanonicalAddress (/Users/pixel/Desktop/test/node_modules/rethinkdbdash/lib/helper.js:146:22) at PoolMaster.handleAllServersResponse (/Users/pixel/Desktop/test/node_modules/rethinkdbdash/lib/pool_master.js:183:27) at /Users/pixel/Desktop/test/node_modules/rethinkdbdash/lib/pool_master.js:324:16 at resolve (/Users/pixel/Desktop/test/node_modules/rethinkdbdash/lib/cursor.js:238:21) at tryCatcher (/Users/pixel/Desktop/test/node_modules/rethinkdbdash/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/pixel/Desktop/test/node_modules/rethinkdbdash/node_modules/bluebird/js/release/promise.js:510:31) at Promise._settlePromise (/Users/pixel/Desktop/test/node_modules/rethinkdbdash/node_modules/bluebird/js/release/promise.js:567:18) at Promise._settlePromise0 (/Users/pixel/Desktop/test/node_modules/rethinkdbdash/node_modules/bluebird/js/release/promise.js:612:10) at Promise._settlePromises (/Users/pixel/Desktop/test/node_modules/rethinkdbdash/node_modules/bluebird/js/release/promise.js:691:18) at Async._drainQueue (/Users/pixel/Desktop/test/node_modules/rethinkdbdash/node_modules/bluebird/js/release/async.js:138:16) at Async._drainQueues (/Users/pixel/Desktop/test/node_modules/rethinkdbdash/node_modules/bluebird/js/release/async.js:148:10) at Immediate.Async.drainQueues (/Users/pixel/Desktop/test/node_modules/rethinkdbdash/node_modules/bluebird/js/release/async.js:17:14) at tryOnImmediate (timers.js:610:5) at processImmediate [as _immediateCallback] (timers.js:582:5)

neumino commented 8 years ago

What do these two queries return:

r.db('rethinkdb').table('server_config')
r.db('rethinkdb').table('server_status')
ghost commented 8 years ago

This error only occurs when I initiate RethinkDBDash with discovery mode enabled.

r.db('rethinkdb').table('server_config') [ { cache_size_mb: 'auto', id: '9e5da1c4-28ee-412e-b722-26677c299678', name: 'local', tags: [ 'default' ] } ]

r.db('rethinkdb').table('server_status') [ { id: '9e5da1c4-28ee-412e-b722-26677c299678', name: 'local', network: { canonical_addresses: [Object], cluster_port: 29015, connected_to: {}, hostname: 'osxlocal.local', http_admin_port: 8080, reql_port: 28015, time_connected: 2016-11-19T08:43:47.963Z }, process: { argv: [Object], cache_size_mb: 2666.87890625, pid: 852, time_started: 2016-11-19T08:43:47.961Z, version: 'rethinkdb 2.3.5 (CLANG 7.3.0 (clang-703.0.31))' } } ]

neumino commented 8 years ago

Can you paste the full nested object?

ghost commented 8 years ago

Sure

{ "id": "9e5da1c4-28ee-412e-b722-26677c299678" , "name": "local" , "network": { "canonical_addresses": [ { "host": "127.0.0.1" , "port": 29015 } , { "host": "::1" , "port": 29015 } ] , "cluster_port": 29015 , "connected_to": { } , "hostname": "osxlocal.local" , "http_admin_port": 8080 , "reql_port": 28015 , "time_connected": Mon Nov 21 2016 19:01:10 GMT+00:00 } , "process": { "argv": [ "rethinkdb" ] , "cache_size_mb": 1571.947265625 , "pid": 13695 , "time_started": Mon Nov 21 2016 19:01:10 GMT+00:00 , "version": "rethinkdb 2.3.5 (CLANG 7.3.0 (clang-703.0.31))" } }

neumino commented 8 years ago

Should be fixed in 2.3.27