Payroll, Trouble creating salary slips

Hi! I’m trying to learn Payroll Module for:
“erpnext”: “13.36.2”,
“frappe”: “13.36.3”

I’m logged in as administrator with full rights and permissions.
I’ve added employees in HR Module, defined salary components, made salary structure and linked it to employees (different structures for employees - based on their actual payout), created payroll entry and when I click ‘create salary slips’, I get this error in console:

[Error] Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR) (frappe.desk.form.save.savedocs, line 0)
[Log] Unable to handle failed response (desk.min.js, line 4008)
[Log] Trace
SyntaxError: JSON Parse error: Unrecognized token ‘<’ — request.js:483
(anonymous function) (desk.min.js:4009)
i (jquery.min.js:2:27157)
fireWith (jquery.min.js:2:27916)
z (jquery.min.js:4:12095)
(anonymous function) (jquery.min.js:4:15621)

And debugger says:

Traceback (most recent call last):
File “/home/company/bench/erpnext/apps/frappe/frappe/app.py”, line 69, in application
response = frappe.api.handle()
File “/home/company/bench/erpnext/apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “/home/company/bench/erpnext/apps/frappe/frappe/handler.py”, line 38, in handle
data = execute_cmd(cmd)
File “/home/company/bench/erpnext/apps/frappe/frappe/handler.py”, line 73, in execute_cmd
is_whitelisted(method)
File “/home/company/bench/erpnext/apps/frappe/frappe/init.py”, line 750, in is_whitelisted
throw(_(“Not permitted”), PermissionError)
File “/home/company/bench/erpnext/apps/frappe/frappe/init.py”, line 504, in throw
msgprint(
File “/home/company/bench/erpnext/apps/frappe/frappe/init.py”, line 479, in msgprint
_raise_exception()
File “/home/company/bench/erpnext/apps/frappe/frappe/init.py”, line 434, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.PermissionError: Not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/company/bench/erpnext/apps/frappe/frappe/middlewares.py”, line 18, in call
return super(StaticDataMiddleware, self).call(environ, start_response)
File “/home/company/bench/erpnext/env/lib/python3.10/site-packages/werkzeug/middleware/shared_data.py”, line 220, in call
return self.app(environ, start_response)
File “/home/company/bench/erpnext/env/lib/python3.10/site-packages/werkzeug/middleware/shared_data.py”, line 220, in call
return self.app(environ, start_response)
File “/home/company/bench/erpnext/env/lib/python3.10/site-packages/werkzeug/local.py”, line 231, in application
return ClosingIterator(app(environ, start_response), self.cleanup)
File “/home/company/bench/erpnext/env/lib/python3.10/site-packages/werkzeug/wrappers/base_request.py”, line 237, in application
resp = f(*args[:-2] + (request,))
File “/home/company/bench/erpnext/apps/frappe/frappe/app.py”, line 90, in application
response = handle_exception(e)
File “/home/company/bench/erpnext/apps/frappe/frappe/app.py”, line 294, in handle_exception
print(frappe.get_traceback())
BrokenPipeError: [Errno 32] Broken pipe

Also, in other experience, if I select payroll entry from ‘payroll entry list’ and click submit with in action button, it generates salary slips. But when I try to open that payroll entry I get following in console:

[Error] Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)
http://ip-address/api/method/frappe.desk.form.load.getdoc?doctype=Payroll+Entry&name=HR-PRUN-2023-00001&_=1681566288615
(frappe.desk.form.load.getdoc, line 0)
[Log] Unable to handle failed response (desk.min.js, line 4008)
[Log] Trace
SyntaxError: JSON Parse error: Unrecognized token ‘<’ — request.js:483
(anonymous function) (desk.min.js:4009)
i (jquery.min.js:2:27157)
fireWith (jquery.min.js:2:27916)
z (jquery.min.js:4:12095)
(anonymous function) (jquery.min.js:4:15621)

Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

Any help in this regard is highly appreciated . Thank you in advance!