Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create new users #27544

Closed
KevinFaro opened this issue Aug 27, 2024 · 3 comments
Closed

Unable to create new users #27544

KevinFaro opened this issue Aug 27, 2024 · 3 comments
Labels

Comments

@KevinFaro
Copy link

Description of the issue

On v15.39.0 we're unable to create new users. We're getting an error that the Notifications Settings don't exist. I've checked the document list and can see that new users are not having notification settings created. I've rolled back Frappe to v15.38.0 and I am now able to create users again.

Context information (for bug reports)

Output of bench version
Not working:

ERPNext: v15.33.4
Custom App: v15.1.3
Frappe Framework: v15.39.0
Frappe LMS: v2.3.0

Rolled back (working):

ERPNext: v15.33.5
Custom App: v15.1.3
Frappe Framework: v15.38.0
Frappe LMS: v2.3.0

Steps to reproduce the issue

  1. Create a new user
  2. Login as the user

Observed result

Received uncaught server exception page

Screenshot 2024-08-27 at 15 35 27

Expected result

Logged in successfully and sent to the desk.

Stacktrace / full error message

Traceback (most recent call last):
  File "apps/frappe/frappe/www/app.py", line 27, in get_context
    boot = frappe.sessions.get()
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/sessions.py", line 140, in get
    bootinfo = get_bootinfo()
               ^^^^^^^^^^^^^^
  File "apps/frappe/frappe/boot.py", line 75, in get_bootinfo
    bootinfo.notification_settings = get_notification_settings()
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/boot.py", line 401, in get_notification_settings
    return frappe.get_cached_doc("Notification Settings", frappe.session.user)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 1207, in get_cached_doc
    doc = get_doc(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 1333, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 85, in get_doc
    return controller(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 126, in __init__
    self.load_from_db()
  File "apps/frappe/frappe/model/document.py", line 172, in load_from_db
    frappe.throw(
  File "apps/frappe/frappe/__init__.py", line 645, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 610, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 561, in _raise_exception
    raise exc
frappe.exceptions.DoesNotExistError: Notification Settings [REDACTED EMAIL] not found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "apps/frappe/frappe/website/serve.py", line 20, in get_response
    response = renderer_instance.render()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
    html = self.get_html()
           ^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/utils.py", line 523, in cache_html_decorator
    html = func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/page_renderers/template_page.py", line 95, in get_html
    self.update_context()
  File "apps/frappe/frappe/website/page_renderers/template_page.py", line 163, in update_context
    data = self.run_pymodule_method("get_context")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/page_renderers/template_page.py", line 223, in run_pymodule_method
    return method(self.context)
           ^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/www/app.py", line 29, in get_context
    raise frappe.SessionBootFailed from e
frappe.exceptions.SessionBootFailed

Additional information

Running in docker on ECS Fargate using the custom apps image

@KevinFaro KevinFaro added the bug label Aug 27, 2024
@codezart
Copy link

codezart commented Aug 28, 2024

@KevinFaro
Unable to reproduce the issue.

Used the same versions as provided in the description.

Can you please tell if you've done some overrides to the original codebase?

@akhilnarang
Copy link
Member

It was an issue with LMS, resolved in frappe/lms#994

For now you can rollback LMS to a previous version, or wait for an updated release (I think it'll be out today)

@KevinFaro
Copy link
Author

Thank you @akhilnarang! Interesting that rolling back Frappe worked. Either way, really appreciate the investigation, I'll monitor on the LMS side.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants