[Solved] Bench update from v9 to v10 failed due to npm install failure which caused by Chinese government blocked googleapis.com

my bench update stucked at the step : Downloading https://chromedriver.storage.googleapis.com/2.34/chromedriver_linux64.zip which caused the npm fail, this is because in Mainland China, the google site is blocked by government, but actually my npm already installed the sudo npn -v showing

chromedriver_linux64.zip for this file, I already downloaded it from other local site , , under this case how can I bypass the npm installation in bench update? i.e other than one simple bench update command, any other multiple manual steps can fix the problem?

many thanks.

after followed these steps, the bench update works
unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads

Make the file you downloaded executable, and move it to /usr/local/share
chmod +x ~/Downloads/chromedriver

sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver

Also, create symlinks to the chromedriver. Cucumber would look for the drivers in /usr/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver

sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver

frappe@iZwz95ypqan2vs7v9zj304Z:~/frappe-bench$ bench update --reset
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 4a336aa Merge branch ‘hotfix’
INFO:bench.utils:find . -name “.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 7e1dc0d Merge branch ‘develop’
INFO:bench.utils:find . -name "
.pyc” -delete
Updating Python libraries…
INFO:bench.utils:./env/bin/pip install --upgrade pip
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
Updating node libraries…
INFO:bench.utils:npm install
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
Backing up sites…
Patching sites…
Migrating site1.local
Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [========================================]
Syncing help database…
Wrote css/frappe-web.css - 65.11 KB
Wrote js/frappe-web.min.js - 132.75 KB
Wrote js/control.min.js - 76.64 KB
Wrote js/dialog.min.js - 116.55 KB
Wrote css/desk.min.css - 308.87 KB
Wrote css/frappe-rtl.css - 32.49 KB
Wrote js/libs.min.js - 1.12 MB
Wrote js/desk.min.js - 458.98 KB
Wrote css/module.min.css - 2.08 KB
Wrote css/form.min.css - 4.47 KB
Wrote js/form.min.js - 195.66 KB
Wrote css/list.min.css - 13.35 KB
Wrote js/list.min.js - 154.36 KB
Wrote css/report.min.css - 7.89 KB
Wrote js/report.min.js - 260.22 KB
Wrote js/web_form.min.js - 247.55 KB
Wrote css/web_form.css - 24.42 KB
Wrote js/print_format_v3.min.js - 23.39 KB
Wrote css/erpnext.css - 8 KB
Wrote js/erpnext-web.min.js - 3.79 KB
Wrote js/erpnext.min.js - 163.5 KB
Wrote js/item-dashboard.min.js - 7.86 KB
INFO:bench.utils:sudo supervisorctl restart frappe-bench-workers: frappe-bench-web:
frappe-bench-workers:frappe-bench-frappe-schedule: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-0: stopped
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-workers:frappe-bench-frappe-schedule: started
frappe-bench-workers:frappe-bench-frappe-default-worker-0: started
frappe-bench-workers:frappe-bench-frappe-long-worker-0: started
frappe-bench-workers:frappe-bench-frappe-short-worker-0: started
frappe-bench-web:frappe-bench-frappe-web: started
frappe-bench-web:frappe-bench-node-socketio: started

Bench: Deployment tool for Frappe and ERPNext (https://erpnext.org).
Open source depends on your contributions, so please contribute bug reports, patches, fixes or cash and be a part of the community

but new problem occurred, when login there is error in the browser console
Uncaught TypeError: frappe.utils.xss_sanitise is not a function
at HTMLFormElement. ((index):409)
at HTMLFormElement.dispatch (jquery.min.js:3)
at HTMLFormElement.r.handle (jquery.min.js:3)

according to this
Cannot login after bench update - Uncaught TypeError: frappe.utils.xss_sanitise is not a function,

after manually clearing the browser history, I can login V10 now!

1 Like