Dashboard Problems with backend

Widgets on the dash displays Problems with backend. Eventlog/Syslog displays No results found! same does the Devices tab. This might have happened on the last update, everything was working before 1st of August (I’ve switched to the master branch yesterday, same problem).

I did

su - librenms
git pull
./daily.sh

No change.
When I try changing the display language, I get an error message CSRF token mismatch
Can someone help me troubleshoot this?

====================================
Component | Version
--------- | -------
LibreNMS  | 1.54-31-gd64c884
DB Schema | 2019_07_09_150217_update_users_widgets_settings (140)
PHP       | 7.2.21
MySQL     | 5.5.60-MariaDB
RRDTool   | 1.6.0
SNMP      | NET-SNMP 5.7.2
====================================

[OK]    Composer Version: 1.9.0
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct

There will be an error in your librenms.log file. Can you post it?

Also, run validate.php

It had some errors before

[2019-08-12 08:00:23] production.ERROR: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '456-116' for key 'device_ifIndex' (SQL: UPDATE `ports` set `ifIndex`=116,`poll_time`=1565596822,`poll_prev`=1559944226,`poll_period`=5652596,`ifLastChange`=92821316,`ifInOctets`=60689059588,`ifInOctets_prev`=781126467894,`ifInOctets_rate`=0,`ifInOctets_delta`=-720437408306,`ifOutOctets`=60692684811,`ifOutOctets_prev`=781198118814,`ifOutOctets_rate`=0,`ifOutOctets_delta`=-720505434003,`ifInErrors`=1,`ifInErrors_prev`=0,`ifInErrors_rate`=1.7690986583863E-7,`ifInErrors_delta`=1,`ifOutErrors`=0,`ifOutErrors_prev`=0,`ifOutErrors_rate`=0,`ifOutErrors_delta`=0,`ifInUcastPkts`=249190295,`ifInUcastPkts_prev`=15378888,`ifInUcastPkts_rate`=41.363544643912,`ifInUcastPkts_delta`=233811407,`ifOutUcastPkts`=249195562,`ifOutUcastPkts_prev`=15379395,`ifOutUcastPkts_rate`=41.364386734874,`ifOutUcastPkts_delta`=233816167 WHERE `port_id` = 1464759) (SQL: UPDATE `ports` set `ifIndex`=116,`poll_time`=1565596822,`poll_prev`=1559944226,`poll_period`=5652596,`ifLastChange`=92821316,`ifInOctets`=60689059588,`ifInOctets_prev`=781126467894,`ifInOctets_rate`=0,`ifInOctets_delta`=-720437408306,`ifOutOctets`=60692684811,`ifOutOctets_prev`=781198118814,`ifOutOctets_rate`=0,`ifOutOctets_delta`=-720505434003,`ifInErrors`=1,`ifInErrors_prev`=0,`ifInErrors_rate`=1.7690986583863E-7,`ifInErrors_delta`=1,`ifOutErrors`=0,`ifOutErrors_prev`=0,`ifOutErrors_rate`=0,`ifOutErrors_delta`=0,`ifInUcastPkts`=249190295,`ifInUcastPkts_prev`=15378888,`ifInUcastPkts_rate`=41.363544643912,`ifInUcastPkts_delta`=233811407,`ifOutUcastPkts`=249195562,`ifOutUcastPkts_prev`=15379395,`ifOutUcastPkts_rate`=41.364386734874,`ifOutUcastPkts_delta`=233816167 WHERE `port_id` = 1464759)#0 /opt/librenms/includes/polling/ports.inc.php(914): dbUpdate(Array, 'ports', '`port_id` = ?', Array)
#1 /opt/librenms/includes/polling/functions.inc.php(309): include('/opt/librenms/i...')
#2 /opt/librenms/poller.php(173): poll_device(Array, false)
#3 {main}

I’ve deleted and readded the device, after that, there are no errors in the librenms.log only reports about pooler.php

/opt/librenms/discovery.php new 2019-08-14 08:25:01 - 0 devices discovered in 0.002 secs
/opt/librenms/poller.php 77 2019-08-14 08:25:10 - 1 devices polled in 8.036 secs

 ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.54-33-g67376e2
DB Schema | 2019_07_09_150217_update_users_widgets_settings (140)
PHP       | 7.2.21
MySQL     | 5.5.60-MariaDB
RRDTool   | 1.6.0
SNMP      | NET-SNMP 5.7.2
====================================

[OK]    Composer Version: 1.9.0
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct

And lately, often when I run ./validate.php I get ‘incorrect permissions’ errors on random files.

fx.

 ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.54-33-g67376e2
DB Schema | 2019_07_09_150217_update_users_widgets_settings (140)
PHP       | 7.2.21
MySQL     | 5.5.60-MariaDB
RRDTool   | 1.6.0
SNMP      | NET-SNMP 5.7.2
====================================

[OK]    Composer Version: 1.9.0
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[FAIL]  Some folders have incorrect file permissions, this may cause issues.
        [FIX]:
        sudo chown -R librenms:librenms /opt/librenms
        sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
        sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
        Files:
         /opt/librenms/bootstrap/cache/services.php

Oh, it looks there is something wrong in my config.php

Because of this $config['favicon'] = "images/custom/icon.png";

Seriously?