LearningLocker / learninglocker

Learning Locker - The Open Source Learning Record Store. Started in 2014.
https://learningpool.com/solutions/learning-record-store-learning-locker/learning-locker-community-overview/
GNU General Public License v3.0
555 stars 276 forks source link

Auth error: { message: ^[[32m'Cannot read property \'organisationSettings\' of null' #1618

Open vishu1013 opened 2 years ago

vishu1013 commented 2 years ago

I am getting the following error when I tried shifting my MongoDB from local to external, my current setup has learning locker installed on ec2 and MongoDB atlas instance, update endpoint in .env file

followed custom installation steps from here(https://docs.learninglocker.net/guides-custom-installation/)

2022-07-15 11:33:49:323 - ^[[31merror^[[39m: Auth error: { message: ^[[32m'Cannot read property \'organisationSettings\' of null'^[[39m, stack: ^[[32m'TypeError: Cannot read property \'organisationSettings\' of null\n at module.exports.exports.default (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/api/dist/server/webpack:/utils/getActiveOrgSettings.js:10:31)\n at _callee2$ (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/api/dist/server/webpack:/auth/jwt.js:115:29)\n at tryCatch (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/regenerator-runtime/runtime.js:65:40)\n at Generator.invoke [as _invoke] (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/regenerator-runtime/runtime.js:303:22)\n at Generator.prototype.(anonymous function) [as next] (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/regenerator-runtime/runtime.js:117:21)\n at step (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)\n at /usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14\n at new Promise ()\n at new F (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/core-js/library/modules/_export.js:36:28)\n at /usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12\n at createOrgTokenPayload (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/api/dist/server/webpack:/auth/jwt.js:114:7)\n at _callee$ (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/api/dist/server/webpack:/auth/passport.js:44:37)\n at tryCatch (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/regenerator-runtime/runtime.js:65:40)\n at Generator.invoke [as _invoke] (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/regenerator-runtime/runtime.js:303:22)\n at Generator.prototype.(anonymous function) [as next] (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/regenerator-runtime/runtime.js:117:21)\n at step (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)\n at /usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14\n at new Promise ()\n at new F (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/core-js/library/modules/_export.js:36:28)\n at /usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12\n at /usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/api/dist/server/webpack:/auth/passport.js:38:10\n at tryCatcher (/usr/local/learninglocker/releases/ll-20200422-37978efbe241e44e79471f7a377993bdba09a623/webapp/node_modules/bluebird/js/release/util.js:16:23)'^[[39m }