Internal error after upgrade

Hey everyone! I’ve been playing around with Yunohost. I’m somewhat new to linux still, and super new with YunoHost. I’ve been having some problems after I’ve run an update (Through the GUI, in the logs it shows as upgrading the Debian packages). Got an error halfway through where I got logged out but I didn’t think anything of it.

After that I tried to install WordPress and it error ed out again, but this time when I logged back in I got an internal error, which I’ll post the contents of below.

Wordpress didn’t pop up in my applications. I waited about 30 minutes before rebooting the PI via ssh and WordPress showed up but takes me to a 404 page.

My YunoHost server

Hardware: Server is running on a rasp pi 3b+
YunoHost version: x.x.x
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Error Logs

  File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/api.py", line 439, in process
    ret = self.actionsmap.process(arguments, timeout=30, route=_route)
  File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 523, in process
    return func(**arguments)
  File "/usr/lib/moulinette/yunohost/app.py", line 314, in app_list
    app_info_dict_raw = app_info(app=app_id, raw=True)
  File "/usr/lib/moulinette/yunohost/app.py", line 346, in app_info
    ret = app_list(filter=app, raw=True)[app]
  File "/usr/lib/moulinette/yunohost/app.py", line 303, in app_list
    app_info_dict['status'] = _get_app_status(app_id)
  File "/usr/lib/moulinette/yunohost/app.py", line 1754, in _get_app_status
    status = json.loads(str(f.read()))
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Also this:

  File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/api.py", line 439, in process
    ret = self.actionsmap.process(arguments, timeout=30, route=_route)
  File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 523, in process
    return func(**arguments)
  File "/usr/lib/moulinette/yunohost/tools.py", line 675, in tools_diagnosis
    applications = app_list()['apps']
  File "/usr/lib/moulinette/yunohost/app.py", line 314, in app_list
    app_info_dict_raw = app_info(app=app_id, raw=True)
  File "/usr/lib/moulinette/yunohost/app.py", line 346, in app_info
    ret = app_list(filter=app, raw=True)[app]
  File "/usr/lib/moulinette/yunohost/app.py", line 303, in app_list
    app_info_dict['status'] = _get_app_status(app_id)
  File "/usr/lib/moulinette/yunohost/app.py", line 1754, in _get_app_status
    status = json.loads(str(f.read()))
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Thanks for taking the time to read this. There isn’t too much on my server that I’m worried about losing that isn’t backed up off device, but I thought I’d come here for help before trying to just rebuild it and restore my data!

1 Like

Hi there ! Thank you for explaining your issue in a clear way :wink:

I’m not sure to understand how this bug happens, but it should be easy to at least fix the handling the issue more properly, I might be able to add a last-minute fix to the next 3.5 version

Anyway, are you able to log in through SSH ?

If so, could you run the following commands :

cat /etc/yunohost/apps/*/status.json

Then I think to solve the issue, this might do the trick :

rm /etc/yunohost/apps/*/status.json

Hello Aleks! I’m in the tech support industry so I understand the value of being as descriptive and clear as possible!

Both the commands ran just fine, and now everything is accessible in administration again. Wordpress is working after reinstalling the app.

I just wanted to thank you so much for the speedy response and resolution - you’re my hero ^^

1 Like

Eeeeh but the point of the first command was to get the content of the file so I could better understand why / where the bug is coming from :sweat_smile: By any chance, do you still have the history ? :sweat_smile:

If not it’s not such a big deal but it would have helped :stuck_out_tongue: I already pushed a fix for this issue : https://github.com/YunoHost/yunohost/commit/b6cff68d73eafffbf985cd213cd2318b720823d2

Oh, of course! I still have the shell open, here is the output from the command!

root@home:~# cat /etc/yunohost/apps/*/status.json
{"installed_at": 1553925333, "upgraded_at": null, "remote": {"url": "https://github.com/YunoHost-Apps/dokuwiki_ynh", "type": "git", "branch": "master", "revision": "d688487a106bd872774699a31b3b056c65eb5415"}}root@home:~#
root@home:~#
root@home:~#
root@home:~# rm /etc/yunohost/apps/*/status.json
1 Like