Skip to content

TypeError: Object [object Object] has no method 'release' #109

@elhoyos

Description

@elhoyos

I'm having this error when issuing a SELECT and then doing a #rollback to close the transaction without actually doing other operation.

2015-09-24T18:31:11.750Z pid:2371 worker:36 Thu, 24 Sep 2015 18:31:11 GMT loopback:connector:postgresql SQL: SELECT "field","id" FROM "schema"."table" WHERE "field"=$1 ORDER BY "id" 2015-09-24T18:31:11.750Z pid:2371 worker:36 Parameters: ["foo"] 2015-09-24T18:31:11.750Z pid:2371 worker:36 Thu, 24 Sep 2015 18:31:11 GMT loopback:connector:postgresql Execute SQL within a transaction 2015-09-24T18:31:11.752Z pid:2371 worker:36 events.js:72 2015-09-24T18:31:11.752Z pid:2371 worker:36 throw er; // Unhandled 'error' event 2015-09-24T18:31:11.752Z pid:2371 worker:36 ^ 2015-09-24T18:31:11.754Z pid:2371 worker:36 TypeError: Object [object Object] has no method 'release' 2015-09-24T18:31:11.754Z pid:2371 worker:36 at PostgreSQL.releaseConnection (/home/myapp/node_modules/loopback-connector-postgresql/lib/transaction.js:70:14) 2015-09-24T18:31:11.754Z pid:2371 worker:36 at null.<anonymous> (/home/myapp/node_modules/loopback-connector-postgresql/lib/transaction.js:56:12) 2015-09-24T18:31:11.755Z pid:2371 worker:36 at Object.forward (/home/ubuntu/.nvm/v0.10.38/lib/node_modules/strongloop/node_modules/strong-agent/lib/proxy.js:79:23) 2015-09-24T18:31:11.755Z pid:2371 worker:36 at eval (eval at wrap (/home/ubuntu/.nvm/v0.10.38/lib/node_modules/strongloop/node_modules/strong-agent/lib/proxy.js:193:20), <anonymous>:3:21) 2015-09-24T18:31:11.755Z pid:2371 worker:36 at null.<anonymous> (/home/myapp/node_modules/loopback/node_modules/continuation-local-storage/context.js:74:17) 2015-09-24T18:31:11.755Z pid:2371 worker:36 at b [as callback] (domain.js:183:18) 2015-09-24T18:31:11.755Z pid:2371 worker:36 at Query.handleReadyForQuery (/home/myapp/node_modules/loopback-connector-postgresql/node_modules/pg/lib/query.js:89:10) 2015-09-24T18:31:11.755Z pid:2371 worker:36 at null.<anonymous> (/home/myapp/node_modules/loopback-connector-postgresql/node_modules/pg/lib/client.js:163:19) 2015-09-24T18:31:11.755Z pid:2371 worker:36 at emit (events.js:117:20) 2015-09-24T18:31:11.755Z pid:2371 worker:36 at Socket.<anonymous> (/home/myapp/node_modules/loopback-connector-postgresql/node_modules/pg/lib/connection.js:109:12) 

Please notice this is only happening in production having the same modules version as in development:

npm list loopback loopback-datasource-juggler loopback-connector-postgresql ├── loopback@2.22.2 ├── loopback-connector-postgresql@2.3.0 └── loopback-datasource-juggler@2.40.1 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions