Unable to set default app

I’m having problems setting the wordpress (or any app ) as default
when I use the web interface it just errors

the output from the terminal is as follows

root@yunohost2:~# yunohost app makedefault wordpress
Traceback (most recent call last):
  File "/usr/bin/yunohost", line 160, in <module>
    print_json=PRINT_JSON, use_cache=USE_CACHE)
  File "/usr/lib/python2.7/dist-packages/moulinette/__init__.py", line 117, in cli
    moulinette.run(args, print_json)
  File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/cli.py", line 202, in run
    ret = self.actionsmap.process(args, timeout=5)
  File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 462, in process
    return func(**arguments)
  File "/usr/lib/moulinette/yunohost/app.py", line 713, in app_makedefault
    ssowat_conf = json.loads(str(json_conf.read()))
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 369, in decode
    raise ValueError(errmsg("Extra data", s, end, len(s)))
ValueError: Extra data: line 5 column 1 - line 10 column 1 (char 31 - 123)

sorry If I’m missing something simple


I think there’s something wrong with the json config file, but i need to investigate more in order to help you…

What is the content of /etc/ssowat/conf.json.persistent ?

the contents of the file is

    "redirected_urls": {}

    unprotected_urls : [

I followed the pinned guide for setting up a letsencrypt cert

It’s not a valid json file. Did you save the previous version ?

However, this would be alright (sorry for indentation, i’m writing on my phone):

{ "redirected_urls": {} , "unprotected_urls" : [ "speaksthegeek.co.uk/.well-known/acme-challenge" ] }
1 Like

I knew it was something simple, I was just having one of those days
Thank you very much!!

You’re welcome. :wink:


Just to make sure I understand correctly: If I try to indent your line correctly, that would be something like:

    "redirected_urls": {} , 
    "unprotected_urls" : [

Is this correct? (I came across some trouble lately…)

yes, but indentation doesn’t matter.