oppia: Unable to visit the edit page for a public exploration when logged out

This error occurred recently in production

 Traceback (most recent call last):
  File "/layers/google.python.pip/pip/lib/python3.8/site-packages/webapp2.py", line 604, in dispatch
    return method(*args, **kwargs)
  File "/workspace/core/controllers/acl_decorators.py", line 254, in test_can_play
    return handler(self, exploration_id, **kwargs)
  File "/workspace/core/controllers/editor.py", line 173, in get
    assert self.user_id is not None
AssertionError 

Steps to reproduce

  1. Go to https://www.oppia.org/create/K645IfRNzpKy without signing in.
  2. See error

A signed out user should be able to view the edit page of the lesson if it is public.

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 24 (18 by maintainers)

Commits related to this issue

Most upvoted comments

@AFZL210 Thanks – just a note, next time please have your link point to the specific line in the PR if possible, so it’s easier to audit the change 😃

I think what you say sounds reasonable to me, though if this was done because of typing then we need to ensure that a None user_id still keeps the typing consistent (e.g. might want to figure out what to do about the exploration_data dict which seems to be modified on the fly – we should really make a proper AugmentedUserExplorationData or similar domain object for that and call its to_dict() function for determinism rather than just add a bunch of random fields in the controller).

In any case – do you want to take this up? If so feel free to assign yourself and leave a note saying when you’ll make the PR by, otherwise we can leave it for others too. Thanks!

Sure will keep that in mind, and I’ll pick this and probably make a PR before 20th Feb.

@prafulbbandre I tried to reproduce the errors but did not get the same logs and I was able to access the edit page. Please can you verify it is still a valid issue!? Thanks!

scrnli_13_01_2024_23-47-45.mp4

Hi @HardikGoyal2003 The error provided by kevin are server error. You need to see the console error and also get help from the error provided by kevin. Thanks!