Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes without internet connection #180

Open
nicorikken opened this issue Jul 15, 2023 · 4 comments
Open

Crashes without internet connection #180

nicorikken opened this issue Jul 15, 2023 · 4 comments
Labels
bug Something isn't working hacktoberfest

Comments

@nicorikken
Copy link

nicorikken commented Jul 15, 2023

Describe the bug
OpenAndroidInstaller crashes without an internet connection.

To Reproduce
Steps to reproduce the behavior:

  1. Install as Flatpak
  2. Ensure no internet connection
  3. Run by clicking the icon and see the app failing to start
  4. Run as Flatpak through the CLI and see a stacktrace

Expected behavior
Internet connection is not necessary.

Log file

Logs from running flatpak from the commandline
$ flatpak run org.openandroidinstaller.OpenAndroidInstaller
Traceback (most recent call last):
  File "/usr/lib/python3.10/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/lib/python3.10/http/client.py", line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/usr/lib/python3.10/http/client.py", line 1448, in connect
    super().connect()
  File "/usr/lib/python3.10/http/client.py", line 942, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.10/socket.py", line 824, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/lib/python3.10/site-packages/flet/flet.py", line 492, in _download_fletd
    urllib.request.urlretrieve(flet_url, temp_arch)
  File "/usr/lib/python3.10/urllib/request.py", line 241, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/usr/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/usr/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib/python3.10/urllib/request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/lib/python3.10/site-packages/openandroidinstaller/openandroidinstaller.py", line 337, in <module>
    startup()
  File "/app/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/app/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/app/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/app/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/app/lib/python3.10/site-packages/openandroidinstaller/openandroidinstaller.py", line 330, in startup
    ft.app(
  File "/app/lib/python3.10/site-packages/flet/flet.py", line 102, in app
    conn = _connect_internal(
  File "/app/lib/python3.10/site-packages/flet/flet.py", line 192, in _connect_internal
    port = _start_flet_server(
  File "/app/lib/python3.10/site-packages/flet/flet.py", line 292, in _start_flet_server
    fletd_path = _download_fletd()
  File "/app/lib/python3.10/site-packages/flet/flet.py", line 500, in _download_fletd
    os.remove(temp_arch)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/fletd-0.3.2-linux-amd64.tar.gz'

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Debian 10
  • Version: 0.4.3-beta

Additional context
Went to a Repaircafé with images downloaded in advance and didn't expect to need an internet connection. Had to hussle to get one and start the process.

@tsterbak
Copy link
Member

That's a good catch, thanks for reporting it.
I'm in contract with the developers of the frontend frame work to resolve this issue.

@tsterbak tsterbak added the bug Something isn't working label Jul 17, 2023
@tsterbak tsterbak added this to the Release Beta-Version 0.4.4 milestone Jul 17, 2023
@tsterbak
Copy link
Member

I'm working on resolving this for the flatpak version.
@nicorikken did you have the same issues with, the executable version?

@nicorikken
Copy link
Author

Today I tried with 0.5.1-beta. Flatpak still produces the error. The executable downloaded from the GitHub releases page works well.

@tsterbak
Copy link
Member

Today I tried with 0.5.1-beta. Flatpak still produces the error. The executable downloaded from the GitHub releases page works well.

Thanks for trying again :) . Very good to know!
I guess the flatpak tries to initialize something on the first start, while the executable already has it for some reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest
Projects
None yet
Development

No branches or pull requests

3 participants