Erpnext errors after updating

Hi,

I’m facing an error in my erpnext application.

The app was working without any problems then I started having (pipe error) so i cleared cache and updated bench.

Ever since then I’m getting two errors when logging in and entering any UI that are preventing me from doing anything.

First error
[permission denied]

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


Second error
[when trying to create new work order that used to work fine]

Traceback (most recent call last):
File “apps/frappe/frappe/handler.py”, line 65, in execute_cmd
method = get_attr(cmd)
File “apps/frappe/frappe/handler.py”, line 226, in get_attr
method = frappe.get_attr(cmd)
File “apps/frappe/frappe/init.py”, line 1447, in get_attr
return getattr(get_module(modulename), methodname)
AttributeError: module ‘frappe.desk.form.utils’ has no attribute ‘validate_link’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 69, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 38, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 67, in execute_cmd
frappe.throw(_(“Failed to get method for command {0} with {1}”).format(cmd, e))
File “apps/frappe/frappe/init.py”, line 504, in throw
msgprint(
File “apps/frappe/frappe/init.py”, line 479, in msgprint
_raise_exception()
File “apps/frappe/frappe/init.py”, line 434, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Failed to get method for command frappe.desk.form.utils.validate_link with module ‘frappe.desk.form.utils’ has no attribute ‘validate_link’

bench version 5.6.0

I tried bench build but also getting errors

yarn run v1.22.15
warning …/…/package.json: No license field
$ FRAPPE_ENV=production node rollup/build.js
Production mode
node:internal/fs/utils:344
throw err;
^

Error: EACCES: permission denied, open ‘/opt/bench/frappe-bench/sites/assets/js/moment-bundle.min.js’
at Object.openSync (node:fs:585:3)
at Object.writeFileSync (node:fs:2153:35)
at /opt/bench/frappe-bench/apps/frappe/rollup/build.js:134:6
at Array.forEach ()
at concatenate_files (/opt/bench/frappe-bench/apps/frappe/rollup/build.js:120:18)
at Object. (/opt/bench/frappe-bench/apps/frappe/rollup/build.js:40:13)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
errno: -13,
syscall: ‘open’,
code: ‘EACCES’,
path: ‘/opt/bench/frappe-bench/sites/assets/js/moment-bundle.min.js’
}
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.
Traceback (most recent call last):
File “/usr/lib/python3.8/runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.8/runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “/opt/bench/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 110, in
main()
File “/opt/bench/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 20, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/opt/bench/frappe-bench/env/lib/python3.8/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/opt/bench/frappe-bench/env/lib/python3.8/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/opt/bench/frappe-bench/env/lib/python3.8/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/bench/frappe-bench/env/lib/python3.8/site-packages/click/core.py”, line 1259, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/bench/frappe-bench/env/lib/python3.8/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/opt/bench/frappe-bench/env/lib/python3.8/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/opt/bench/frappe-bench/apps/frappe/frappe/commands/utils.py”, line 60, in build
bundle(
File “/opt/bench/frappe-bench/apps/frappe/frappe/build.py”, line 244, in bundle
frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
File “/opt/bench/frappe-bench/apps/frappe/frappe/commands/init.py”, line 100, in popen
raise subprocess.CalledProcessError(return
, command)
subprocess.CalledProcessError: Command ‘/usr/bin/yarn run production’ returned non-zero exit status 1.
root@server:/opt/bench/frappe-bench#