Open sentry-io[bot] opened 1 year ago
We've investigated this issue. The error seems to show that the argument 1 (socket.assigns.current_user) is nil. However, we've logged the user running the app locally and it works fine. We are unable to reproduce the bug.
Unless we are able to reproduce this error, we cannot move forward. @taylordowns2000 could you confirm if this happened on app.openfn.org or demo.openfn.org? And if it's app could you give us a superuser account so that we can try and reproduce?
Update: it looks like the error is coming from an expired session token, which means argument 2 (user) is nil. You can reproduce this by changing the session validity to zero then reloading the audit page. I don't think this error needs to be addressed, since the user gets redirected to the login page.
@taylordowns2000 please close this issue if you agree
When a session token expires, the app throws an error because the user isn't being passed into the authorize function. The user still gets redirected to the login page, but we should handle token expiry so that we don't keep getting these errors.
Sentry Issue: LIGHTNING-2V