ReferenceError: can't find variable getCookie

After updating, I can’t log into Frappe. When loading page, I get the following in the console:

[Error] ReferenceError: Can't find variable: getCookie
	(anonymous function)

After entering credentials, the page just reloads and does not log me in. The error persists when loading other web pages as guest (i.e. contact, home).

Output of sudo supervisorctl status:
frappe-bench-processes:frappe-bench-frappe-async-worker RUNNING pid 3420, uptime 0:04:46
frappe-bench-processes:frappe-bench-frappe-longjob-worker RUNNING pid 3422, uptime 0:04:46
frappe-bench-processes:frappe-bench-frappe-web RUNNING pid 3417, uptime 0:04:46
frappe-bench-processes:frappe-bench-frappe-worker RUNNING pid 3418, uptime 0:04:46
frappe-bench-processes:frappe-bench-frappe-workerbeat RUNNING pid 3419, uptime 0:04:46
frappe-bench-processes:frappe-bench-node-socketio RUNNING pid 3421, uptime 0:04:46
frappe-bench-redis:frappe-bench-redis-cache RUNNING pid 3424, uptime 0:04:46
frappe-bench-redis:frappe-bench-redis-queue RUNNING pid 3423, uptime 0:04:46
frappe-bench-redis:frappe-bench-redis-socketio RUNNING pid 3425, uptime 0:04:46

Note that I can’t run supervisorctl commands without sudo - not sure if this is intended or not.

Output of bench doctor:
Traceback (most recent call last):
File “/usr/lib/python2.7/”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/”, line 72, in _run_code
exec code in run_globals
File “/home/erpnext/webapps/frappe5_test/frappe-bench/apps/frappe/frappe/utils/”, line 79, in
File “/home/erpnext/webapps/frappe5_test/frappe-bench/apps/frappe/frappe/utils/”, line 16, in main
File “/home/erpnext/webapps/frappe5_test/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 664, in call
return self.main(*args, **kwargs)
File “/home/erpnext/webapps/frappe5_test/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 644, in main
rv = self.invoke(ctx)
File “/home/erpnext/webapps/frappe5_test/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnext/webapps/frappe5_test/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnext/webapps/frappe5_test/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/erpnext/webapps/frappe5_test/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/webapps/frappe5_test/frappe-bench/apps/frappe/frappe/”, line 852, in doctor
return _doctor(site=site)
File “/home/erpnext/webapps/frappe5_test/frappe-bench/apps/frappe/frappe/utils/”, line 96, in doctor
workers_online = check_number_of_workers()
File “/home/erpnext/webapps/frappe5_test/frappe-bench/apps/frappe/frappe/utils/”, line 85, in check_number_of_workers
return len(get_workers())
File “/home/erpnext/webapps/frappe5_test/frappe-bench/apps/frappe/frappe/utils/”, line 10, in get_workers
with Connection(get_redis_conn()):
File “/home/erpnext/webapps/frappe5_test/frappe-bench/apps/frappe/frappe/utils/”, line 136, in get_redis_conn
raise Exception(‘You need to call frappe.init’)
Exception: You need to call frappe.init

How do I call frappe.init? The only bench command is bench init, which creates a new bench, and I don’t want that.

Please help :S thanks

I hot fixed this by just copy/pasting website.js from website/js (contains the getCookie function) into the website_script.js file…wondering if anything else needs to be done though.

@alec_ruizramon1 did you build your site after update? getCookie is now in common.js which is available in both website and desk

@rmehta thank you! I think for some strange reason I was halfway between the master and develop branch and I have no idea how…but an issue on my end definitely.

Problem is resolved now.