seneca-mongo-store icon indicating copy to clipboard operation
seneca-mongo-store copied to clipboard

Message: seneca: Action cmd:list,role:entity failed: not authorized for query on collection

Open jamesf7 opened this issue 8 years ago • 6 comments

Hi, we are facing this issue with compose.io mongodb 2.6.9 database. The connection intermittently failing for different query each time, as we have multiple queries within one call. Look like bug is related with below links. https://jira.mongodb.org/browse/NODE-719 https://jira.mongodb.org/browse/NODE-722

Adding error stack below.

Seneca Fatal Error
==================

Message: seneca: Action cmd:list,role:entity failed: not authorized for query on app<id>.<collection_name>.

Code: act_execute

Details: { 
  gate: false,
  ungate: true,
  desc: undefined,
  cb: [Function],
  fn: [Function],
  time: { start: 1468403687939, end: 1468403688527 },
  'orig$': 
   { [MongoError: not authorized for query on app<id>.<collection_name>
     name: 'MongoError',
     message: 'not authorized for query on app<id>.<collection_name>',
     '$err': 'not authorized for query on app<id>.<collection_name>',
     code: 13 },
  'message$': 'not authorized for query on app<id>.<collection_name>',
  message: 'not authorized for query on app<id>.<collection_name>',
  pattern: 'cmd:list,role:entity',
  instance: 'Seneca/2.1.0/6615/-',
  plugin: {} }

Please can you help us into this. how we can resolve the things, as we are using cloud database.

jamesf7 avatar Jul 13 '16 10:07 jamesf7

Please let us know that contributors looking into GitHub issues or are there any other ways to look for help.

jamesf7 avatar Aug 05 '16 07:08 jamesf7

@jamesf7 what if you try to update seneca-mongo-store dependencies. Just go to project's node_modules/seneca-mongo-store directory and edit package.json file and set mongoDB version to 2.2.0-alpha2, like this:

"mongodb": "2.2.0-alpha2"

Then run npm install and try your code. Will that help?

luhtonen avatar Aug 08 '16 09:08 luhtonen

@jamesf7 @luhtonen Is it a driver update you need? Generally we won't move to alpha builds but we can certainly push it up to a stable number if it fixes your issue.

mcdonnelldean avatar Aug 08 '16 09:08 mcdonnelldean

Already merged on master a dependency update and preparing the package for release. Will be released today or tomorrow depending on the issues encountered. mongodb is updated to 2.2.5

mihaidma avatar Aug 08 '16 09:08 mihaidma

I'm fine with latest stable versions. I'm just waiting for new release of this plugin, since latest installed with npm install have very old dependencies.

luhtonen avatar Aug 08 '16 09:08 luhtonen

@jamesf7 published a new version of mongo store with updated dependencies (mongodb 2.2.5). Please let us know if your issue persists.

About the places where to look for help:

  • There is a Seneca gitter channel here: https://gitter.im/senecajs/seneca
  • Please open issues here on GitHub

mihaidma avatar Aug 08 '16 16:08 mihaidma