9.8.6 New App modules config causing loops, cant re-configure nor remove them from menu

Updated local emoncms to 9.8.6 from 9.8.4 to try the new app modules, updated the database at the administration panel, and still, there seem to be several problems with the apps since i get stuck on a permanent loop, especially in

myelectric2.php
mysolarpvdivert.php
timeofuse.php

The loop is causing that I can’t get to delete the apps from the menu causing the problem, since the config button its not responding either (only way to make the delete app button appear), been trying to find a fix to this for a whole day with no intention to modify the database

So in order to not lose my old data I tried making clean installation of my local emoncms, made a new account, liked it to emonhub, and reconfigured every input, however the problem persists, after successfully configuring Myelectryc, mysolarpv and myheatpump, i got into this loop at myelectric2 after placing both inputs on the app (Watts and power to Kwh feeds), i find this disturbing since this does not seem happen in emoncms.org

I can still access the other apps but i just cant delete the one stuck in the loop, In the first account with the old data I actually got around 4 apps stuck with no way to delete them taking space in the menu and not being able to use them at all just an eternal loading loop

Any ideas of how can i quick fix this and hopefully any idea to fix this problem?

F12 shows this as the error that gets me in the loop

Erick - what did you click on or do that caused things to loop? would you be able to document the steps?

I tried + Add new app and all seemed to config and work OK

sure i’ll go exactly from the beginning.

1.- 9.8.4 local installation everything working as intended no problems at all

2.- Find out about new app modules, went into my FTP client and deleted the “app” folder in order to run from SSH the commands

> cd /var/www/html/emoncms/Modules
> git clone https://github.com/emoncms/app.git

3.- New app folder appears and “seems” to work as intended, i go to “Administration” and click on “update the databases” they do, I start testing the new apps, and find out that the new apps modules behave exactly as I described in my 1st post on this thread, all of this happened in my main account (local emoncms installation 9.8.4 with the new apps module installed),

4.- Since this happens several times, with most of the apps, i decide to do a manual “rollback” and delete the new app folder and replace it with a backup of the old app folder that i did just before replacing it

5.- Now whenever i try to setup any feed and press the OK button, all the apps give a pop up window with the following message.

emoncms ERROR: Could not parse /setconfig reply, error: SyntaxError: Unexpected token < in JSON at position 0

6.- After looking for more info about this error on the emoncms forums, and not finding something to solve it, I decided to wipe the entire emoncms folder from my server via FTP and reinstall it from SSH, i wiped everything but the database (mostly because i don’t know how) in order to make a clean install with the latest build 9.8.6

7.- Here I am with the newest build and the same loop, i don’t get the popups tho,

8.- Came here to post and ask for some help

If i had to guess, next logic step is to wipe out the Database too (or at least the array that contains the list of apps) but i’m not sure how can i do it without wiping the entire server since my Mysql knowledge doesn’t go that far, im using ubuntu server 16.04 in an AWS E2C Instance.

May be relevant…

When the divert app appeared on emoncms.org it looped on open for me.

I suspected an issue with my feed names - that the modules default setup was considered good for it to try starting but was not correct enough for it to fully start.

I setup a new emoncms.org account. Opened the divert app, noted the default names used. Return to my live account and rename my feeds to match. App then opened.

I named feeds use, solar, divert, use_kwh, solar_kwh, divert_kwh. The app also supports wind, wind_kwh.

There appears to be the possibility for apps to loop with default/bad configuration. Perhaps a need to validate feed config and go to to config panel on fail… @TrystanLea

Apologies if this is not relevant. Split if needed. Ta

Hello @Goat @iov, thanks for the heads up, Im not 100% sure that they are related but I found that the solar pv divert app has an error first not being able to find app.log and then second having divert_kwh being undefined. I’ve fixed both of these errors now, committed to github and fixed on emoncms.org. I wonder if the apps work for you now?

Ah… Thanks Trystan.

I renamed feed divert_kwh to divert_kwhoff and saw the issue. With the app having Auto select for this kwh item it failed to open. Reverting the change saw it work. I guessed you had adjusted code when it started working.

As far as I can tell if any kWh configuration is auto and a standard name kWh feed is not present then it now opens without (as perhaps expected) history features.

Thanks for addressing the glitch

Updated apps, Seems you fixed the problem, been testing them for a couple hours now in the local installation with no bugs.

I’m really interested in developing at least 1 module, i’ll be playing around with the apps to see if any other bug comes out

This might be too fussy to be asked but a way to change the name of the apps would be nice (in order to not delete them and miss the previous configurations)