A fresh pull of master results in spinning wheel on input and feed pages

Just tried a forced pull of the master branch into an instance of emoncms running on a VM and it results in a spinning wheel on both the Feed and Input pages. The existing instance says 9.8.30 but I suspect it is lying!

I tried running a database update which did make some changes and then a reboot. Tried flushing redis but those pages refuse to finish loading.

Any ideas where to start to debug this? It is not a production system and actually is only taking feeds via the node-red node at the moment. This is the pre update admin extract (I took a snapshot :smile:):

Server Information
Emoncms Version 9.8.30 : 2018.05.08
Modules Administration : App v1.1.0 : Backup v1.1.2 : Dashboard v1.1.1 : EventProcesses : Feed : Graph v1.2.0 : Input : mqttpublish : CoreProcess : Schedule : Time : User : Visualisation
Git URL GitHub - emoncms/emoncms: Web-app for processing, logging and visualising energy, temperature and other environmental data
Branch * master
Server OS Linux 4.9.0-5-amd64
Host DietPi-Emon DietPi-Emon (127.0.1.1)
Date 2018-08-24 21:41:59 BST
Uptime 21:41:59 up 30 min, 0 users, load average: 0.00, 0.00, 0.00
HTTP Server lighttpd/1.4.45 HTTP/1.1 CGI/1.1 80
MySQL Version 5.5.5-10.1.26-MariaDB-0+deb9u1
Host localhost (127.0.0.1)
Date 2018-08-24 21:41:59 (UTC 01:00‌​)
Stats Uptime: 1698 Threads: 2 Questions: 1322 Slow queries: 0 Opens: 41 Flush tables: 1 Open tables: 35 Queries per second avg: 0.778
Redis Version 3.2.6
Host localhost:6379 (127.0.0.1)
Size 82 keys (826.34K)
Uptime 0 days
MQTT Version
Host 192.168.7.30:1883 (192.168.7.30)
Memory RAM Used: 41.28% Total: 357.37 MB Used: 147.53 MB Free: 209.84 MB
Swap Used: 0.00% Total: 1.65 GB Used: 0 B Free: 1.65 GB
Disk Mount Stats
/ Used: 69.88% Total: 7.75 GB Used: 5.41 GB Free: 2.32 GB
PHP Version 7.0.30-0+deb9u1 (Zend Version 3.0.0)
Modules apc v5.1.3 : apcu v5.1.8 : calendar v7.0.30-0+deb9u1 : cgi-fcgi : Core v7.0.30-0+deb9u1 : ctype v7.0.30-0+deb9u1 : curl v7.0.30-0+deb9u1 : date v7.0.30-0+deb9u1 : dom v20031129 : exif v7.0.30-0+deb9u1 : fileinfo v1.0.5 : filter v7.0.30-0+deb9u1 : ftp v7.0.30-0+deb9u1 : gd v7.0.30-0+deb9u1 : gettext v7.0.30-0+deb9u1 : hash v1.0 : iconv v7.0.30-0+deb9u1 : json v1.4.0 : libxml v7.0.30-0+deb9u1 : mbstring v7.0.30-0+deb9u1 : mcrypt v7.0.30-0+deb9u1 : mosquitto v0.4.0 : mysqli v7.0.30-0+deb9u1 : mysqlnd : openssl v7.0.30-0+deb9u1 : pcre v7.0.30-0+deb9u1 : PDO v7.0.30-0+deb9u1 : pdo_mysql v7.0.30-0+deb9u1 : Phar v2.0.2 : posix v7.0.30-0+deb9u1 : readline v7.0.30-0+deb9u1 : redis v3.1.6 : Reflection v7.0.30-0+deb9u1 : session v7.0.30-0+deb9u1 : shmop v7.0.30-0+deb9u1 : SimpleXML v7.0.30-0+deb9u1 : sockets v7.0.30-0+deb9u1 : SPL v7.0.30-0+deb9u1 : standard v7.0.30-0+deb9u1 : sysvmsg v7.0.30-0+deb9u1 : sysvsem v7.0.30-0+deb9u1 : sysvshm v7.0.30-0+deb9u1 : tokenizer v7.0.30-0+deb9u1 : wddx v7.0.30-0+deb9u1 : xml v7.0.30-0+deb9u1 : xmlreader v7.0.30-0+deb9u1 : xmlwriter v7.0.30-0+deb9u1 : xsl v7.0.30-0+deb9u1 : Zend OPcache v7.0.30-0+deb9u1 : zip v1.13.5 : zlib v7.0.30-0+deb9u1 :

Client Information
HTTP Browser Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Screen Resolution 1920 x 1080
Window Size 1699 x 930

What I would say is, I think there are too many changes in master branch when compared to stable and that in itself may cause these sort of problems down the line.

[edit]
I tried it again and connecting before a server reboot resulted in this error immediately after logging in:

Fatal error: Uncaught Error: Call to undefined method User::get_preferences() in /var/www/emoncms/Modules/feed/feed_controller.php:38 Stack trace: #0 /var/www/emoncms/core.php(64): feed_controller() #1 /var/www/emoncms/index.php(189): controller('feed') #2 {main} thrown in /var/www/emoncms/Modules/feed/feed_controller.php on line 38

After a reboot it did need a database update:

Database schema

ALTER TABLE `feeds` ADD `server` int(11) NOT NULL DEFAULT '0';
ALTER TABLE `feeds` ADD `unit` varchar(10) NOT NULL DEFAULT '';
ALTER TABLE users MODIFY `email` varchar(64);;
ALTER TABLE `users` ADD `preferences` varchar(255);

But the end result is a spinning wheel on both the input and feeds page. I do briefly get to see an error message but it is not the same as above.

Log looks OK

LAST ENTRIES ON THE LOG FILE
2018-08-24 21:02:06.724|INFO|index.php|Valid time in seconds used 1535140916
2018-08-24 21:02:06.724|INFO|index.php|Valid JSON found
2018-08-24 21:02:06.724|INFO|index.php|Time from parameter used
2018-08-24 21:02:06.726|INFO|feed_model.php|insert_data() feedid=2 updatetime=1535140916 feedtime=1535140916 value=0 arg=
2018-08-24 21:02:06.726|INFO|feed_model.php|EngineClass() Autoloaded new instance of 'PHPFina'.
2018-08-24 21:02:06.726|INFO|PHPFina.php|post() id=2 timestamp=1535140916 value=0 padding=
2018-08-24 21:02:06.726|INFO|feed_model.php|insert_data() feedid=3 updatetime=1535140916 feedtime=1535140916 value=0 arg=
2018-08-24 21:02:06.726|INFO|feed_model.php|EngineClass() Autoloaded new instance of 'PHPFiwa'.
2018-08-24 21:02:06.727|INFO|PHPFiwa.php|PHPFiwa:post id=3 timestamp=1535140916 value=0
2018-08-24 21:02:06.727|INFO|feed_model.php|insert_data() feedid=4 updatetime=1535140916 feedtime=1535140916 value=0 arg=
2018-08-24 21:02:06.727|INFO|feed_model.php|EngineClass() Autoloaded new instance of 'PHPTimeSeries'.
2018-08-24 21:02:06.727|INFO|PHPTimeSeries.php|PHPTimeSeries:post feedid=4 time=1535140916 value=0
2018-08-24 21:02:11.818|INFO|index.php|admin/db
2018-08-24 21:02:15.391|INFO|index.php|admin/db
2018-08-24 21:02:19.353|INFO|index.php|input/view
2018-08-24 21:02:19.668|INFO|index.php|process/list.json
2018-08-24 21:02:19.671|INFO|index.php|feed/list.json
2018-08-24 21:02:19.773|INFO|index.php|schedule/list.json
2018-08-24 21:02:19.777|INFO|feed_model.php|EngineClass() Autoloaded new instance of 'PHPFina'.
2018-08-24 21:02:19.778|INFO|feed_model.php|EngineClass() Autoloaded new instance of 'PHPFiwa'.
2018-08-24 21:02:19.778|INFO|feed_model.php|EngineClass() Autoloaded new instance of 'PHPTimeSeries'.
2018-08-24 21:02:19.880|INFO|index.php|input/list.json
2018-08-24 21:02:19.882|INFO|index.php|input/list.json
2018-08-24 21:02:24.362|INFO|index.php|admin/view
2018-08-24 21:02:24.620|INFO|index.php|admin/getlog

Are you getting any messages/errors reported in your browser console (F12), or in your emoncms log?

Paul

Would I see those in the ‘debugger’ tab? if so, then no.

I added in some log info above.

Try the console Brian, then do a refresh (F5)

Ok solved it. I had been playing with trying to create a new module and that was hanging about in the Modules folder. It obviously did not like something - as soon as I moved it it seems to be happy.

Thanks for helping - why is it that, after banging your head on something for ages, as soon as you ask the question, you find the solution :smile:.

Brian

I so hate the spinning wheel !!!

1 Like

It’s called “Rubber Duck Debugging”.

1 Like

Your link -

Many programmers have had the experience of explaining a problem to someone else, possibly even to someone who knows nothing about programming, and then hitting upon the solution in the process of explaining the problem.

So, Robert… am I the person ‘who knows nothing about programming’?
I’m hurt Robert, really hurt…
:weary:

1 Like

I could have called you the Sleeping Beauty. :smiling_imp:

2 Likes

I’ve been called worse! - MUCH worse!!