Unable to change wifi password

When I try to change the wifi password it returns an error message like this;
Remote Exception: Internal error [‘uci’, ‘-c’, ‘/etc/config/’, ‘-p’, ‘/tmp/.uci-foris-controller’, ‘commit’, ‘wireless’]: command failed (b’uci: I/O error\n’)(’<class ‘foris_controller.exceptions.UciException’>’)
Remote request
{“module”: “wifi”, “action”: “update_settings”, “kind”: “request”, “data”: {“devices”: [{“id”: 0, “enabled”: true, “SSID”: “Islay4ever”, “hidden”: false, “hwmode”: “11a”, “htmode”: “VHT80”, “channel”: 36, “guest_wifi”: {“enabled”: false}, “password”: “I need a dram!”}, {“id”: 1, “enabled”: true, “SSID”: “Islay4ever”, “hidden”: false, “hwmode”: “11g”, “htmode”: “HT20”, “channel”: 11, “guest_wifi”: {“enabled”: false}, “password”: “Octomore!”}]}}
Stack trace
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/foris_controller/message_router.py”, line 117, in process_message
data = module_instance.perform_action(message[“action”], message.get(“data”, {}))
File “/usr/lib/python3.6/site-packages/foris_controller/module_base.py”, line 61, in perform_action
res = action_function(data)
File “/usr/lib/python3.6/site-packages/foris_controller_modules/wifi/init.py”, line 45, in action_update_settings
res = self.handler.update_settings(data)
File “/usr/lib/python3.6/site-packages/foris_controller/utils.py”, line 113, in inner
res = func(args, **kwargs)
File “/usr/lib/python3.6/site-packages/foris_controller_modules/wifi/handlers/openwrt.py”, line 54, in update_settings
return self.uci.update_settings(new_settings)
File “/usr/lib/python3.6/site-packages/foris_controller_backends/wifi/init.py”, line 406, in update_settings
WifiUci.update_regulator_domain(data, backend, country_code)
File “/usr/lib/python3.6/site-packages/foris_controller_backends/uci/init.py”, line 144, in exit
self.commit()
File “/usr/lib/python3.6/site-packages/foris_controller_backends/uci/init.py”, line 246, in commit
self._run_uci_command(“commit”, config)
File “/usr/lib/python3.6/site-packages/foris_controller_backends/uci/init.py”, line 173, in _run_uci_command
raise UciException(cmdline_args, stderr)
foris_controller.exceptions.UciException: [‘uci’, ‘-c’, ‘/etc/config/’, ‘-p’, ‘/tmp/.uci-foris-controller’, ‘commit’, ‘wireless’]: command failed (b’uci: I/O error\n’)
Environment
{‘CONTENT_LENGTH’: ‘513’,
‘CONTENT_TYPE’: ‘application/x-www-form-urlencoded’,
‘DOCUMENT_ROOT’: ‘/www’,
‘GATEWAY_INTERFACE’: ‘CGI/1.1’,
‘HTTP_ACCEPT’: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,
/;q=0.8,application/signed-exchange;v=b3;q=0.9’,
‘HTTP_ACCEPT_ENCODING’: ‘gzip, deflate’,
‘HTTP_ACCEPT_LANGUAGE’: ‘en-US,en;q=0.9’,
‘HTTP_CACHE_CONTROL’: ‘max-age=0’,
‘HTTP_CONNECTION’: ‘keep-alive’,
‘HTTP_CONTENT_LENGTH’: ‘513’,
‘HTTP_COOKIE’: 'foris.session=e6ef64ac39adfa854d957893d750aeb1; ’
‘foris.ws.session=258db6ad8987722f4ff026a893048cbf’,
‘HTTP_HOST’: ‘192.168.1.1’,
‘HTTP_ORIGIN’: ‘http://192.168.1.1’,
‘HTTP_REFERER’: ‘http://192.168.1.1/foris/config/main/wifi/’,
‘HTTP_SEC_GPC’: ‘1’,
‘HTTP_UPGRADE_INSECURE_REQUESTS’: ‘1’,
‘HTTP_USER_AGENT’: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ’
'AppleWebKit/537.36 (KHTML, like Gecko) ’
‘Chrome/92.0.4515.159 Safari/537.36’,
‘PATH_INFO’: ‘/main/wifi/’,
‘PATH_TRANSLATED’: ‘/www/main/wifi/’,
‘QUERY_STRING’: ‘’,
‘REDIRECT_STATUS’: ‘200’,
‘REMOTE_ADDR’: ‘192.168.1.150’,
‘REMOTE_PORT’: ‘8544’,
‘REQUEST_METHOD’: ‘POST’,
‘REQUEST_SCHEME’: ‘http’,
‘REQUEST_URI’: ‘/foris/config/main/wifi/’,
‘SCRIPT_FILENAME’: ‘/www/foris/config’,
‘SCRIPT_NAME’: ‘/foris/config’,
‘SERVER_ADDR’: ‘192.168.1.1’,
‘SERVER_NAME’: ‘192.168.1.1’,
‘SERVER_PORT’: ‘80’,
‘SERVER_PROTOCOL’: ‘HTTP/1.1’,
‘SERVER_SOFTWARE’: ‘lighttpd/1.4.55’,
‘bottle.app’: <bottle.Bottle object at 0xe88e80>,
‘bottle.raw_path’: ‘/wifi/’,
‘bottle.request’: <LocalRequest: POST http://192.168.1.1/foris/config/main/wifi/>,
‘bottle.request.body’: <_io.BytesIO object at 0x12bc0a0>,
‘bottle.request.headers’: <bottle.WSGIHeaderDict object at 0x12e9c30>,
‘bottle.request.post’: {‘csrf_token’: ‘kmib0iPdgmB0fPbjysheKhSK6HVlPN7L’,
‘radio0-channel’: ‘36’,
‘radio0-device_enabled’: ‘1’,
‘radio0-guest_enabled’: ‘0’,
‘radio0-htmode’: ‘VHT80’,
‘radio0-hwmode’: ‘11a’,
‘radio0-password’: '
’,
‘radio0-ssid’: ‘Islay4ever’,
‘radio0-ssid_hidden’: ‘0’,
‘radio1-channel’: ‘11’,
‘radio1-device_enabled’: ‘1’,
‘radio1-guest_enabled’: ‘0’,
‘radio1-htmode’: ‘HT20’,
‘radio1-hwmode’: ‘11g’,
‘radio1-password’: '
*’,
‘radio1-ssid’: ‘Islay4ever’,
‘radio1-ssid_hidden’: ‘0’,
‘send’: ‘’},
‘bottle.request.urlparts’: SplitResult(scheme=‘http’, netloc=‘192.168.1.1’, path=’/foris/config/main/wifi/’, query=’’, fragment=’’),
‘bottle.route’: <POST ‘/<page_name:re:.+>/’ <function config_page_post at 0x11298d0>>,
‘foris.backend’: UbusSender(’/var/run/ubus.sock’),
‘foris.language’: ‘en’,
‘foris.session’: <foris.middleware.sessions.SessionForisProxy object at 0x12c8c10>,
‘foris.session.data’: {‘csrf_token’: ‘kmib0iPdgmB0fPbjysheKhSK6HVlPN7L’,
‘user_authenticated’: True},
‘foris.session.id’: ‘e6ef64ac39adfa854d957893d750aeb1’,
‘foris.version’: ‘100.5.1’,
‘route.handle’: <POST ‘/<page_name:re:.+>/’ <function config_page_post at 0x11298d0>>,
‘route.url_args’: {‘page_name’: ‘wifi’},
‘wsgi.errors’: <flup.server.fcgi_base.OutputStream object at 0x12a5680>,
‘wsgi.input’: <_io.BytesIO object at 0x12bc0a0>,
‘wsgi.multiprocess’: False,
‘wsgi.multithread’: True,
‘wsgi.run_once’: False,
‘wsgi.url_scheme’: ‘http’,
‘wsgi.version’: (1, 0)}

1 Like