```java Error: Initialisation not done. Did you fo...
# support-questions-legacy
a
Copy code
java
Error: Initialisation not done. Did you forget to call the SuperTokens.init function?
I keep getting this error when going to my /testauth path but I did call the function before the route
Copy code
import { verifySession } from "supertokens-node/recipe/session/framework/express/index.js";

router.get("/testauth", verifySession(), (req, res) => {
  if (req.session == null) {
    res.send({ error: "Must be signed in", code: "401" })
    return
  }
  let userId = req.session.getUserId();
});
r
Hey @Aithusa
Can you do a console log where you have initialised supertokens and have you added the session recipe to it?
a
Its working when I use capital SuperTokens but not lowercase, Im having another problem now Im trying to sort out the dashboard says 500 error
r
Right. So see your import statement then. Capital vs lowercase is affected by the import statement
a
I'm still stuck on this issue, I keep getting 404 errors on these two requests, and there are no errors in any of my consoles.
Copy code
java
GET "/auth/dashboard/api/users/count" and GET "auth/dashboard/api/users?limit=10"
but I'm not sure why. Its stopping the dashboard from working.
This is for self hosted supertokens, the dashboard works when set it to try.supertokens.com
r
Hmmm. Is the core throwing errors? Can you see core logs?
a
I meant 404 errors, and there isn't anything in the logs either
r
oh right. Can you enable backend debug logs and show me the output when this API is called?
a
There is this but I didn't see this before
Copy code
2022-12-07T05:33:55.979614272Z
2022-12-07T05:33:58.560342146Z npm ERR! path /app
2022-12-07T05:33:58.562966086Z npm ERR! command failed
2022-12-07T05:33:58.563937831Z npm ERR! signal SIGTERM
2022-12-07T05:33:58.564605853Z npm ERR! command sh -c -- node ./bin/www
2022-12-07T05:33:58.566393428Z
2022-12-07T05:33:58.566906556Z npm ERR! A complete log of this run can be found in:
2022-12-07T05:33:58.567501291Z npm ERR! /root/.npm/_logs/2022-12-07T05_33_35_269Z-debug-0.log
Ok I think its working now
r
hmm. What changed?
a
I'm using captain rover and had the url set as http://srv-captain--auth/ which wasnt working so I decided I should just expose it as a web app and used my domain name url instead
r
hmm ok
13 Views