Hello Guys,
I have more or less successfully setup adapt authoring but after running the install script and setup my user, entering the start page fails, every asset which should be downloaded like:
/css/adapt.css
/favicon.ico
/css/assets/adapt-learning-logo-outline.png
fail with the following error:
{
"success": false,
"error": "Cannot read properties of undefined (reading 'user')",
"stack": "TypeError: Cannot read properties of undefined (reading 'user')\n at /usr/src/app/lib/permissions.js:499:103\n at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)\n at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:328:13)\n at /usr/src/app/node_modules/express/lib/router/index.js:286:9\n at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:346:12)\n at next (/usr/src/app/node_modules/express/lib/router/index.js:280:10)\n at SendStream.error (/usr/src/app/node_modules/serve-static/index.js:121:7)\n at SendStream.emit (node:events:517:28)\n at SendStream.emit (node:domain:489:12)\n at SendStream.error (/usr/src/app/node_modules/send/index.js:270:17)\n at SendStream.onStatError (/usr/src/app/node_modules/send/index.js:417:12)\n at onstat (/usr/src/app/node_modules/send/index.js:722:26)\n at FSReqCallback.oncomplete (node:fs:202:21)\n at FSReqCallback.callbackTrampoline (node:internal/async_hooks:128:17)"
}
The line numbers are not the original ones, as I've added some console.log to get deeper insights but from my understanding the error happens within the policyChecker Method, directly after handling the ignored routes when accessing req.session.passport.user
Session {
cookie: {
path: '/',
_expires: null,
originalMaxAge: null,
httpOnly: true,
secure: null,
domain: null,
sameSite: null
}
}
req.session.passport
undefined
When i comment the part which currently crashes, I've get {"statusCode":"not-authenticated"} instead of the asset so it does not help me in this case.
I am running adapt_authoring on latest commit in master branch:
commit 6e2e738eb745869f04244675e0b649b0eee8ad6f (HEAD -> master, tag: v0.11.3, origin/master, origin/HEAD)
together with the adapt_framework v5.37.9
Any help is appreciated !
Many thanks in advance