Today I tried 4.0a5 and I cannot pass the Foris Guide âRegion and Timeâ.
Any region I choose, it will crash after click on save.
An unexpected error has occurred
Remote Exception: Internal error ['uci', '-c', '/etc/config/', '-P', '/tmp/.uci-foris-controller', 'set', 'system.ntp.enabled=1']: command failed (b'uci: Invalid argument\n')('<class 'foris_controller.exceptions.UciException'>')
Remote request
{"module": "time", "action": "update_settings", "kind": "request", "data": {"city": "Prague", "country": "CZ", "region": "Europe", "timezone": "CET-1CEST,M3.5.0,M10.5.0/3", "time_settings": {"how_to_set_time": "ntp"}}}
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 59, in perform_action
res = action_function(data)
File "/usr/lib/python3.6/site-packages/foris_controller_modules/time/__init__.py", line 59, in action_update_settings
time,
File "/usr/lib/python3.6/site-packages/foris_controller/utils.py", line 112, in inner
res = func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/foris_controller_modules/time/handlers/openwrt.py", line 67, in update_settings
return self.uci.update_settings(region, country, city, timezone, how_to_set_time, time)
File "/usr/lib/python3.6/site-packages/foris_controller_backends/time/__init__.py", line 102, in update_settings
backend.set_option("system", "ntp", "enabled", store_bool(how_to_set_time == "ntp"))
File "/usr/lib/python3.6/site-packages/foris_controller_backends/uci/__init__.py", line 200, in set_option
self._run_uci_command("set", "%s.%s.%s=%s" % (config, section_name, option_name, value))
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', 'set', 'system.ntp.enabled=1']: command failed (b'uci: Invalid argument\n')
Environment
{'CONTENT_LENGTH': '126',
'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,*/*;q=0.8',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_CONTENT_LENGTH': '126',
'HTTP_COOKIE': 'foris.session=b2acd413ced85acf2a430cc7f9cded09; '
'foris.ws.session=3506fda0179dd94606924e8ef31b5c29',
'HTTP_DNT': '1',
'HTTP_HOST': '192.168.1.1',
'HTTP_REFERER': 'http://192.168.1.1/foris/config/main/time/',
'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) '
'Gecko/20100101 Firefox/66.0',
'PATH_INFO': '/main/time/',
'PATH_TRANSLATED': '/www/main/time/',
'QUERY_STRING': '',
'REDIRECT_STATUS': '200',
'REMOTE_ADDR': '192.168.1.2',
'REMOTE_PORT': '62450',
'REQUEST_METHOD': 'POST',
'REQUEST_SCHEME': 'http',
'REQUEST_URI': '/foris/config/main/time/',
'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.50',
'bottle.app': <bottle.Bottle object at 0x1148790>,
'bottle.raw_path': '/time/',
'bottle.request': <LocalRequest: POST http://192.168.1.1/foris/config/main/time/>,
'bottle.request.body': <_io.BytesIO object at 0x1363890>,
'bottle.request.headers': <bottle.WSGIHeaderDict object at 0x12d7de0>,
'bottle.request.post': {'country': 'CZ',
'csrf_token': 'LPi6xLoyJk20yj6EvNb9LKaBgteqWSJK',
'region': 'Europe',
'send': '',
'zonename': 'Europe/Prague'},
'bottle.request.urlparts': SplitResult(scheme='http', netloc='192.168.1.1', path='/foris/config/main/time/', query='', fragment=''),
'bottle.route': <POST '/<page_name:re:.+>/' <function config_page_post at 0x1160e30>>,
'foris.backend': MqttSender('localhost:11883'),
'foris.language': 'en',
'foris.session': <foris.middleware.sessions.SessionForisProxy object at 0x1360aa0>,
'foris.session.data': {'_messages': [],
'csrf_token': 'LPi6xLoyJk20yj6EvNb9LKaBgteqWSJK',
'user_authenticated': True},
'foris.session.id': 'b2acd413ced85acf2a430cc7f9cded09',
'foris.version': '99.7.5',
'route.handle': <POST '/<page_name:re:.+>/' <function config_page_post at 0x1160e30>>,
'route.url_args': {'page_name': 'time'},
'wsgi.errors': <flup.server.fcgi_base.OutputStream object at 0x1361680>,
'wsgi.input': <_io.BytesIO object at 0x1363890>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}
Another Foris bug is on âNetwork interfacesâ. After several fast click on any lan icon the gui gets a bit broken: