ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

Error while upgrading to v13.14 in self hosted environment

While upgrading to v13.14 in self hosted environment, bench update gave an error “Failed to get method for command frappe.desk.form.utils.validate_link with module ‘frappe.desk.form.utils’ has no attribute ‘validate_link’”.

We have observed that the server memory was 2GB which is insufficient.

Increasing the swap size to 16 GB and redoing bench update solved the problem.

3 Likes

Not sure my issue is 100% solved after someone suggested doing bench build

hey adam26d
I faced with this issue, updated two sites to v13.15, they cannot process any payments as an error pops up : Failed to get method for command frappe.desk.form.utils.validate_link with module ‘frappe.desk.form.utils’ has no attribute ‘validate_link’

Building frappe assets…

:heavy_check_mark: Built js/checkout.min.js
:heavy_check_mark: Built js/dialog.min.js
Killed
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Traceback (most recent call last):
File “/usr/lib/python3.7/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.7/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/erpnxtadmin/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 104, in
main()
File “/home/erpnxtadmin/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 19, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/erpnxtadmin/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/erpnxtadmin/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/erpnxtadmin/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnxtadmin/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 1259, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnxtadmin/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/erpnxtadmin/frappe-bench/env/lib/python3.7/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/erpnxtadmin/frappe-bench/apps/frappe/frappe/commands/utils.py”, line 49, in build
app=app,
File “/home/erpnxtadmin/frappe-bench/apps/frappe/frappe/build.py”, line 248, in bundle
frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
File “/home/erpnxtadmin/frappe-bench/apps/frappe/frappe/commands/init.py”, line 93, in popen
raise subprocess.CalledProcessError(return
, command)
subprocess.CalledProcessError: Command ‘/usr/bin/yarn run production’ returned non-zero exit status 137.

In my case I solved it with bench build --force

Faced this on vanilla site

Failed to get method for command frappe.desk.form.utils.validate_link with module 'frappe.desk.form.utils' has no attribute 'validate_link'

and

subprocess.CalledProcessError: Command ‘/usr/bin/yarn run production’ returned non-zero exit status 137.

Did bench build --force multiple times without success. SQL was eating all memory and swap. Restarted SQL sudo systemctl restart mysql.service and then did bench build --force again. Worked perfectly.

1 Like

My solution was –

  1. Create and allocate swap file 2gig
  2. Clear contents of js folder in sites/assets/js
  3. Bench build --force