Webconf->Snapshots doesn't work!

How do you do that please @jofemodo

:grin:

Steps:

  1. Run the command:

    journalctl -u zynthian-webconf -f

  2. Provoke the error

    From your browser, try accessing the snapshots panel

  3. Copy/Paste the log

Super-easy :wink:

Hiya @jofemodo Tried that and this is what happens. Not much.

systemd, sytemctl & journalctl.

systemctl
Please feel free to ignore the systemctl stuff in this case, I’ve only really put it here for completeness and introduces a couple of concepts that journalctl uses
Just as a possible explanation, Linux of which the raspbian operating system by enlarge uses a standard system to manage all the many different parts that run on a machine. This is called systemd. The d stands for daemon which is a term used to describe a piece of software that runs in the background doing stuff, and in this case systemd is the daemon that starts and stops different processes that it calls units . Want to stop the network then you use systemd ? want to stop and restart zynthian then use systemd!!

The way you do this is using a command line tool called systemctl.

So if you want to stop zynthian you can try just killing the zynthian code you have running but this wont actually help cos systemd is told in this case to restart zynthian if it sees it stop…!! so you kill it ( I wont bother to explain how) zynthian politely stops then systemd sees it’s stopped and starts it again…

So the proper way to stop a systemd handled control like zynthian is

systemctl stop zynthian

& to start it

systemctl start zynthian

The reason I mention this is that for very intense fault finding and debugging you can want to stop the zynthian process and start it manually …

journalctl

Now systemd also has another command journalctl which handles messages that come from systemd processes., and if you realise that the average machine might have over a hundred different bits and pieces being handled that means there are lots of logs to deal with.

So just typing journalctl will display all the logs that have been gathered up yo now, in fact it displays them as pages as q will get you out of this but it wont, help you going forward cos it does it’s job and that’s it. What you want is to see it running continually so it can report errors as they occur after you start the monitoring…
That’s what journalctl -f does . . . Control -C stops it ( why these keys are used are lost in the mists of early computing but that’s the way it is and you wont change it … )

so journalctl -f will display a running monitor but again there’s lots of stuff going on. so we want to examine a specific unit in systemd which is what the -u is for…

journalctl -u zynthian-webconf will ONLY display log messages from the zynthian-webconf unit which is the webserver that does the webconf stuff. to see what zynthian itself is upto its journalctl -u zynthian…

So combining these two options …

journalctl -u zynthian-webconf -f

so we need to log onto the zynthian from another machine as explained. I use ssh from my command line but PuTTY works just as well. . .

So from my seperate rapberry Pi 4 desktop machine I log onto the zynthian-ceed.local machine and it asks for my password ( You do change this don’t you …? )

I’m then running on the zynthian and my desktop machine is just displaying the results… You do this all the time in the computer world…

image

will display zynthian-webconf messages till you ask it to stop. Just what you want to see the messages produced when you try to load snapshots… :slight_smile:

Hope this helps and isn’t too patronising.

and the error was genuine when I selected snapshots in the browser. ;-D

2 Likes

Hi @andycallaby

What browser are you using on what OS and does it have any plugins that might block traffic, e.g. ad blockers, etc.?

Ah! I might have reproduced this. If I create then delete banks I end up with the behaviour from your video, i.e. a brief flash of content then just the “Bank” input box. What happens if you try adding a bank by clicking the ‘+’ button?

Whilst deleting banks I seem to have lost my presets which I thought were in bank 1 but I had deleted higher number banks. (I will retest and report if it is an issue.)
[Edit] I cannot reproduce my issue so I must have deleted the bank accidentally.

FYI: The workflow to manage banks in webconf is a little idiosyncratic! You click the same delete button to delete a snapshot or a bank.

Hiya @riban. If I click the + the bank number goes up one after a few seconds and the screen still stays empty.

Thanks. Still don’t get any other info. It’s not patronising at all. It’s all new to me so I appreciate the in-depth explanation.

Please @andycallaby :

  1. What browser are you using?
  2. Could you try with a different browser?

Thanks,

@jofemodo

I’m using Chrome and have just tried Safari with the same result.

It seems that the JSON data from the server cannot be parsed.
There is that error in the JavaScript console of the browser. If you click on that lib-snapshot:843 you can set a breakpoint and reload the page again and do whatever triggers the error.
Maybe you are able to see the return string before it gets parsed.

But if I have to make a bet, the N is the N in NULL

1 Like

Screenshot 2020-08-14 at 09.26.04

1 Like

yes, now you have to click on “lib-snapshot:847”
You should see the source.
Set a breakpoint at line 847and run again.
The code will stop there and you should be able to see the content of the result.

lib-snapshot (529.1 KB)

@mheidt I get this

Yes, that was helpful. I was wrong…not NULL but NaN

“/graph/RingMod/freq”: {
“value”: NaN,
“midi_learn_chan”: 0,
“midi_learn_cc”: 131
},
In here
“engine_name”: “MOD-UI”,
“engine_nick”: “MD”,
“midi_chan”: null,
“bank_index”: 4,
“bank_name”: “Warp Speed”,
“bank_info”: [
“/zynthian/zynthian-my-data/presets/mod-ui/pedalboards/Warp_Speed.pedalboard”,
4,
“Warp Speed”,
“_”,
“Warp_Speed.pedalboard”
],

NaN needs to be “NaN” or “” or the like
@jofemodo
please take it from here

if you remove the snapshot that contains a MOD-UI layer, it should work until we have a fix.

YAY! It worked. It was my Default Snapshot typically!

@mheidt Thank you so much for your help and knowledge! Much appreciated!

4 Likes

Nice @mheidt & @andycallaby!

An interesting problem, as you can read:

I just committed a fix. After updating, you should be allowed to re-create the snapshot without problems. Also, if you have a backup of the “bad” snapshot, you could load/save from the UI and the newly generated snapshot should be valid JSON that would be accepted by the webconf.

Regards,

5 Likes