Error: "Bootstrap function in plugin "users-permissions" failed"

System Information
  • Strapi Version: 3.2.5
  • Operating System: Windows 10
  • Database: MongoDB
  • Node Version: 10.17.0
  • NPM Version: 6.11.3
  • Yarn Version: 1.22.4

Hello guys. All right?

I am starting now with Strapi and I have a relevant problem.

Whenever I need to edit “Content-Types” or other settings, such as “Permissions”, I am getting an error on the console related to the MongoDB database.

Not only when I try to make certain edits, but also when starting the project. I have to run the “yarn develop” command countless times for Strapi to start.

Do you have any idea what can be done or what can be done?

The database is external, it is on Amazon RDS.

Hello, I’m doing well thanks :slight_smile:

Can you specify the exact resource in AWS as the name “RDS” means “Relational Database Service” so MongoDB itself wouldn’t be RDS. If you are using the DocumentDB, this is actually a proprietary database that Amazon built and it’s not directly one that we (Strapi) support.

Hello, @DMehaffy. Thanks for answering! :grinning:

Sorry, I was not clear and I also gave the wrong information.

Mongo DB is in a statefulset in kubernetes, it is divided into 3 containers for connection, 3 for configuration and 3 for writing to shards.

Ah gotcha that makes much more sense, can you set the debug:true under the options object in your database.js file (it could be the ./config/database.js or if you have a ./config/env/production/database.js)

Just to see if we can get some more detailed information, that error looks like Mongoose can’t create the table, but I’m not sure why. I’ll admit I am not super familiar with MongoDB in general and only have a very high level understanding of how it works, but I’ll try my best to see if we can figure this out.

Hi @DMehaffy.

I activated the debug and share some results below.
If you need more details or if I provide them in another way, please let me know.

  • This happens sometimes when I try to start the project with yarn develop:

  • After a few attempts, the server goes up:

  • When I try to access the Permissions page:

  • When editing some Permissions, the following happens:

  • And after several attempts, I manage to save the information in the database:

Hi, I have been digging to find that kind of issues and it commonly seems to be related to the mongoose + mongodb driver versions.

Can you find them for me using :
yarn why mongoose and yarn why mongodb ?

Hi, @alexandrebodin :slight_smile:

Here is the result after running the commands you gave me:

Thank you,

Hello people. All right? :slight_smile:

I am still facing these problems.

Do you have any suggestions for what can be done?

Thanks,

I haven’t been able to reproduce it locally nor using a semi-functional MongoDB cluster in a docker environment :confused:

Can you provide some steps to try to reconstruct an example of your environment for us so we can try to narrow down the cause?

Can you try to switch to another DB provider? I want to understand if it’s a problem from Amazon RDS or Strapi.

I don’t think they are in Amazon RDS and I believe this may be why it’s so difficult to replicate. It looks to be a custom docker k8s cluster and my gut feeling is telling me it’s an issue in that cluster.

Oh, I just noticed these details.

Hello people. All right? Thank you very much for everyone’s return!

I also suspect that there may be a problem with the kluster. I will check with the responsible team if we can carry out new tests.

If I identify the root cause of the problem, I share the solution with you.

Thanks in advance for your attention!

Strapi is the best :slight_smile:

Thanks,