Error during update to 10.0.1.5

Team,

I got this error while trying to update to latest version. Any idea how I fix it?

frappe@ubuntu-s-2vcpu-2gb-ams3-01:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
remote: Counting objects: 4516, done.
remote: Compressing objects: 100% (1582/1582), done.
remote: Total 4516 (delta 2980), reused 4355 (delta 2840), pack-reused 0
Receiving objects: 100% (4516/4516), 22.29 MiB | 17.24 MiB/s, done.
Resolving deltas: 100% (2980/2980), completed with 80 local objects.
From https://github.com/frappe/bench
   a509edc..d43bae4  master     -> origin/master
 * [new tag]         4.1        -> 4.1
 * [new tag]         v0.9       -> v0.9
 * [new tag]         v0.91      -> v0.91
 * [new tag]         v0.92      -> v0.92
 * [new tag]         v0.93      -> v0.93
 * [new tag]         v1.0       -> v1.0
 * [new tag]         v2.0       -> v2.0
 * [new tag]         v2.1       -> v2.1
 * [new tag]         v3.0       -> v3.0
 * [new tag]         v3.1       -> v3.1
 * [new tag]         v4.0       -> v4.0
Updating a509edc..d43bae4
error: Your local changes to the following files would be overwritten by merge:
        bench/commands/install.py
        playbooks/__init__.py
        playbooks/develop/includes/setup_bench.yml
        playbooks/develop/includes/setup_dev_env.yml
        playbooks/develop/includes/setup_erpnext.yml
        playbooks/develop/includes/setup_selinux_policy.yml
        playbooks/develop/install.yml
        playbooks/develop/macosx.yml
        playbooks/develop/templates/mariadb_centos.repo
        playbooks/prerequisites/debian.yml
        playbooks/prerequisites/files/debian_mariadb_config.cnf
        playbooks/prerequisites/files/mariadb_config.cnf
        playbooks/prerequisites/files/nginx.conf
        playbooks/prerequisites/install_prerequisites.yml
        playbooks/prerequisites/install_roles.yml
        playbooks/prerequisites/roles/bash_screen_wall/files/screen_wall.sh
        playbooks/prerequisites/roles/bash_screen_wall/tasks/main.yml
        playbooks/prerequisites/roles/dns_caching/handlers/main.yml
        playbooks/prerequisites/roles/dns_caching/tasks/main.yml
        playbooks/prerequisites/roles/fail2ban/defaults/main.yml
        playbooks/prerequisites/roles/fail2ban/handlers/main.yml
        playbooks/prerequisites/roles/fail2ban/tasks/configure_nginx_jail.yml
        playbooks/prerequisites/roles/fail2ban/tasks/main.yml
        playbooks/prerequisites/roles/fail2ban/templates/nginx-proxy-filter.conf                                                                             .j2
        playbooks/prerequisites/roles/fail2ban/templates/nginx-proxy-jail.conf.j                                                                             2
        playbooks/prerequisites/roles/frappe_selinux/files/frappe_selinux.te
        playbooks/prerequisites/roles/frappe_selinux/tasks/main.yml
        playbooks/prerequisites/roles/locale/defaults/main.yml
        playbooks/prerequisites/roles/locale/tasks/main.yml
        playbooks/prerequisites/roles/logwatch/defaults/main.yml
        playbooks/prerequisites/roles/logwatch/tasks/main.yml
        playbooks/prerequisites/roles/logwatch/templates/logwatch.conf.j2
        playbooks/prerequisites/roles/mariadb/README.md
        playbooks/prerequisites/roles/mariadb/defaults/main.yml
        playbooks/prerequisites/roles/mariadb/handlers/main.yml
        playbooks/prerequisites/roles/mariadb/meta/main.yml
        playbooks/prerequisites/roles/mariadb/tasks/centos.yml
        playbooks/prerequisites/roles/mariadb/tasks/debian.yml
        playbooks/prerequisites/roles/mariadb/tasks/main.yml
        playbooks/prerequisites/roles/mariadb/tasks/mysql_secure_installation.ym                                                                             l
        playbooks/prerequisites/roles/mariadb/tasks/ubuntu.yml
        playbooks/prerequisites/roles/mariadb/templates/mariadb_centos.repo.j2
        playbooks/prerequisites/roles/mariadb/templates/mariadb_ubuntu.list.j2
        playbooks/prerequisites/roles/mariadb/templates/my.cnf.j2
        playbooks/prerequisites/roles/mariadb/vars/main.yml
        playbooks/prerequisites/roles/nginx/.travis.yml
        playbooks/prerequisites/roles/nginx/README.md
        playbooks/prerequisites/roles/nginx/defaults/main.yml
        playbooks/prerequisites/roles/nginx/handlers/main.yml
        playbooks/prerequisites/roles/nginx/meta/main.yml
        playbooks/prerequisites/roles/nginx/tasks/main.yml
        playbooks/prerequisites/roles/nginx/tasks/setup-Debian.yml
        playbooks/prerequisites/roles/nginx/tasks/setup-RedHat.yml
        playbooks/prerequisites/roles/nginx/tasks/vhosts.yml
        playbooks/prerequisites/roles/nginx/templates/nginx.conf.j2
        playbooks/prerequisites/roles/nginx/templates/nginx.repo.j2
        playbooks/prerequisites/roles/nginx/templates/vhosts.j2
        playbooks/prerequisites/roles/nginx/tests/inventory
        playbooks/prerequisites/roles/nginx/tests/test.yml
        playbooks/prerequisites/roles/nginx/vars/Debian.yml
        playbooks/prerequisites/roles/nginx/vars/RedHat.yml
        playbooks/prerequisites/roles/nodejs/tasks/main.yml
        playbooks/prerequisites/roles/ntpd/tasks/main.yml
        playbooks/prerequisites/roles/psutil/tasks/main.yml
        playbooks/prerequisites/roles/supervisor/tasks/main.yml
        playbooks/prerequisites/roles/swap/defaults/main.yml
        playbooks/prerequisites/roles/swap/tasks/main.yml
        playbooks/prerequisites/roles/wkhtmltopdf/tasks/main.yml
        playbooks/prerequisites/setup_essentials.yml
        playbooks/prerequisites/setup_nginx_proxy_jail.yml
        playbooks/prerequisites/ubuntu.yml
        playbooks/production/includes/setup_bench_production.yml
        playbooks/production/includes/setup_inputrc.yml
        playbooks/production/install.yml
        vm/ansible/roles/mariadb/tasks/main.yml
        vm/ansible/roles/nginx/tasks/main.yml
        vm/ansible/vm.yml
Please, commit your changes or stash them before you can merge.
Aborting
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    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 __ca                                                                             ll__
    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 inv                                                                             oke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invo                                                                             ke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invo                                                                             ke
    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 275, in update_bench
    exec_cmd("git pull", cwd=cwd)
  File "/home/frappe/.bench/bench/utils.py", line 145, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull

We encountered the same error while trying to update this morning. I created a Github issue already

Hope it gets fixed soon

Any luck with this issue?
Regards,
Ahmed

go to bench folder and have a git stash, be aware you’ll loose your changes

I have done that many times, but it didn’t help.

can u have a git status in bench folder and double check what is changed?

frappe@ubuntu-s-2vcpu-2gb-ams3-01:~/frappe-bench/apps/frappe$ git status
On branch master
Your branch is up-to-date with ‘upstream/master’.
nothing to commit, working directory clean
frappe@ubuntu-s-2vcpu-2gb-ams3-01:~/frappe-bench/apps/frappe$ cd …
frappe@ubuntu-s-2vcpu-2gb-ams3-01:~/frappe-bench/apps$ cd erpnext
frappe@ubuntu-s-2vcpu-2gb-ams3-01:~/frappe-bench/apps/erpnext$ git status
On branch master
Your branch is up-to-date with ‘upstream/master’.
nothing to commit, working directory clean
frappe@ubuntu-s-2vcpu-2gb-ams3-01:~/frappe-bench/apps/erpnext$

your problem is on bench repo, have a look at frappe-bench folder

Thanks, but can you help me with what I should do or what I should look for?

it depends on where bench repo is located … try from frappe-bench folder:

cd ../bench-repo
git status
git stash

In the easy-install standard it will be in /home/frappe/.bench

1 Like

Aright, here is the result of git status on .bench:

root@ubuntu-s-2vcpu-2gb-ams3-01:/home/frappe/.bench# git status
On branch master
Your branch is behind 'origin/master' by 904 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   .gitignore
        modified:   .travis.yml
        modified:   LICENSE.md
        modified:   MANIFEST.in
        modified:   bench/__init__.py
        modified:   bench/commands/config.py
        modified:   bench/commands/git.py
        modified:   bench/commands/install.py
        modified:   bench/commands/utils.py
        modified:   bench/config/__init__.py
        modified:   bench/config/common_site_config.py
        modified:   bench/config/nginx.py
        modified:   bench/config/redis.py
        modified:   bench/config/site_config.py
        modified:   bench/config/supervisor.py
        modified:   bench/config/templates/502.html
        modified:   bench/config/templates/Procfile
        modified:   bench/config/templates/frappe_sudoers
        modified:   bench/config/templates/nginx.conf
        modified:   bench/config/templates/nginx_default.conf
        modified:   bench/config/templates/redis_cache.conf
        modified:   bench/config/templates/redis_queue.conf
        modified:   bench/config/templates/redis_socketio.conf
        modified:   bench/config/templates/supervisor.conf
        modified:   bench/patches/__init__.py
        modified:   bench/patches/patches.txt
        modified:   bench/patches/v3/__init__.py
        modified:   bench/patches/v3/celery_to_rq.py
        modified:   bench/patches/v3/deprecate_old_config.py
        modified:   bench/patches/v3/redis_bind_ip.py
        modified:   bench/patches/v4/__init__.py
        modified:   bench/patches/v4/install_yarn.py
        modified:   bench/patches/v4/update_node.py
        modified:   bench/patches/v4/update_socketio.py
        modified:   bench/tests/__init__.py
        modified:   bench/tests/test_setup_production.py
        modified:   completion.sh
        modified:   docs/branch_details.md
        modified:   docs/contribution_guidelines.md
        modified:   docs/release_policy.md
        modified:   docs/releasing_frappe_erpext.md
        modified:   install_scripts/contrib-apps.json
        modified:   install_scripts/erpnext-apps-master.json
        modified:   install_scripts/erpnext-apps.json
        modified:   playbooks/__init__.py
        modified:   playbooks/develop/includes/setup_bench.yml
        modified:   playbooks/develop/includes/setup_dev_env.yml
        modified:   playbooks/develop/includes/setup_erpnext.yml
        modified:   playbooks/develop/includes/setup_selinux_policy.yml
        modified:   playbooks/develop/install.yml
        modified:   playbooks/develop/macosx.yml
        modified:   playbooks/develop/templates/mariadb_centos.repo
        modified:   playbooks/prerequisites/debian.yml
        modified:   playbooks/prerequisites/files/debian_mariadb_config.cnf
        modified:   playbooks/prerequisites/files/mariadb_config.cnf
        modified:   playbooks/prerequisites/files/nginx.conf
        modified:   playbooks/prerequisites/install_prerequisites.yml
        modified:   playbooks/prerequisites/install_roles.yml
        modified:   playbooks/prerequisites/roles/bash_screen_wall/files/screen_wall.sh
        modified:   playbooks/prerequisites/roles/bash_screen_wall/tasks/main.yml
        modified:   playbooks/prerequisites/roles/dns_caching/handlers/main.yml
        modified:   playbooks/prerequisites/roles/dns_caching/tasks/main.yml
        modified:   playbooks/prerequisites/roles/fail2ban/defaults/main.yml
        modified:   playbooks/prerequisites/roles/fail2ban/handlers/main.yml
        modified:   playbooks/prerequisites/roles/fail2ban/tasks/configure_nginx_jail.yml
        modified:   playbooks/prerequisites/roles/fail2ban/tasks/main.yml
        modified:   playbooks/prerequisites/roles/fail2ban/templates/nginx-proxy-filter.conf.j2
        modified:   playbooks/prerequisites/roles/fail2ban/templates/nginx-proxy-jail.conf.j2
        modified:   playbooks/prerequisites/roles/frappe_selinux/files/frappe_selinux.te
        modified:   playbooks/prerequisites/roles/frappe_selinux/tasks/main.yml
        modified:   playbooks/prerequisites/roles/locale/defaults/main.yml
        modified:   playbooks/prerequisites/roles/locale/tasks/main.yml
        modified:   playbooks/prerequisites/roles/logwatch/defaults/main.yml
        modified:   playbooks/prerequisites/roles/logwatch/tasks/main.yml
        modified:   playbooks/prerequisites/roles/logwatch/templates/logwatch.conf.j2
        modified:   playbooks/prerequisites/roles/mariadb/README.md
        modified:   playbooks/prerequisites/roles/mariadb/defaults/main.yml
        modified:   playbooks/prerequisites/roles/mariadb/handlers/main.yml
        modified:   playbooks/prerequisites/roles/mariadb/meta/main.yml
        modified:   playbooks/prerequisites/roles/mariadb/tasks/centos.yml
        modified:   playbooks/prerequisites/roles/mariadb/tasks/debian.yml
        modified:   playbooks/prerequisites/roles/mariadb/tasks/main.yml
        modified:   playbooks/prerequisites/roles/mariadb/tasks/mysql_secure_installation.yml
        modified:   playbooks/prerequisites/roles/mariadb/tasks/ubuntu.yml
        modified:   playbooks/prerequisites/roles/mariadb/templates/mariadb_centos.repo.j2
        modified:   playbooks/prerequisites/roles/mariadb/templates/mariadb_ubuntu.list.j2
        modified:   playbooks/prerequisites/roles/mariadb/templates/my.cnf.j2
        modified:   playbooks/prerequisites/roles/mariadb/vars/main.yml
        modified:   playbooks/prerequisites/roles/nginx/.travis.yml
        modified:   playbooks/prerequisites/roles/nginx/README.md
        modified:   playbooks/prerequisites/roles/nginx/defaults/main.yml
        modified:   playbooks/prerequisites/roles/nginx/handlers/main.yml
        modified:   playbooks/prerequisites/roles/nginx/meta/main.yml
        modified:   playbooks/prerequisites/roles/nginx/tasks/main.yml
        modified:   playbooks/prerequisites/roles/nginx/tasks/setup-Debian.yml
        modified:   playbooks/prerequisites/roles/nginx/tasks/setup-RedHat.yml
        modified:   playbooks/prerequisites/roles/nginx/tasks/vhosts.yml
        modified:   playbooks/prerequisites/roles/nginx/templates/nginx.conf.j2
        modified:   playbooks/prerequisites/roles/nginx/templates/nginx.repo.j2
        modified:   playbooks/prerequisites/roles/nginx/templates/vhosts.j2
        modified:   playbooks/prerequisites/roles/nginx/tests/inventory
        modified:   playbooks/prerequisites/roles/nginx/tests/test.yml
        modified:   playbooks/prerequisites/roles/nginx/vars/Debian.yml
        modified:   playbooks/prerequisites/roles/nginx/vars/RedHat.yml
        modified:   playbooks/prerequisites/roles/nodejs/tasks/main.yml
        modified:   playbooks/prerequisites/roles/ntpd/tasks/main.yml
        modified:   playbooks/prerequisites/roles/psutil/tasks/main.yml
        modified:   playbooks/prerequisites/roles/supervisor/tasks/main.yml
        modified:   playbooks/prerequisites/roles/swap/defaults/main.yml
        modified:   playbooks/prerequisites/roles/swap/tasks/main.yml
        modified:   playbooks/prerequisites/roles/wkhtmltopdf/tasks/main.yml
        modified:   playbooks/prerequisites/setup_essentials.yml
        modified:   playbooks/prerequisites/setup_nginx_proxy_jail.yml
        modified:   playbooks/prerequisites/ubuntu.yml
        modified:   playbooks/production/includes/setup_bench_production.yml
        modified:   playbooks/production/includes/setup_inputrc.yml
        modified:   playbooks/production/install.yml
        modified:   requirements.txt
        modified:   setup.py
        modified:   vm/Readme.md
        modified:   vm/ansible/base.yml
        modified:   vm/ansible/library/bench.py
        modified:   vm/ansible/roles/mariadb/README.md
        modified:   vm/ansible/roles/mariadb/defaults/main.yml
        modified:   vm/ansible/roles/mariadb/handlers/main.yml
        modified:   vm/ansible/roles/mariadb/meta/main.yml
        modified:   vm/ansible/roles/mariadb/tasks/centos.yml
        modified:   vm/ansible/roles/mariadb/tasks/main.yml
        modified:   vm/ansible/roles/mariadb/tasks/mysql_secure_installation.yml
        modified:   vm/ansible/roles/mariadb/tasks/ubuntu.yml
        modified:   vm/ansible/roles/mariadb/templates/mariadb_centos.repo.j2
        modified:   vm/ansible/roles/mariadb/templates/mariadb_ubuntu.list.j2
        modified:   vm/ansible/roles/mariadb/templates/my.cnf.j2
        modified:   vm/ansible/roles/mariadb/vars/main.yml
        modified:   vm/ansible/roles/nginx/.travis.yml
        modified:   vm/ansible/roles/nginx/README.md
        modified:   vm/ansible/roles/nginx/defaults/main.yml
        modified:   vm/ansible/roles/nginx/handlers/main.yml
        modified:   vm/ansible/roles/nginx/meta/main.yml
        modified:   vm/ansible/roles/nginx/tasks/main.yml
        modified:   vm/ansible/roles/nginx/tasks/setup-Debian.yml
        modified:   vm/ansible/roles/nginx/tasks/setup-RedHat.yml
        modified:   vm/ansible/roles/nginx/tasks/vhosts.yml
        modified:   vm/ansible/roles/nginx/templates/nginx.conf.j2
        modified:   vm/ansible/roles/nginx/templates/nginx.repo.j2
        modified:   vm/ansible/roles/nginx/templates/vhosts.j2
        modified:   vm/ansible/roles/nginx/tests/inventory
        modified:   vm/ansible/roles/nginx/tests/test.yml
        modified:   vm/ansible/roles/nginx/vars/Debian.yml
        modified:   vm/ansible/roles/nginx/vars/RedHat.yml
        modified:   vm/ansible/roles/swap/defaults/main.yml
        modified:   vm/ansible/roles/swap/tasks/main.yml
        modified:   vm/ansible/roles/wkhtmltopdf/defaults/main.yml
        modified:   vm/ansible/roles/wkhtmltopdf/tasks/main.yml
        modified:   vm/ansible/templates/mariadb_config.cnf
        modified:   vm/ansible/templates/nginx.conf
        modified:   vm/ansible/vars.yml
        modified:   vm/ansible/vm.yml
        modified:   vm/ansible/vm_vars/all.yml
        modified:   vm/build.py
        modified:   vm/scripts/install_ansible.sh
        modified:   vm/scripts/set_message.sh
        modified:   vm/scripts/zerofree.sh
        modified:   vm/vm.json

no changes added to commit (use "git add" and/or "git commit -a")
root@ubuntu-s-2vcpu-2gb-ams3-01:/home/frappe/.bench#

have a git stash

frappe@ubuntu-s-2vcpu-2gb-ams3-01:~/.bench$ git stash
Saved working directory and index state WIP on master: a509edc Merge pull request #584 from codingCoffee/yarn_fix
HEAD is now at a509edc Merge pull request #584 from codingCoffee/yarn_fix
frappe@ubuntu-s-2vcpu-2gb-ams3-01:~/.bench$

ok now go back to frappe-bench and have a bench update

1 Like

Perfect ! now bench update works.