Cannot start application 'Bootstrap function in admin failed'

System Information
  • Strapi Version: 3.6.5
  • Operating System: 16.04.7 LTS (Xenial Xerus)
  • Database: PostgreSQL 13.3
  • Node Version: 14.11.0
  • NPM Version: 6.14.9
  • Yarn Version:

Hello,
I encountered the problem from the title: ‘Bootstrap function in admin failed’ when running: ‘npm run start’ and have no clue what is the cause of the issue. Does anyone have idea what can be a problem here? Full log below:

[2021-06-24T22:14:04.993Z] error bootstrap function in admin failed
[2021-06-24T22:14:04.994Z] error TypeError: Cannot read property ‘attributes’ of undefined
at Object.getNonVisibleAttributes (/example/ftp/test/node_modules/strapi-utils/lib/content-types.js:76:11)
at getNestedFields (/example/ftp/test/node_modules/strapi-admin/services/content-type.js:30:51)
at /example/ftp/test/node_modules/strapi-admin/services/content-type.js:43:31
at /example/ftp/test/node_modules/lodash/lodash.js:928:11
at /example/ftp/test/node_modules/lodash/lodash.js:4967:15
at baseForOwn (/example/ftp/test/node_modules/lodash/lodash.js:3032:24)
at /example/ftp/test/node_modules/lodash/lodash.js:4936:18
at baseReduce (/example/ftp/test/node_modules/lodash/lodash.js:925:5)
at Function.reduce (/example/ftp/test/node_modules/lodash/lodash.js:9749:14)
at getNestedFields (/example/ftp/test/node_modules/strapi-admin/services/content-type.js:32:12)
at /example/ftp/test/node_modules/strapi-admin/services/content-type.js:132:11
at Array.reduce ()
at Object.getPermissionsWithNestedFields (/example/ftp/test/node_modules/strapi-admin/services/content-type.js:126:18)
at Object.createRolesIfNoneExist (/example/ftp/test/node_modules/strapi-admin/services/role.js:279:56)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:93:5)

Kind regards.


@fudalih were you able to solve this problem? I am encountering the same issue

This is usually caused by a broken relation (relation exists on one side but not on the other) in the model settings. Typically caused by either manual editing of a model file or manually deleting a model or it’s folder without cleaning up the other side.