New EmonPi Build - App Button Fails - fetch_object() on boolean

Most things seem to be working very well. The apps button: nope.

Fatal error: Call to a member function fetch_object() on boolean in /var/www/emoncms/Modules/app/AppConfig_model.php on line 167

166:  $result = $this->mysqli->query("SELECT `data` FROM app_config WHERE `userid`='$userid'");
167:  if ($row = $result->fetch_object()) {

Line 167 is pasted above, along with 166 for reference.

Stupid me, I pulled up mysql and couldn’t find the table. Then I realized this is something PHP related that is more like .NET’s Linq.

Anyway, any ideas?

Have you run “Update & Check” database from the admin page of emoncms after installing the apps module? There should be a “app_config” table in the emoncms mySQL db, it should have 2 fields userid and data.

Doh. That was it.

Apparently I understand PHP even less than I thought.

Thank you for the quick reply

Hello - I know this thread is a bit old, but I’m having the same issue with a fresh new install of emoncms, and I can’t make sense of the solution. I’ve done the admin>Update & Check, and even restarted the server, but I get the same error "Fatal error: Call to a member function fetch_object() on boolean in /usr/local/www/apache24/data/emoncms/Modules/app/AppConfig_model.php on line 167"

so I’m not sure what do to now. Do I somehow hand edit the MySQL database to add some lines or authentication info? How would I even start doing that? Do I edit the PHP file? Even though I got a FAMP server running in a Freenas JAIL, got modules installed and got this far, I’m still a novice, so please forgive me.

Andy