App titles and widget boxes within them show twice

Hi, I’m very new to the ERPNext community - so if anything is missing below, let me know. This is purely a personal project to learn more about ERP systems and a little bit about Linux stuff. So hope I can learn from this as well.

I have followed CodeWithKarani’s guide on how to set up ERPNext on Ubuntu 20.04. Not a complaint. Awesome guy, awesome guide - but just mentioning it so you can see the steps I followed to install ERPNext.

The installation went OK, and ERPNext worked perfectly until I noticed that when I click around in the left menu’s apps - I start seeing items on the right side twice. I have made (hopefully clear enough) screenshots showing the steps and what happens.

Now, in the 4th part you may see there’s an error log, which I don’t know the relation to this issue, but have included it anyway - and is the following:

Title

frappe.core.doctype.user.user.create_contact

Error

Traceback (most recent call last):
File “/opt/bench/erpnext/apps/frappe/frappe/utils/background_jobs.py”, line 106, in execute_job
method(**kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/core/doctype/user/user.py”, line 998, in create_contact
contact.insert(ignore_permissions=True, ignore_links=ignore_links, ignore_mandatory=ignore_mandatory)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 229, in insert
self._validate_links()
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 827, in validate_links
frappe.throw(
(“Could not find {0}”).format(msg),
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 438, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 417, in msgprint
_raise_exception()
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 371, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.LinkValidationError: Could not find User Id: my personal e-mail address




The bold init.py files are not bold in the log, neither are the italic texts. But are messed up by the underscores in the log.

The e-mail address in the error log is one of the user I made during the first setup. The user is currently not active, but does show up in the user list, and is an active account. Active account you see in the screenshots is Administrator. I logged in to the personal account and the exact same issue continues to show…

Any ideas what’s going on and how to solve this? Many thanks in advance!

same here.

tried on firefox and chrome, with different user logins.
i installed yesterday version-13.
ERPNext: v13.x.x-develop () (develop)
Frappe Framework: v14.x.x-develop () (develop)

seems like everything inside <div class=“codex-editor__redactor” …> gets doubled by visiting again any of the menue points. refresh (F5) or edit workspace (top right) and discard, removes the twins, till you visit them again. removing them manually in edit mode and save, doesnt help, too. on next visit they are doubled again.
strange is, they get only doubled, not tripled or more. this looks more like a bug, than caching or wrong installation.

i hope someone can help.

1 Like

I’ve been looking more into this the past few days, and even in the Docker Demo it does the exact same thing.

I’ve installed ERPNext on an Ubuntu machine on my LAN, and with multiple phones, laptops and desktops - all but the phone, with different browsers, show the same issue.

My concern is more from the terminal showing two of the same doctypes/elements being created and each of its numbering is incremented accordingly (1637789780887 and 1637789780888):

22:37:24 web.1            | 127.0.0.1 - - [24/Nov/2021 22:37:24] "GET /api/method/frappe.client.get?doctype=Dashboard%20Chart&name=Profit%20and%20Loss&filters=&_=1637789780887 HTTP/1.1" 200 -
22:37:24 web.1            | 127.0.0.1 - - [24/Nov/2021 22:37:24] "GET /api/method/frappe.client.get?doctype=Dashboard%20Chart&name=Profit%20and%20Loss&filters=&_=1637789780888 HTTP/1.1" 200 -

This same thing happens with what you just noted, that elements start showing up twice after you’ve visited them prior. And then when you refresh, it’s normal again until you repeat the process.

I’d be inclined to say this is a bug. But because I saw the duplicate outputs in my terminal, I made the topic in the hope that it only affects web elements like these titles and cards. Because what if I start actually configuring my whole ERP system and more important actions related to payments, credentials, etc. start bugging out because of similar duplication issues?

More info:

only error I’ve been getting during install, near the end:

 WARN  Cannot connect to redis_cache to update assets_json
 WARN  Cannot connect to redis_cache to update assets_json
 WARN  Cannot connect to redis_cache to update assets_json
Done in 18.37s.

And when I use bench start, the following appears until the first GET line:

erpnext@nassz-ThinkCentre-M83:/opt/bench/erpnext$ sudo bench start
    WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`

22:22:44 system           | redis_cache.1 started (pid=58372)
22:22:44 redis_cache.1    | 58376:C 24 Nov 2021 22:22:44.653 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
22:22:44 redis_cache.1    | 58376:C 24 Nov 2021 22:22:44.653 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=58376, just started
22:22:44 redis_cache.1    | 58376:C 24 Nov 2021 22:22:44.653 # Configuration loaded
22:22:44 redis_cache.1    | 58376:M 24 Nov 2021 22:22:44.653 * Increased maximum number of open files to 10032 (it was originally set to 1024).
22:22:44 system           | redis_queue.1 started (pid=58377)
22:22:44 system           | watch.1 started (pid=58381)
22:22:44 system           | redis_socketio.1 started (pid=58374)
22:22:44 redis_socketio.1 | 58379:C 24 Nov 2021 22:22:44.653 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
22:22:44 redis_socketio.1 | 58379:C 24 Nov 2021 22:22:44.653 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=58379, just started
22:22:44 redis_socketio.1 | 58379:C 24 Nov 2021 22:22:44.653 # Configuration loaded
22:22:44 redis_socketio.1 | 58379:M 24 Nov 2021 22:22:44.653 * Increased maximum number of open files to 10032 (it was originally set to 1024).
22:22:44 redis_queue.1    | 58382:C 24 Nov 2021 22:22:44.656 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
22:22:44 redis_queue.1    | 58382:C 24 Nov 2021 22:22:44.656 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=58382, just started
22:22:44 redis_queue.1    | 58382:C 24 Nov 2021 22:22:44.656 # Configuration loaded
22:22:44 redis_cache.1    | 58376:M 24 Nov 2021 22:22:44.658 * Running mode=standalone, port=13000.
22:22:44 redis_cache.1    | 58376:M 24 Nov 2021 22:22:44.658 # Server initialized
22:22:44 redis_cache.1    | 58376:M 24 Nov 2021 22:22:44.658 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
22:22:44 redis_cache.1    | 58376:M 24 Nov 2021 22:22:44.658 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
22:22:44 redis_cache.1    | 58376:M 24 Nov 2021 22:22:44.658 * Ready to accept connections
22:22:44 redis_queue.1    | 58382:M 24 Nov 2021 22:22:44.657 * Increased maximum number of open files to 10032 (it was originally set to 1024).
22:22:44 redis_queue.1    | 58382:M 24 Nov 2021 22:22:44.658 * Running mode=standalone, port=11000.
22:22:44 redis_queue.1    | 58382:M 24 Nov 2021 22:22:44.658 # Server initialized
22:22:44 redis_queue.1    | 58382:M 24 Nov 2021 22:22:44.658 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
22:22:44 redis_queue.1    | 58382:M 24 Nov 2021 22:22:44.658 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
22:22:44 redis_queue.1    | 58382:M 24 Nov 2021 22:22:44.658 * Ready to accept connections
22:22:44 redis_socketio.1 | 58379:M 24 Nov 2021 22:22:44.658 * Running mode=standalone, port=12000.
22:22:44 redis_socketio.1 | 58379:M 24 Nov 2021 22:22:44.658 # Server initialized
22:22:44 redis_socketio.1 | 58379:M 24 Nov 2021 22:22:44.658 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
22:22:44 redis_socketio.1 | 58379:M 24 Nov 2021 22:22:44.658 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
22:22:44 redis_socketio.1 | 58379:M 24 Nov 2021 22:22:44.658 * Ready to accept connections
22:22:44 system           | socketio.1 started (pid=58385)
22:22:44 system           | worker_default.1 started (pid=58402)
22:22:44 system           | web.1 started (pid=58400)
22:22:44 system           | worker_short.1 started (pid=58410)
22:22:44 system           | worker_long.1 started (pid=58416)
22:22:44 system           | schedule.1 started (pid=58418)
22:22:44 schedule.1       | WARN: bench is installed in editable mode!
22:22:44 schedule.1       | 
22:22:44 schedule.1       | This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
22:22:44 schedule.1       | 
22:22:45 web.1            | WARN: bench is installed in editable mode!
22:22:45 web.1            | 
22:22:45 web.1            | This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
22:22:45 web.1            | 
22:22:45 watch.1          | WARN: bench is installed in editable mode!
22:22:45 watch.1          | 
22:22:45 watch.1          | This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
22:22:45 watch.1          | 
22:22:45 socketio.1       | listening on *: 9000
22:22:45 watch.1          | 
22:22:45 web.1            |  * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
22:22:45 web.1            |  * Restarting with stat
22:22:45 watch.1          | yarn run v1.22.17
22:22:45 watch.1          | $ node esbuild --watch --live-reload
22:22:45 web.1            |  * Debugger is active!
22:22:46 web.1            |  * Debugger PIN: 452-883-970
22:22:46 watch.1          | clean: postcss.plugin was deprecated. Migration guide:
22:22:46 watch.1          | https://evilmartians.com/chronicles/postcss-8-plugin-migration
22:22:46 watch.1          | clean: postcss.plugin was deprecated. Migration guide:
22:22:46 watch.1          | https://evilmartians.com/chronicles/postcss-8-plugin-migration
22:22:48 watch.1          | clean: postcss.plugin was deprecated. Migration guide:
22:22:48 watch.1          | https://evilmartians.com/chronicles/postcss-8-plugin-migration
22:22:48 watch.1          | clean: postcss.plugin was deprecated. Migration guide:
22:22:48 watch.1          | https://evilmartians.com/chronicles/postcss-8-plugin-migration

I’m not sure if this whole redis_cache and postcss.plugin issue has anything to do with it, but these are the only thing I can imagine being relevant. Then again, I am very, very new to Linux and ERPNext as a whole, so if anyone can explain and help - I’d love to learn.

i am new here too. so here is what i know/think till now:

the two warning in your log can be temporarely removed by

sudo bash -c “echo never > /sys/kernel/mm/transparent_hugepage/enabled”
sudo sysctl vm.overcommit_memory=1

but they are all only warnings, not critical!
same for, as you can see in my log (for you to compare), my io.open warning with bufsize.
or also your redis or bench warnings.

erpnext@erpnext:/opt/bench/erpnext$ bench start
/usr/lib/python3.8/subprocess.py:848: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:848: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:848: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:848: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:848: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:848: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:848: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:848: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:848: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
/usr/lib/python3.8/subprocess.py:848: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)
09:25:36 system           | redis_socketio.1 started (pid=6874)
09:25:36 system           | redis_cache.1 started (pid=6875)
09:25:36 redis_cache.1    | 6881:C 26 Nov 2021 09:25:36.172 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
09:25:36 system           | redis_queue.1 started (pid=6876)
09:25:36 system           | web.1 started (pid=6877)
09:25:36 redis_cache.1    | 6881:C 26 Nov 2021 09:25:36.193 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=6881, just started
09:25:36 redis_cache.1    | 6881:C 26 Nov 2021 09:25:36.196 # Configuration loaded
09:25:36 redis_socketio.1 | 6878:C 26 Nov 2021 09:25:36.202 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
09:25:36 redis_socketio.1 | 6878:C 26 Nov 2021 09:25:36.202 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=6878, just started
09:25:36 redis_socketio.1 | 6878:C 26 Nov 2021 09:25:36.202 # Configuration loaded
09:25:36 redis_socketio.1 | 6878:M 26 Nov 2021 09:25:36.203 * Increased maximum number of open files to 10032 (it was originally set to 1024).
09:25:36 redis_queue.1    | 6882:C 26 Nov 2021 09:25:36.204 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
09:25:36 redis_queue.1    | 6882:C 26 Nov 2021 09:25:36.204 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=6882, just started
09:25:36 redis_queue.1    | 6882:C 26 Nov 2021 09:25:36.204 # Configuration loaded
09:25:36 redis_queue.1    | 6882:M 26 Nov 2021 09:25:36.205 * Increased maximum number of open files to 10032 (it was originally set to 1024).
09:25:36 redis_queue.1    | 6882:M 26 Nov 2021 09:25:36.208 * Running mode=standalone, port=11000.
09:25:36 system           | socketio.1 started (pid=6887)
09:25:36 redis_cache.1    | 6881:M 26 Nov 2021 09:25:36.213 * Increased maximum number of open files to 10032 (it was originally set to 1024).
09:25:36 redis_cache.1    | 6881:M 26 Nov 2021 09:25:36.215 * Running mode=standalone, port=13000.
09:25:36 system           | schedule.1 started (pid=6888)
09:25:36 redis_cache.1    | 6881:M 26 Nov 2021 09:25:36.215 # Server initialized
09:25:36 redis_cache.1    | 6881:M 26 Nov 2021 09:25:36.216 * Ready to accept connections
09:25:36 redis_socketio.1 | 6878:M 26 Nov 2021 09:25:36.222 * Running mode=standalone, port=12000.
09:25:36 redis_socketio.1 | 6878:M 26 Nov 2021 09:25:36.223 # Server initialized
09:25:36 redis_socketio.1 | 6878:M 26 Nov 2021 09:25:36.223 * Ready to accept connections
09:25:36 system           | watch.1 started (pid=6889)
09:25:36 redis_queue.1    | 6882:M 26 Nov 2021 09:25:36.224 # Server initialized
09:25:36 redis_queue.1    | 6882:M 26 Nov 2021 09:25:36.224 * Ready to accept connections
09:25:36 system           | worker_long.1 started (pid=6906)
09:25:36 system           | worker_short.1 started (pid=6905)
09:25:36 system           | worker_default.1 started (pid=6907)
09:25:38 socketio.1       | listening on *: 9000
09:25:40 watch.1          |
09:25:41 web.1            |  * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
09:25:41 web.1            |  * Restarting with stat
09:25:41 web.1            |  * Debugger is active!
09:25:41 web.1            |  * Debugger PIN: 396-672-958
09:25:42 web.1            | 192.168.2.232 - - [26/Nov/2021 09:25:42] "GET /api/method/frappe.realtime.get_user_info?sid=906639ed0d7bdaff9cf7a2ddb9d3580a7ad62c07bf17a7153183137e HTTP/1.1" 200 -
09:25:42 watch.1          | yarn run v1.22.15
09:25:42 watch.1          | $ node esbuild --watch
09:25:45 watch.1          | clean: postcss.plugin was deprecated. Migration guide:
09:25:45 watch.1          | https://evilmartians.com/chronicles/postcss-8-plugin-migration

ah yes, and the two identical get http-requests dont explain this bug.

imho, this is a buggy js inside of erpnext.
best example is still:
‘already loaded’ side menu click (with doubled content bug)
vs
edit+discard (no bug, even removes previously doubled displayed content)
=>both with no data retrieving from server (http-request), only client side.

strange… that noone else is experiencing this, or can say something.
i will do a new try next week and install a second vm.
:wink:

back again.
i tried the last two days different guides to manually install this erp-system on a clean “ubuntu 20.04.3 lts”-vm
(1, 2, 3, 4 and yours from karani) combined and varied them, did a clean and a messy (installed/edited everything mentioned), tried different versions/installation for yarn,node…, two different languages in initial frappe setup, different github branches …and so on

install - try out - rollback - repeat! …but never party hard

no party, no fun. that’s it for me, guys. :wave:


this are my final install notes… maybe helpful for someone else

update reboot

apt update && apt upgrade -y && shutdown -r now

----------------snapshot cleaninstall

set LC_ALL (locale) for scripts

export LC_ALL=C.UTF-8

install curl + git (already installed)

sudo apt-get install curl git

install nodesource repo GitHub - nodesource/distributions: NodeSource Node.js Binary Distributions and nodejs

curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs

----------------- OR --------------------

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

close and reopen terminal …nvm use 14 (v16 not supported)

nvm install 14
node -v

You may also need development tools to build native addons:
sudo apt-get install gcc g++ make

install requirements…

sudo apt-get install -y mariadb-server redis-server python3-pip nginx python3-testresources

sudo apt-get install virtualenv
sudo apt-get install libmysqlclient-dev
sudo apt-get install -y wkhtmltopdf

edit mariadb config, add to the bottom, restart service

sudo nano /etc/mysql/my.cnf
[mysqld]
 character-set-client-handshake = FALSE
 character-set-server = utf8mb4
 collation-server = utf8mb4_unicode_ci
 
 [mysql]
 default-character-set = utf8mb4
 sudo service mysql restart

secure mariadb (use default answers)

sudo mysql_secure_installation 

remove unix_socket plugin (for root user) so password is always needed

sudo mysql -u root 
use mysql;
update mysql.user set plugin='' where user='root';
flush privileges;
exit

install the yarn package manager (already installed)

curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install yarn

---------------- OR ---------------------

node >16.10 !not supported!

corepack enable

node <16.10

npm i -g corepack

add path to $path at the end of bashrc, for autoload per user and reload

nano ~/.bashrc
export PATH=$PATH:~/.local/bin/
source ~/.bashrc

create a user if you havnt already (in the os installation), and switch

sudo adduser [USER]
sudo usermod -aG sudo [USER]
sudo su - [USER]

install frappe bench cli in home

pip3 install frappe-bench
bench --version

----------------snapshot requirements

create new/first bench instance and site

bench init erpnext
cd erpnext
bench new-site erpnext.local

----------------snapshot beforeerpnext

get erpnext and install as app

bench get-app --branch version-13 erpnext
bench --site erpnext.local install-app erpnext
bench start

misc --------------

sudo bench setup production [USER]
bench --site site1.local enable-scheduler
bench drop-site erpnext.local --no-backup
bench update --reset
nano site_config.json

1 Like