strapi-connector-firestore icon indicating copy to clipboard operation
strapi-connector-firestore copied to clipboard

Each time when run development mode its create new permissions in permissions array

Open jitendraP-ashutec opened this issue 2 years ago • 3 comments

When I am running strapi app in development mode then it's creating(adding new permissions) in users-permissions_role collection.

jitendraP-ashutec avatar Oct 18 '21 13:10 jitendraP-ashutec

Hi @jitendraP-ashutec , thank you for the report. A few questions to clarify:

  1. Each time the Strapi server is restarted, new permissions entries are created, is that right?
  2. Does this happen only in development mode and not production mode?
  3. What Strapi and connector versions are you running?

brettwillis avatar Oct 21 '21 00:10 brettwillis

Hi @brettwillis

  1. Yes, each time Strapi server is restarted, it's adding new permissions entries.
  2. It's happening in development mode. I didn't check in production.
  3. I am using firebase strapi connector. Strapi versions: 3.6.5

jitendraP-ashutec avatar Oct 21 '21 11:10 jitendraP-ashutec

Hi @jitendraP-ashutec sorry for the delay.

I can't seem to reproduce the issue. I'm running Strapi 3.6.8 and [email protected]. Is it easy for you to check with these versions?

Some thoughts:

  • Are you running on the Firestore emulator or on the Firestore production server? If on the emulator, you're aware that the entire database is erased when you shut down the emulator?
  • Otherwise can you enable the logTransactionStats and logQueries options, and show me the console output on Strapi startup? See below
  • How many data types do you have? The connector applies some query size limits and perhaps it may be interferring with Strapi's logic if you have many data types...
// ./config/database.js
module.exports = ({ env }) => ({
  defaultConnection: 'default',
  connections: {
    default: {
      connector: 'firestore',
      settings: {
        // ...
      },
      options: {
        // ...

        // Enable logging
        logQueries: true,
        logTransactionStats: true,
      }
    }
  },
});

brettwillis avatar Nov 02 '21 20:11 brettwillis