Index public_userid undefined, and can't view graph anymore

Hello,
I did a apt_get upgrade last night, and install the latest emoncms it can find, and I remove a feed and a input of something that I will not need.
But now I have no more graph, I event can’t set one, the setting of graph is just not displaying, just that:

EmonCMS Error
-------------
Message: ReferenceError: public_userid is not defined
Route: graph
Line: 576
Column: 9

And on the login page I have this 2 line:

**Notice**: Undefined index: public_userid in **/var/www/emoncms/Modules/dashboard/dashboard_menu.php** on line **4**

**Notice**: Undefined index: public_userid in **/var/www/emoncms/Modules/graph/graph_menu.php** on line **4**

And they appear on every page I click on it.
Components
Emoncms Core v11.0.9 | App v2.6.7 | Dashboard v2.3.3 | Device v2.2.0 | Graph v2.2.3 | Backup v2.3.2 | DemandShaper v2.2.2 | Postprocess v2.2.5 | Sync v2.1.4 | Usefulscripts v2.3.9 | EmonScripts v1.5.3

I’m wondering if removing the feed I don’t need screw up the DB, and that cause this backside issue:

Any help welcome

Arno

[Edited for presentation - Moderator (RW)]

What did you start with before you upgraded? EmonPi?

Clear the browser cache and make sure you are logged into emoncms properly.

No EmonPi
I think I did remove the feed and the input
fix the issue I had with service-runner (wrong username)
apt-get update
install emonhub who was not working
so remove it today
reboot the server.

still the same issue

Sorry to be no more helpfull!!

Hello @Arno you need to update the main emoncms repository as well. You may need to check for local changes that blocked the update process.

What is the result of:

cd /var/www/emoncms
git status

here is the result:

root@EmonCMS:/var/www/emoncms# git status
On branch stable
Your branch is up to date with 'origin/stable'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   default-settings.php
	modified:   scripts/services/service-runner/service-runner.service

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	images/

no changes added to commit (use "git add" and/or "git commit -a")

1 Like

Hello, same happened to me after apt upgrade my raspberry 4. I did not upgrade emoncms nor emonpi.

Here is the list of the packages I’ve upgraded:

bind9-host/oldstable 1:9.11.5.P4+dfsg-5.1+deb10u8 armhf [upgradable from: 1:9.11.5.P4+dfsg-5.1+deb10u7]
bluetooth/oldstable 5.50-1.2~deb10u3+rpt1 all [upgradable from: 5.50-1.2~deb10u2+rpt1]
bluez/oldstable 5.50-1.2~deb10u3+rpt1 armhf [upgradable from: 5.50-1.2~deb10u2+rpt1]
dbus/oldstable 1.12.24-0+deb10u1 armhf [upgradable from: 1.12.20-0+deb10u1]
distro-info-data/oldstable 0.41+deb10u6 all [upgradable from: 0.41+deb10u5]
git-man/oldstable 1:2.20.1-2+deb10u4 all [upgradable from: 1:2.20.1-2+deb10u3]
git/oldstable 1:2.20.1-2+deb10u4 armhf [upgradable from: 1:2.20.1-2+deb10u3]
isc-dhcp-client/oldstable 4.4.1-2+deb10u2 armhf [upgradable from: 4.4.1-2+deb10u1]
isc-dhcp-common/oldstable 4.4.1-2+deb10u2 armhf [upgradable from: 4.4.1-2+deb10u1]
isc-dhcp-server/oldstable 4.4.1-2+deb10u2 armhf [upgradable from: 4.4.1-2+deb10u1]
libbind9-161/oldstable 1:9.11.5.P4+dfsg-5.1+deb10u8 armhf [upgradable from: 1:9.11.5.P4+dfsg-5.1+deb10u7]
libbluetooth-dev/oldstable 5.50-1.2~deb10u3+rpt1 armhf [upgradable from: 5.50-1.2~deb10u2+rpt1]
libbluetooth3/oldstable 5.50-1.2~deb10u3+rpt1 armhf [upgradable from: 5.50-1.2~deb10u2+rpt1]
libdbus-1-3/oldstable 1.12.24-0+deb10u1 armhf [upgradable from: 1.12.20-0+deb10u1]
libdns-export1104/oldstable 1:9.11.5.P4+dfsg-5.1+deb10u8 armhf [upgradable from: 1:9.11.5.P4+dfsg-5.1+deb10u7]
libdns1104/oldstable 1:9.11.5.P4+dfsg-5.1+deb10u8 armhf [upgradable from: 1:9.11.5.P4+dfsg-5.1+deb10u7]
libexpat1-dev/oldstable 2.2.6-2+deb10u6 armhf [upgradable from: 2.2.6-2+deb10u5]
libexpat1/oldstable 2.2.6-2+deb10u6 armhf [upgradable from: 2.2.6-2+deb10u5]
libgnutls30/oldstable 3.6.7-4+deb10u9 armhf [upgradable from: 3.6.7-4+deb10u7]
libirs-export161/oldstable 1:9.11.5.P4+dfsg-5.1+deb10u8 armhf [upgradable from: 1:9.11.5.P4+dfsg-5.1+deb10u7]
libisc-export1100/oldstable 1:9.11.5.P4+dfsg-5.1+deb10u8 armhf [upgradable from: 1:9.11.5.P4+dfsg-5.1+deb10u7]
libisc1100/oldstable 1:9.11.5.P4+dfsg-5.1+deb10u8 armhf [upgradable from: 1:9.11.5.P4+dfsg-5.1+deb10u7]
libisccc161/oldstable 1:9.11.5.P4+dfsg-5.1+deb10u8 armhf [upgradable from: 1:9.11.5.P4+dfsg-5.1+deb10u7]
libisccfg-export163/oldstable 1:9.11.5.P4+dfsg-5.1+deb10u8 armhf [upgradable from: 1:9.11.5.P4+dfsg-5.1+deb10u7]
libisccfg163/oldstable 1:9.11.5.P4+dfsg-5.1+deb10u8 armhf [upgradable from: 1:9.11.5.P4+dfsg-5.1+deb10u7]
libksba8/oldstable 1.3.5-2+deb10u1 armhf [upgradable from: 1.3.5-2]
liblwres161/oldstable 1:9.11.5.P4+dfsg-5.1+deb10u8 armhf [upgradable from: 1:9.11.5.P4+dfsg-5.1+deb10u7]
libmariadb3/oldstable 1:10.3.36-0+deb10u2 armhf [upgradable from: 1:10.3.36-0+deb10u1]
libncurses6/oldstable 6.1+20181013-2+deb10u3 armhf [upgradable from: 6.1+20181013-2+deb10u2]
libncursesw5/oldstable 6.1+20181013-2+deb10u3 armhf [upgradable from: 6.1+20181013-2+deb10u2]
libncursesw6/oldstable 6.1+20181013-2+deb10u3 armhf [upgradable from: 6.1+20181013-2+deb10u2]
libpython3.7-dev/oldstable 3.7.3-2+deb10u4 armhf [upgradable from: 3.7.3-2+deb10u3]
libpython3.7-minimal/oldstable 3.7.3-2+deb10u4 armhf [upgradable from: 3.7.3-2+deb10u3]
libpython3.7-stdlib/oldstable 3.7.3-2+deb10u4 armhf [upgradable from: 3.7.3-2+deb10u3]
libpython3.7/oldstable 3.7.3-2+deb10u4 armhf [upgradable from: 3.7.3-2+deb10u3]
libtinfo5/oldstable 6.1+20181013-2+deb10u3 armhf [upgradable from: 6.1+20181013-2+deb10u2]
libtinfo6/oldstable 6.1+20181013-2+deb10u3 armhf [upgradable from: 6.1+20181013-2+deb10u2]
libxml2/oldstable 2.9.4+dfsg1-7+deb10u5 armhf [upgradable from: 2.9.4+dfsg1-7+deb10u4]
mariadb-client-10.3/oldstable 1:10.3.36-0+deb10u2 armhf [upgradable from: 1:10.3.36-0+deb10u1]
mariadb-client-core-10.3/oldstable 1:10.3.36-0+deb10u2 armhf [upgradable from: 1:10.3.36-0+deb10u1]
mariadb-client/oldstable 1:10.3.36-0+deb10u2 all [upgradable from: 1:10.3.36-0+deb10u1]
mariadb-common/oldstable 1:10.3.36-0+deb10u2 all [upgradable from: 1:10.3.36-0+deb10u1]
mariadb-server-10.3/oldstable 1:10.3.36-0+deb10u2 armhf [upgradable from: 1:10.3.36-0+deb10u1]
mariadb-server-core-10.3/oldstable 1:10.3.36-0+deb10u2 armhf [upgradable from: 1:10.3.36-0+deb10u1]
mariadb-server/oldstable 1:10.3.36-0+deb10u2 all [upgradable from: 1:10.3.36-0+deb10u1]
ncurses-base/oldstable 6.1+20181013-2+deb10u3 all [upgradable from: 6.1+20181013-2+deb10u2]
ncurses-bin/oldstable 6.1+20181013-2+deb10u3 armhf [upgradable from: 6.1+20181013-2+deb10u2]
ncurses-term/oldstable 6.1+20181013-2+deb10u3 all [upgradable from: 6.1+20181013-2+deb10u2]
python3.7-dev/oldstable 3.7.3-2+deb10u4 armhf [upgradable from: 3.7.3-2+deb10u3]
python3.7-minimal/oldstable 3.7.3-2+deb10u4 armhf [upgradable from: 3.7.3-2+deb10u3]
python3.7/oldstable 3.7.3-2+deb10u4 armhf [upgradable from: 3.7.3-2+deb10u3]
sudo/oldstable 1.8.27-1+deb10u4 armhf [upgradable from: 1.8.27-1+deb10u3]
tzdata/oldstable 2021a-0+deb10u8 all [upgradable from: 2021a-0+deb10u6]
vim-common/oldstable 2:8.1.0875-5+deb10u3 all [upgradable from: 2:8.1.0875-5+deb10u2]
vim-tiny/oldstable 2:8.1.0875-5+deb10u3 armhf [upgradable from: 2:8.1.0875-5+deb10u2]
xxd/oldstable 2:8.1.0875-5+deb10u3 armhf [upgradable from: 2:8.1.0875-5+deb10u2]

So I guess one of these is to blame

Still No solution on this ?
Should I just re-install emoncms ?

Hello @Arno you have local modifications to a couple of files which are blocking the update

modified:   default-settings.php
modified:   scripts/services/service-runner/service-runner.service

If you don’t know what these are or it was just a mistake you can clear the changes and pull in the latest version with:

cd /var/www/emoncms
git checkout .
git pull origin master
1 Like

Thank you
that solve it!

Don’t know where those change come from!

2 Likes