Closed cocoonkid closed 9 months ago
I tried deleting the db and just reinitializing everything. now I get
secretsmysitecom-hemmelig-1 | {"level":50,"time":1705595062467,"pid":19,"hostname":"e2d48b5d4986","reqId":"req-4","req":{"method":"GET","url":"/","hostname":"secrets.mysite.com","remoteAddress":"10.20.30.4","remotePort":36472},"res":{"statusCode":500},"err":{"type":"TypeError","message":"Cannot read properties of null (reading 'role')","stack":"TypeError: Cannot read properties of null (reading 'role')\n at Object.readOnlyHandler (file:///home/node/hemmelig/src/server/prehandlers/read-only.js:28:49)"},"msg":"Cannot read properties of null (reading 'role')"}
might be related to #246
Hi, @cocoonkid , can you delete your cookies, then it should work. This issue is when you are already signed in to the domain, then the API tries to read from the cookies, and if the user do not exist, this error will be thrown.
I have to create a fix for that.
@bjarneo I tried all this. But it still does not work. I also removed all mounts and made sure to start from scratch but still no dice.
I am not sure how you can end up in this situation at all. Really. Did you try with the latest release?
What I am trying to say is that most likely it is not the application causing issues.
Did you try to backup the database file, then remove it from the db folder and start from scratch?
I've had the same issue.
In case you have SECRET_HOST
env var prefixed with the protocol, remove it. I.e.
SECRET_HOST=your.domain.com
Thanks, but this correct in my case. I think my reverse proxy is doing something wrong. I will review this soon.
What would you like to share?
secretstestcom-hemmelig-1 | {"level":30,"time":1705593625592,"pid":19,"hostname":"1d4e5a2acc1e","reqId":"req-22","res":{"statusCode":401},"responseTime":1.379293441772461,"msg":"request completed"}
I always get the 401 response when trying to login as admin user.
I have a reverse proxy in front and no CORS or similar issues with other apps. The logs of that proxy usually tell me if there is an issue by they look fine.
What could the problem be?
I can do everything as non-logged in user and that works fine.
Additional information