Can't launch on flatpak
Closed this issue · 7 comments
Hello. I installed "varia" app from flatpak, but I can't launch it. Here is terminal logs.
05/07 23:06:05 [WARN] Neither --rpc-secret nor a combination of --rpc-user and --rpc-passwd is set. This is insecure. It is extremely recommended to specify --rpc-secret with the adequate secrecy or now deprecated --rpc-user and --rpc-passwd.
05/07 23:06:05 [ERROR] IPv4 RPC: failed to bind TCP port 6801
Exception: [SocketCore.cc:312] errorCode=1 Failed to bind a socket, cause: Address already in use
05/07 23:06:05 [ERROR] IPv6 RPC: failed to bind TCP port 6801
Exception: [SocketCore.cc:312] errorCode=1 Failed to bind a socket, cause: Address already in use
05/07 23:06:05 [ERROR] Exception caught
Exception: [DownloadEngineFactory.cc:219] errorCode=1 Failed to setup RPC server.
Seems the 6801 port Varia uses is used by something else... or by itself. Are you sure Varia is not already running in the background? Can you log off and log back in and then try running the app again?
Thank you, tcp port is binded. But seems there is another issue. I'll send a video
Here is the log from video.
05/07 23:12:24 [WARN] Neither --rpc-secret nor a combination of --rpc-user and --rpc-passwd is set. This is insecure. It is extremely recommended to specify --rpc-secret with the adequate secrecy or now deprecated --rpc-user and --rpc-passwd.
05/07 23:12:24 [NOTICE] IPv4 RPC: listening on TCP port 6801
05/07 23:12:24 [NOTICE] IPv6 RPC: listening on TCP port 6801
(varia-py.py:4): Gtk-WARNING **: 23:12:24.189: Theme directory preferences@2x/22 of theme WhiteSur-dark has no size field
Traceback (most recent call last):
File "/app/lib/python3.11/site-packages/urllib3/connection.py", line 198, in _new_conn
sock = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/urllib3/util/connection.py", line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/socket.py", line 962, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -2] Name or service not known
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/lib/python3.11/site-packages/urllib3/connectionpool.py", line 793, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/urllib3/connectionpool.py", line 496, in _make_request
conn.request(
File "/app/lib/python3.11/site-packages/urllib3/connection.py", line 400, in request
self.endheaders()
File "/usr/lib/python3.11/http/client.py", line 1298, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.11/http/client.py", line 1058, in _send_output
self.send(msg)
File "/usr/lib/python3.11/http/client.py", line 996, in send
self.connect()
File "/app/lib/python3.11/site-packages/urllib3/connection.py", line 238, in connect
self.sock = self._new_conn()
^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/urllib3/connection.py", line 205, in _new_conn
raise NameResolutionError(self.host, self, e) from e
urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x77bec7545c10>: Failed to resolve 'localhost' ([Errno -2] Name or service not known)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/urllib3/connectionpool.py", line 847, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/urllib3/util/retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=6801): Max retries exceeded with url: /jsonrpc (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x77bec7545c10>: Failed to resolve 'localhost' ([Errno -2] Name or service not known)"))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/share/varia/varia/variamain.py", line 360, in on_activate
self.win = MainWindow(application=app, variaapp=self, appdir=appdir, appconf=appconf, aria2c_subprocess=aria2c_subprocess, aria2cexec=aria2cexec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/share/varia/varia/variamain.py", line 68, in init
set_aria2c_download_directory(self)
File "/app/share/varia/varia/download/communicate.py", line 50, in set_aria2c_download_directory
response = requests.post(self.aria2cLocation + '/jsonrpc', headers={'Content-Type': 'application/json'}, data=json.dumps(json_request))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=6801): Max retries exceeded with url: /jsonrpc (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x77bec7545c10>: Failed to resolve 'localhost' ([Errno -2] Name or service not known)"))
Here it says 'Failed to resolve localhost'. Is localhost defined in /etc/hosts?
OMG thank you again, it worked.
Alright. Glad it's resolved.