Yay, MORE bench update problems!

Went to do a ‘bench update’ again today. Got a new error. Anyone seen this one before?

frappe@ERP:~/frappe-bench$ sudo bench update

This update will remove Celery config and prepare the bench to use Python RQ.
And it will overwrite Procfile and supervisor.conf.
If you don’t know what this means, type Y :wink:

Do you want to continue? [y/N]: y

This update will replace ERPNext’s Redis configuration files to fix a major security issue.
If you don’t know what this means, type Y :wink:

Do you want to continue? [y/N]: y
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
npm WARN frappe@ No description
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Updating 4e896b5…aa3b080
error: The following untracked working tree files would be overwritten by merge:
patches.txt
Please move or remove them before you can merge.
Aborting
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/update.py”, line 34, in update
update_bench()
File “/home/frappe/.bench/bench/utils.py”, line 256, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/frappe/.bench/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull

I tried finding and deleting all the patches.txt files from the top level directory of ~/frappe-bench down and re-running it. I get the same error.

No luck with sudo bench update --upgrade, or bench update --reset, or sudo bench migrate… just trying all the possibilities.

For a start, never use a sudo bench update, bench update is the way to go. Use sudo if bench tells you to (which also shouldn’t be). Are you on latest? Try reinstalling bench as follows pip install -e . Ensure you’re on the latest bench (a git pull should suffice).

If the issue persist, let me know.

Good to know about sudo - thanks for the info!

Your post didn’t exactly solve my problem, but it led me down the right path. First I did a new pull from github:

git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps bench-repo

Then I did an install:

pip install --user -e bench-repo

From there a bench update produced new and interesting errors, leading me down the path of going to ./apps/frappe and doing a new git pull frappe

Same thing with erpnext, go to ./apps/erpnext and do a new git pull.

Then I did a bench update twice, bumping me from 9.x to 10.x

Thanks for the help!

Could you post the errors? Helps us to dispatch fixes.

1 Like

Sorry, but I’ve already closed that terminal session and I didn’t capture them. :frowning:

i have the same problem as below

This update will remove Celery config and prepare the bench to use Python RQ.
And it will overwrite Procfile and supervisor.conf.
If you don’t know what this means, type Y :wink:

Do you want to continue? [y/N]: y

This update will replace ERPNext’s Redis configuration files to fix a major security issue.
If you don’t know what this means, type Y :wink:

Do you want to continue? [y/N]: y
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
npm WARN frappe@ No description
INFO:bench.utils:npm install yarn
npm WARN prefer global yarn@1.5.1 should be installed with -g
frappe@ /home/afathy/frappe-bench/apps/frappe
└── yarn@1.5.1

INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Updating ebef11a…0f8c6cf
error: The following untracked working tree files would be overwritten by merge:
patches.txt
Please move or remove them before you can merge.
Aborting
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/afathy/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/afathy/.bench/bench/commands/update.py”, line 34, in update
update_bench()
File “/home/afathy/.bench/bench/utils.py”, line 275, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/afathy/.bench/bench/utils.py”, line 145, in exec_cmd
raise CommandFailedError(cmd)

i have tried to rename and to remove the file but it comes back again

need help please

try

cd …
cd .bench
git pull
cd frappe-bench
bench update --reset

git pull error

Updating ebef11a…0f8c6cf
error: The following untracked working tree files would be overwritten by merge:
patches.txt
Please move or remove them before you can merge.
Aborting