Bug in production

Hey , I’ve been using Strapi in production. Suddenly I encountered a strange bug in Strapi.
My some content types are now invisible in production.

When I try to try it locally it says :

[2021-08-05T16:35:33.152Z] error bootstrap function in plugin “users-permissions” failed
[2021-08-05T16:35:33.152Z] error TypeError: Cannot read property ‘_id’ of undefined

Can someone please help me?
I’m using MongoDB as my database and deployed it on cloud run with 4GB RAM , 2CPUs.

Screenshot from 2021-08-05 22-41-28

I see your entire strapi setup is 3.6.1 version, but the mongo connector is 3.6.5.

Can you try to upgrade the entire app to the latest version? Or downgrade the mongo connector to 3.6.1 if you don’t want to upgrade. Not sure if that’s the issue, but let’s first try to do this.

2 Likes

Hey, I got this working.

I initially thought it was related to strapi setup too. I upgraded to 3.6.6 but this didn’t solve the issue

This issue is related to : https://github.com/strapi/strapi/issues/6640
I got this bug because I installed and then uninstalled an outdated plugin : Strapi Plugin Comments
I wasn’t even able to add new fields to my content-type because of this nor publish any new content.

Uninstalling the plugin didn’t delete the roles associated with this plugin in my database (should have realised this sooner :grimacing:).

So I had to filter in my Atlas Database , and delete the documents with no role.

Screenshot from 2021-08-06 13-09-22

This fixed it ! Everything is working perfectly now

1 Like