moodle-theme_snap
moodle-theme_snap copied to clipboard
You are currently logged out
I'm doing some tests, but in your last update I've encountered a problem and I get this message.

Nice to know why this inconvenience, not simply the solution, if not understand a little more about this great topic.
You should get that issue when your session times out or if you log out of moodle in another tab / window then go back to the previous window. This is intentional behaviour. If you are seeing the message when you are definitely logged in then it may be a bug (unless you logged back in using a separate window as the session keys will be different).
I also see this same error repeatedly on Moodle 3.1.2+
apache2 error log contains:
Default exception handler: Coding error detected, it must be fixed by a programmer: Invalid context id specified context::instance_by_id() Debug: \nError code: codingerror\n* line 5473 of /lib/accesslib.php: coding_exception thrown\n* line 1428 of /lib/accesslib.php: call to context::instance_by_id()\n* line 38 of /theme/snap/rest.php: call to get_context_info_array()\n, referer: http://xxx.yyy.zzz/
Our original spooling login error went when we reverted back to a previous instance, however since updating again we receive a new login error;
- line 5473 of /lib/accesslib.php: coding_exception thrown
- line 1428 of /lib/accesslib.php: call to context::instance_by_id()
- line 38 of /theme/snap/rest.php: call to get_context_info_array()
Kylie-Marie - if you could possibly get us the information on the rest.php call via the network tab that would help us a lot. (mainly the request parameters).
Guy is fairly certain he's figured this one out, so we'll have a fix out soon. It didn't affect our internal builds so we didn't notice it at first, so thanks for the reports.
Do you still require the information on the rest.php call as above? I have asked our support to get it but haven't heard anything back yet - will push for it if still required to help solve the error :)
@Kylie-Marie - we don't need that data thanks. We eventually managed to replicate the issue.
If it helps, there seems to be a confusion where the course think user's logged out:
https://
{"error":"Not logged in","errorcode":"notloggedinerror"}
but then rest.php?action=get_loginstatus returns this:
{"loggedin":true}
Any idea how to fix this ?