frappe / frappe/press

bug: UNAUTHORIZED displayed on homescreen

Open
#773 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
562
Forks
410
Avg merge
22h 15m
Merged PRs (30d)
197

Description

Every time an unauthenticated users loads the website we get the following error:

```
Failed to load resource: the server responded with a status of 401 (UNAUTHORIZED)
website.js:177

Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 57, in application
frappe.api.validate_auth()
File "apps/frappe/frappe/api.py", line 180, in validate_auth
validate_auth_via_hooks()
File "apps/frappe/frappe/api.py", line 266, in validate_auth_via_hooks
frappe.get_attr(auth_hook)()
File "apps/press/press/auth.py", line 60, in hook
frappe.throw("Access not allowed for this URL", frappe.AuthenticationError)
File "apps/frappe/frappe/__init__.py", line 525, in throw
msgprint(
File "apps/frappe/frappe/__init__.py", line 493, in msgprint
_raise_exception()
File "apps/frappe/frappe/__init__.py", line 442, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.AuthenticationError: Access not allowed for this URL
```

![image](https://user-images.githubusercontent.com/11413796/230456197-8afb4f75-32ab-44b3-920e-90766981954a.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with apps/press/press/auth.py, especially the hook shown in the traceback, and inspect the request initiated near website.js:177 when the homescreen loads unauthenticated. Confirm which request returns 401 and ensure the homescreen no longer produces the unauthorized error for unauthenticated users.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
authentication, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.