Giter VIP home page Giter VIP logo

Getting error when accessing any of the methods through explorer ("Cannot call ACL.find(). The find method has not been setup. The PersistedModel has not been correctly attached to a DataSource!) about loopback-example-passport HOT 5 CLOSED

strongloop avatar strongloop commented on August 18, 2024
Getting error when accessing any of the methods through explorer ("Cannot call ACL.find(). The find method has not been setup. The PersistedModel has not been correctly attached to a DataSource!)

from loopback-example-passport.

Comments (5)

nathanfletcher avatar nathanfletcher commented on August 18, 2024 8

Hi, please check your model-config.json file. I realised I had mistakenly removed the ACL part of it so please make sure that it is there like so...

  "ACL": {
    "dataSource": "db",
    "public": false
  },

from loopback-example-passport.

jayasrinagrale avatar jayasrinagrale commented on August 18, 2024 5

I am getting this error. Using Loopback 3

Error: Cannot call ACL.find(). The find method has not been setup. The PersistedModel has not been correctly attached to a DataSource!

I am getting this error for programmatically defined models but not for models created using the generator.

from loopback-example-passport.

raymondfeng avatar raymondfeng commented on August 18, 2024

I went a bit too far. Some of the built-in models such as ACL lost the DB config. It should be fixed now in master.

from loopback-example-passport.

0xgeert avatar 0xgeert commented on August 18, 2024

yup, that solve it. Thanks!

from loopback-example-passport.

malixsys avatar malixsys commented on August 18, 2024

I'm getting it suddenly...

message: "Cannot call AccessToken.findById(). The findById method has not been setup. The PersistedModel has not been correctly attached to a DataSource!"
stack: "Error: Cannot call AccessToken.findById(). The findById method has not been setup. The PersistedModel has not been correctly attached to a DataSource!↵    at throwNotAttached (/Users/malixsys/Source/zoof/node_modules/loopback/lib/models/persisted-model.js:56:9)↵    at Function.find [as findById] (/Users/malixsys/Source/zoof/node_modules/loopback/lib/models/persisted-model.js:139:3)↵    at Function.AccessToken.findForRequest (/Users/malixsys/Source/zoof/node_modules/loopback/lib/models/access-token.js:126:10)↵    at /Users/malixsys/Source/zoof/node_modules/loopback/lib/middleware/token.js:53:16↵    at Layer.handle [as handle_request] (/Users/malixsys/Source/zoof/node_modules/loopback/node_modules/express/lib/router/layer.js:76:5)↵    at trim_prefix (/Users/malixsys/Source/zoof/node_modules/loopback/node_modules/express/lib/router/index.js:263:13)↵    at /Users/malixsys/Source/zoof/node_modules/loopback/node_modules/express/lib/router/index.js:230:9↵    at Function.proto.process_params (/Users/malixsys/Source/zoof/node_modules/loopback/node_modules/express/lib/router/index.js:305:12)↵    at /Users/malixsys/Source/zoof/node_modules/loopback/node_modules/express/lib/router/index.js:221:12↵    at Function.match_layer (/Users/malixsys/Source/zoof/node_modules/loopback/node_modules/express/lib/router/index.js:288:3)"

from loopback-example-passport.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.